/* A/B Test Main Page Styles */
.causalfunnel-container {
  padding: 20px;
  background: #f1f1f1;
  min-height: 100vh;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.causalfunnel-container.loaded {
  opacity: 1;
}

.causalfunnel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 30px;
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.causalfunnel-title {
  font-size: 28px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.add-test-btn-inline {
  background: #0073aa;
  color: white;
  border: 2px solid #0073aa;
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.add-test-btn-inline:hover {
  background: #005a87;
  border-color: #005a87;
  transform: translateY(-1px);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Inline Quota Styles */
.quota-section-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.quota-text {
  font-size: 14px;
  color: #666;
  white-space: nowrap;
}

.quota-bar-inline {
  background: #e0e0e0;
  height: 18px;
  width: 320px;
  border-radius: 10px;
  overflow: hidden;
}

.quota-fill-inline {
  background: linear-gradient(90deg, #4caf50, #45a049);
  height: 100%;
  width: 20%;
  transition: width 0.3s ease;
}

.upgrade-btn {
  background: #ff6b35;
  color: white;
  border: 2px solid #ff6b35;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

.upgrade-btn:hover {
  background: #e85a2b;
  border-color: #e85a2b;
  transform: translateY(-1px);
}

/* Tests Section */
.tests-section {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

/* Tests Header with Filter Controls */
.tests-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  background: #f8f9fa;
}

#tests-count {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.refresh-btn {
  background: #f0f0f0;
  border: 1px solid #ddd;
  padding: 8px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 16px;
  transition: all 0.2s ease;
}

.refresh-btn:hover {
  background: #e0e0e0;
  border-color: #bbb;
  transform: rotate(180deg);
}

#status-filter {
  padding: 8px 12px;
  border: 1px solid #ddd;
  border-radius: 6px;
  background: white;
  font-size: 14px;
  color: #333;
  cursor: pointer;
  min-width: 120px;
}

#status-filter:focus {
  outline: none;
  border-color: #0073aa;
  box-shadow: 0 0 0 2px rgba(0, 115, 170, 0.2);
}

.tests-content {
  padding: 0;
}

/* Dynamic Tests Table Styles */
.tests-table {
  width: 100%;
  border-collapse: collapse;
  display: table;
}

.test-row {
  display: table-row;
  border-bottom: 1px solid #f0f0f0;
  transition: all 0.3s ease;
}

.test-row:hover:not(.test-header-row) {
  background-color: #f8fbff;
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.test-header-row {
  background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
  font-weight: 600;
  color: #495057;
  position: sticky;
  top: 0;
  z-index: 10;
}

.test-cell {
  display: table-cell;
  padding: 16px 20px;
  vertical-align: middle;
  border-bottom: 1px solid #f0f0f0;
  font-size: 14px;
  line-height: 1.5;
}

.test-header-row .test-cell {
  font-weight: 600;
  color: #495057;
  border-bottom: 2px solid #dee2e6;
  text-transform: uppercase;
  font-size: 12px;
  letter-spacing: 0.5px;
}

/* Column Widths - Optimized */
.test-cell:nth-child(1) {
  width: 24%;
} /* Test Name - Wider */
.test-cell:nth-child(2) {
  width: 8%;
} /* Type - Narrower */
.test-cell:nth-child(3) {
  width: 8%;
} /* Status */
.test-cell:nth-child(4) {
  width: 8%;
} /* Views - Narrower */
.test-cell:nth-child(5) {
  width: 12%;
} /* Conversion Rate */
.test-cell:nth-child(6) {
  width: 12%;
} /* Created - Narrower */
.test-cell:nth-child(7) {
  width: 28%;
} /* Actions - Wider for buttons */

/* Test Name Cell with Word Wrapping */
.test-name-cell {
  font-weight: 600;
  color: #333;
  word-wrap: break-word;
  word-break: break-word;
  hyphens: auto;
  line-height: 1.4;
}

.test-description {
  font-size: 12px;
  color: #666;
  margin-top: 4px;
  opacity: 0.8;
  word-wrap: break-word;
  word-break: break-word;
  line-height: 1.3;
}

/* Type Badges */
.test-type-badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.test-type-badge.page {
  background: linear-gradient(135deg, #e3f2fd, #bbdefb);
  color: #1565c0;
  border-color: #2196f3;
}

.test-type-badge.segment {
  background: linear-gradient(135deg, #fce4ec, #f8bbd9);
  color: #ad1457;
  border-color: #e91e63;
}

.test-type-badge.price {
  background: linear-gradient(135deg, #fff3e0, #ffcc02);
  color: #e65100;
  border-color: #ff9800;
}

.test-type-badge.user-segments {
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  color: #6a1b9a;
  border-color: #9c27b0;
}

/* Status Badges */
.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border: 1px solid transparent;
}

.status-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: block;
}

.status-badge.active {
  background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
  color: #1b5e20;
  border-color: #4caf50;
}

.status-badge.active::before {
  background: #4caf50;
  animation: pulse 2s infinite;
}

.status-badge.running {
  background: linear-gradient(135deg, #e8f5e8, #c8e6c9);
  color: #1b5e20;
  border-color: #4caf50;
}

.status-badge.running::before {
  background: #4caf50;
  animation: pulse 2s infinite;
}

.status-badge.paused {
  background: linear-gradient(135deg, #fff3e0, #ffcc02);
  color: #e65100;
  border-color: #ff9800;
}

.status-badge.paused::before {
  background: #ff9800;
}

.status-badge.stopped {
  background: linear-gradient(135deg, #ffebee, #ffcdd2);
  color: #c62828;
  border-color: #f44336;
}

.status-badge.stopped::before {
  background: #f44336;
}

.status-badge.completed {
  background: linear-gradient(135deg, #f3e5f5, #e1bee7);
  color: #4a148c;
  border-color: #9c27b0;
}

.status-badge.completed::before {
  background: #9c27b0;
}

/* Views Counter */
.views-counter {
  font-weight: 600;
  color: #333;
}

.views-breakdown {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}

/* Conversion Rate */
.conversion-rate {
  font-weight: 600;
  color: #333;
}

.conversion-rate.positive {
  color: #2e7d32;
}

.conversion-rate.negative {
  color: #d32f2f;
}

.conversion-improvement {
  font-size: 11px;
  margin-top: 2px;
  font-weight: 500;
}

.conversion-improvement.positive {
  color: #2e7d32;
}

.conversion-improvement.negative {
  color: #d32f2f;
}

/* Date Display */
.test-date {
  color: #666;
  font-size: 12px;
  word-wrap: break-word;
  line-height: 1.3;
}

/* Action Buttons */
.action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: flex-start;
}

.action-btn {
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  padding: 6px 12px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-width: 60px;
  justify-content: center;
  white-space: nowrap;
}

.action-btn:hover {
  background: #e9ecef;
  border-color: #adb5bd;
  transform: translateY(-1px);
  text-decoration: none;
}

.action-btn.view {
  color: #0073aa;
  border-color: #0073aa;
  background: #f0f8ff;
}

.action-btn.view:hover {
  background: #0073aa;
  color: white;
}

.action-btn.edit {
  color: #28a745;
  border-color: #28a745;
  background: #f0fff4;
}

.action-btn.edit:hover {
  background: #28a745;
  color: white;
}

.action-btn.delete {
  color: #dc3545;
  border-color: #dc3545;
  background: #fff5f5;
}

.action-btn.delete:hover {
  background: #dc3545;
  color: white;
}

.action-btn.pause {
  color: #ffc107;
  border-color: #ffc107;
  background: #fffbf0;
}

.action-btn.pause:hover {
  background: #ffc107;
  color: #212529;
}

/* Loading State */
#tests-loading {
  text-align: center;
  padding: 60px 20px;
  color: #666;
  font-size: 16px;
}

#tests-loading .test-cell {
  border: none;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: loading 1.5s infinite;
  border-radius: 4px;
  height: 20px;
}

/* Empty State */
.tests-empty {
  text-align: center;
  padding: 60px 20px;
  color: #666;
}

.tests-empty h3 {
  color: #333;
  margin-bottom: 10px;
}

.tests-empty p {
  margin-bottom: 20px;
  line-height: 1.6;
}

/* Modal Styles */
.modal-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  z-index: 10000;
  animation: fadeIn 0.3s ease;
}

.modal-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: white;
  border-radius: 12px;
  width: 90%;
  max-width: 660px;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  animation: slideIn 0.3s ease;
}

.modal-header {
  padding: 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 24px;
  font-weight: 600;
  color: #333;
  margin: 0;
}

.close-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 8px;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.close-btn:hover {
  background: #f0f0f0;
  color: #333;
}

/* Test Details Modal */
.test-details-modal {
  max-width: 800px;
}

.modal-body {
  padding: 24px;
}

/* Test Categories (Test Selection Modal) */
.test-categories {
  padding: 24px;
}

.category-section {
  margin-bottom: 32px;
}

.category-title {
  font-size: 14px;
  font-weight: 600;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 16px;
}

.test-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.test-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 16px;
  border: 2px solid #e0e0e0;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  text-decoration: none;
  color: #333;
  background: white;
}

.test-option:hover:not(.disabled) {
  border-color: #0073aa;
  background: #f8fbff;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 115, 170, 0.15);
  text-decoration: none;
  color: #333;
}

.test-icon {
  font-size: 32px;
  margin-bottom: 12px;
}

.test-name {
  font-size: 16px;
  font-weight: 500;
  margin-bottom: 4px;
  text-align: center;
}

.test-option .test-description {
  font-size: 12px;
  color: #666;
  text-align: center;
  line-height: 1.4;
}

.test-option.disabled {
  opacity: 0.5;
  cursor: not-allowed;
  background: #f8f9fa;
}

.test-option.disabled:hover {
  transform: none;
  border-color: #e0e0e0;
  background: #f8f9fa;
  box-shadow: none;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translate(-50%, -60%);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%);
  }
}

@keyframes pulse {
  0% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
  100% {
    opacity: 1;
  }
}

@keyframes loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Individual Test Page Common Styles */
.test-page {
  display: none;
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.test-page-header {
  padding: 20px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-btn {
  background: #f0f0f0;
  border: 1px solid #ddd;
  padding: 8px 16px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  color: #333;
  transition: all 0.2s ease;
}

.back-btn:hover {
  background: #e0e0e0;
  transform: translateX(-2px);
}

.test-page-content {
  padding: 40px;
  text-align: center;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .test-cell:nth-child(1) {
    width: 30%;
  }
  .test-cell:nth-child(2) {
    width: 15%;
  }
  .test-cell:nth-child(3) {
    width: 15%;
  }
  .test-cell:nth-child(4) {
    width: 40%;
  }

  .test-cell:nth-child(5),
  .test-cell:nth-child(6) {
    display: none;
  }
}

@media (max-width: 768px) {
  .causalfunnel-header {
    flex-direction: column;
    gap: 15px;
  }

  .header-left {
    flex-direction: column;
    gap: 10px;
    align-items: stretch;
  }

  .header-right {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
  }

  .quota-section-inline {
    justify-content: center;
  }

  .quota-bar-inline {
    width: 200px;
  }

  .tests-header {
    flex-direction: column;
    gap: 15px;
    align-items: stretch;
  }

  .header-actions {
    justify-content: space-between;
  }

  /* Mobile Table Layout */
  .tests-table {
    display: block;
  }

  .test-header-row {
    display: none;
  }

  .test-row {
    display: block;
    margin-bottom: 16px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    background: white;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  }

  .test-row:hover {
    transform: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  }

  .test-cell {
    display: block;
    padding: 8px 0;
    border-bottom: none;
    width: 100% !important;
  }

  .test-cell:before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: #666;
    display: inline-block;
    width: 120px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
  }

  .action-buttons {
    margin-top: 8px;
    flex-direction: row;
    gap: 8px;
    flex-wrap: wrap;
  }

  .action-btn {
    flex: 1;
    justify-content: center;
    min-width: 70px;
  }

  .modal-content {
    width: 95%;
    margin: 20px;
    max-height: 90vh;
  }

  .test-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .causalfunnel-container {
    padding: 10px;
  }

  .causalfunnel-header {
    padding: 15px;
  }

  .causalfunnel-title {
    font-size: 24px;
  }

  .test-row {
    padding: 12px;
  }

  .action-buttons {
    flex-direction: column;
    gap: 6px;
  }

  .action-btn {
    width: 100%;
  }
}

/* -------------- */
/* Test Details Modal Styles - Fixed Positioning */
.modal-overlay {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  background: rgba(0, 0, 0, 0.6) !important;
  backdrop-filter: blur(4px);
  display: none;
  justify-content: center !important;
  align-items: center !important;
  z-index: 999999 !important;
  animation: fadeIn 0.3s ease-out;
  margin: 0 !important;
  padding: 0 !important;
  transform: none !important;
  box-sizing: border-box;
}

.modal-overlay.show {
  display: flex;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  background: #ffffff !important;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
  max-width: 660px;
  width: 90%;
  max-height: 90vh;
  overflow: hidden;
  transform: scale(0.95);
  animation: modalSlide 0.3s ease-out forwards;
  border: 1px solid #e5e7eb;
  position: relative !important;
  margin: auto !important;
  /* top: auto !important; */
  top: 10% !important;
  left: auto !important;
  right: auto !important;
  bottom: auto !important;
}

@keyframes modalSlide {
  to {
    transform: scale(1);
  }
}

.test-details-modal {
  max-width: 1000px;
}

.modal-header {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  padding: 24px 30px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: none;
}

.modal-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
  color: white;
}

.close-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: white;
  font-size: 28px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  backdrop-filter: blur(10px);
}

.close-btn:hover {
  background: rgba(255, 255, 255, 0.3);
  transform: rotate(90deg);
}

.modal-body {
  padding: 30px;
  overflow-y: auto;
  max-height: calc(90vh - 120px);
}

/* Test Details Grid */
.test-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  margin-bottom: 20px;
}

.test-info-section,
.test-results-section {
  background: #f8fafc;
  border-radius: 12px;
  padding: 24px;
  border: 1px solid #e2e8f0;
}

.test-actions-section {
  grid-column: 1 / -1;
  background: #ffffff;
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
}

.test-info-section h3,
.test-results-section h3,
.test-actions-section h3 {
  margin: 0 0 20px 0;
  font-size: 20px;
  font-weight: 600;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.test-info-section h3:before {
  content: "ℹ️";
}

.test-results-section h3:before {
  content: "📊";
}

.test-actions-section h3:before {
  content: "⚡";
}

.test-info-section p {
  margin: 12px 0;
  font-size: 15px;
  line-height: 1.6;
  color: #374151;
}

.test-info-section strong {
  color: #111827;
  font-weight: 600;
}

/* Status Badge in Modal */
.test-info-section .status-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.status-badge.active {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.status-badge.paused {
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fde68a;
}

.status-badge.stopped {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* Results Comparison */
.results-comparison {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

.variant-result {
  background: white;
  border-radius: 12px;
  padding: 20px;
  border: 2px solid #e5e7eb;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.variant-result:before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #3b82f6, #8b5cf6);
}

.variant-result:nth-child(2):before {
  background: linear-gradient(90deg, #10b981, #06b6d4);
}

.variant-result:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  border-color: #d1d5db;
}

.variant-result h4 {
  margin: 0 0 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: #1f2937;
  display: flex;
  align-items: center;
  gap: 8px;
}

.variant-result h4:before {
  content: "🅰️";
}

.variant-result:nth-child(2) h4:before {
  content: "🅱️";
}

.variant-result p {
  margin: 10px 0;
  font-size: 15px;
  color: #6b7280;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.variant-result p strong {
  color: #111827;
  font-weight: 700;
  font-size: 18px;
}

.preview-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  padding: 8px 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-decoration: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.3s ease;
  box-shadow: 0 2px 4px rgba(102, 126, 234, 0.3);
}

.preview-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
  color: white;
  text-decoration: none;
}

/* Modal Actions */
.modal-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-primary,
.btn-secondary,
.btn-danger {
  padding: 12px 24px;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 120px;
  justify-content: center;
}

.btn-primary {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.4);
}

.btn-secondary {
  background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3);
}

.btn-secondary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(245, 158, 11, 0.4);
}

.btn-danger {
  background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
  color: white;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(239, 68, 68, 0.4);
}

/* Responsive Design */
@media (max-width: 768px) {
  .modal-content {
    width: 95%;
    margin: 20px;
    max-height: calc(100vh - 40px);
  }

  .modal-header {
    padding: 20px;
  }

  .modal-title {
    font-size: 20px;
  }

  .modal-body {
    padding: 20px;
  }

  .test-details-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .results-comparison {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column;
  }

  .btn-primary,
  .btn-secondary,
  .btn-danger {
    width: 100%;
  }
}

/* Loading Animation */
.modal-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 60px;
  color: #6b7280;
}

.modal-loading:before {
  content: "";
  width: 40px;
  height: 40px;
  border: 4px solid #e5e7eb;
  border-top: 4px solid #667eea;
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin-right: 16px;
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
