/* Custom CSS for Enhanced UX */
:root {
  /* Primary Color Palette */
  --primary: 210 86% 45%; /* #1C5AA0 */
  --primary-dark: 210 86% 35%; /* #145080 */
  --primary-light: 210 86% 55%; /* #2364B0 */

  /* Secondary Colors */
  --secondary: 142 52% 45%; /* #37A75B */
  --secondary-dark: 142 52% 35%; /* #2B8549 */
  --secondary-light: 142 52% 55%; /* #43B967 */

  /* Neutral Colors */
  --background: 210 11% 98%; /* #F5F7FA */
  --surface: 0 0% 100%; /* #FFFFFF */
  --surface-alt: 210 11% 95%; /* #EAECF0 */
  --border: 210 11% 85%; /* #D1D5DB */
  --text: 210 11% 15%; /* #1F2937 */
  --text-muted: 210 11% 45%; /* #6B7280 */

  /* Status Colors */
  --success: 142 71% 45%; /* #059669 */
  --warning: 45 93% 47%; /* #D97706 */
  --error: 0 84% 60%; /* #DC2626 */
  --info: 210 86% 45%; /* #1C5AA0 */

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
  --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
  --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
  --radius-xl: 1rem;
}

/* Base Styles */
body {
  background-color: hsl(var(--background));
  color: hsl(var(--text));
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
}

/* Home Page Option Cards */
.option-card {
  transition: all 0.3s ease;
  border: 2px solid transparent;
  position: relative;
  overflow: hidden;
}

.option-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.facility-option:hover {
  border-color: hsl(var(--primary));
  background: linear-gradient(135deg, rgba(28, 90, 160, 0.05) 0%, rgba(28, 90, 160, 0.02) 100%);
}

.ambassador-option:hover {
  border-color: hsl(var(--secondary));
  background: linear-gradient(135deg, rgba(55, 167, 91, 0.05) 0%, rgba(55, 167, 91, 0.02) 100%);
}

.option-card .card-body {
  position: relative;
  z-index: 2;
}

.option-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, hsl(var(--primary)) 0%, hsl(var(--secondary)) 100%);
  transform: scaleX(0);
  transition: transform 0.3s ease;
}

.option-card:hover::before {
  transform: scaleX(1);
}

.facility-option::before {
  background: hsl(var(--primary));
}

.ambassador-option::before {
  background: hsl(var(--secondary));
}

/* Custom Button Styles */
.btn-primary {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  color: white;
  font-weight: 500;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease-in-out;
}

.btn-primary:hover {
  background-color: hsl(var(--primary-dark));
  border-color: hsl(var(--primary-dark));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background-color: hsl(var(--secondary));
  border-color: hsl(var(--secondary));
  color: white;
  font-weight: 500;
  border-radius: var(--radius-md);
  padding: 0.75rem 1.5rem;
  transition: all 0.2s ease-in-out;
}

.btn-secondary:hover {
  background-color: hsl(var(--secondary-dark));
  border-color: hsl(var(--secondary-dark));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn-outline-primary {
  color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  border-radius: var(--radius-md);
  font-weight: 500;
  transition: all 0.2s ease-in-out;
}

.btn-outline-primary:hover {
  background-color: hsl(var(--primary));
  border-color: hsl(var(--primary));
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

/* Card Styles */
.card {
  background-color: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease-in-out;
}

.card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.card-header {
  background-color: hsl(var(--surface-alt));
  border-bottom: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  font-weight: 600;
  color: hsl(var(--text));
}

/* Form Styles */
.form-control {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 0.75rem;
  transition: all 0.2s ease-in-out;
  background-color: hsl(var(--surface));
}

.form-control:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 0.2rem hsl(var(--primary) / 0.25);
  background-color: hsl(var(--surface));
}

.form-label {
  font-weight: 500;
  color: hsl(var(--text));
  margin-bottom: 0.5rem;
}

.form-select {
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  padding: 0.75rem;
  background-color: hsl(var(--surface));
}

.form-select:focus {
  border-color: hsl(var(--primary));
  box-shadow: 0 0 0 0.2rem hsl(var(--primary) / 0.25);
}

/* Progress Bar Styles */
.progress-container {
  background-color: hsl(var(--surface-alt));
  border-radius: var(--radius-lg);
  padding: 1rem;
  margin-bottom: 2rem;
}

.progress-step {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.progress-step:last-child {
  margin-bottom: 0;
}

.step-indicator {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
}

.step-indicator.active {
  background-color: hsl(var(--primary));
  color: white;
}

.step-indicator.completed {
  background-color: hsl(var(--success));
  color: white;
}

.step-indicator.pending {
  background-color: hsl(var(--border));
  color: hsl(var(--text-muted));
}

.step-title {
  font-weight: 500;
  color: hsl(var(--text));
}

.step-description {
  font-size: 0.875rem;
  color: hsl(var(--text-muted));
}

/* Help Tooltip Styles */
.help-tooltip {
  position: relative;
  display: inline-block;
  margin-left: 0.5rem;
}

.help-tooltip .tooltip-trigger {
  color: hsl(var(--primary));
  cursor: help;
  font-size: 1rem;
}

.help-tooltip .tooltip-content {
  visibility: hidden;
  width: 250px;
  background-color: hsl(var(--text));
  color: white;
  text-align: left;
  border-radius: var(--radius-md);
  padding: 0.75rem;
  position: absolute;
  z-index: 1000;
  bottom: 125%;
  left: 50%;
  margin-left: -125px;
  opacity: 0;
  transition: opacity 0.3s;
  font-size: 0.875rem;
  line-height: 1.4;
  box-shadow: var(--shadow-lg);
}

.help-tooltip .tooltip-content::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border-width: 5px;
  border-style: solid;
  border-color: hsl(var(--text)) transparent transparent transparent;
}

.help-tooltip:hover .tooltip-content {
  visibility: visible;
  opacity: 1;
}

/* Alert Styles */
.alert {
  border-radius: var(--radius-md);
  border: 1px solid;
  padding: 1rem;
  margin-bottom: 1rem;
}

.alert-success {
  background-color: hsl(var(--success) / 0.1);
  border-color: hsl(var(--success) / 0.3);
  color: hsl(var(--success));
}

.alert-warning {
  background-color: hsl(var(--warning) / 0.1);
  border-color: hsl(var(--warning) / 0.3);
  color: hsl(var(--warning));
}

.alert-danger {
  background-color: hsl(var(--error) / 0.1);
  border-color: hsl(var(--error) / 0.3);
  color: hsl(var(--error));
}

.alert-info {
  background-color: hsl(var(--info) / 0.1);
  border-color: hsl(var(--info) / 0.3);
  color: hsl(var(--info));
}

/* Navigation Styles */
.navbar {
  background-color: hsl(var(--surface));
  border-bottom: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-sm);
}

.navbar-brand {
  font-weight: 700;
  color: hsl(var(--primary));
  font-size: 1.5rem;
}

.nav-link {
  color: hsl(var(--text));
  font-weight: 500;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  transition: all 0.2s ease-in-out;
}

.nav-link:hover {
  color: hsl(var(--primary));
  background-color: hsl(var(--primary) / 0.1);
}

/* Hero Section */
.hero-section {
  background: linear-gradient(135deg, hsl(var(--primary) / 0.95), hsl(var(--primary-dark) / 0.95));
  color: white;
  padding: 4rem 0;
  margin-bottom: 3rem;
}

.hero-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: 1.25rem;
  opacity: 0.9;
  margin-bottom: 2rem;
}

/* FAQ Styles */
.faq-item {
  background-color: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-md);
  margin-bottom: 1rem;
  overflow: hidden;
}

.faq-question {
  padding: 1rem;
  background-color: hsl(var(--surface-alt));
  border-bottom: 1px solid hsl(var(--border));
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease-in-out;
}

.faq-question:hover {
  background-color: hsl(var(--primary) / 0.1);
}

.faq-answer {
  padding: 1rem;
  display: none;
}

.faq-answer.show {
  display: block;
}

/* QR Code Styles */
.qr-container {
  text-align: center;
  padding: 2rem;
  background-color: hsl(var(--surface));
  border-radius: var(--radius-lg);
  border: 1px solid hsl(var(--border));
  box-shadow: var(--shadow-md);
}

.qr-code {
  display: inline-block;
  padding: 1rem;
  background-color: white;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin: 1rem 0;
}

/* Statistics Dashboard */
.stat-card {
  background-color: hsl(var(--surface));
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  text-align: center;
  transition: all 0.2s ease-in-out;
}

.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.stat-number {
  font-size: 2.5rem;
  font-weight: 700;
  color: hsl(var(--primary));
  margin-bottom: 0.5rem;
}

.stat-label {
  font-size: 0.875rem;
  color: hsl(var(--text-muted));
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Animation Classes */
.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.slide-in {
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateX(-20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-title {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .btn {
    width: 100%;
    margin-bottom: 0.5rem;
  }

  .card {
    margin-bottom: 1rem;
  }

  .help-tooltip .tooltip-content {
    width: 200px;
    margin-left: -100px;
  }
}

/* Loading States */
.loading {
  opacity: 0.6;
  pointer-events: none;
}

.spinner {
  border: 2px solid hsl(var(--border));
  border-top: 2px solid hsl(var(--primary));
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 1s linear infinite;
  display: inline-block;
  margin-right: 0.5rem;
}

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

/* Accessibility Improvements */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Focus Styles */
.btn:focus,
.form-control:focus,
.form-select:focus {
  outline: 2px solid hsl(var(--primary));
  outline-offset: 2px;
}

/* Table Text Visibility Fixes */
.table,
.comparison-table,
.improved-marketing-table,
.linktree-comparison-table {
  color: hsl(var(--text)) !important;
}

.table td,
.table th,
.comparison-table td,
.comparison-table th,
.improved-marketing-table td,
.improved-marketing-table th,
.linktree-comparison-table td,
.linktree-comparison-table th {
  color: hsl(var(--text)) !important;
}

/* Ensure text is visible on all table variants */
.table tbody td,
.comparison-table tbody td,
.improved-marketing-table tbody td,
.linktree-comparison-table tbody td {
  color: #333 !important;
  background-color: transparent;
}

/* Fix specific table header text */
.table thead th,
.comparison-table thead th,
.improved-marketing-table thead th,
.linktree-comparison-table thead th {
  color: white !important;
}

/* Ensure dark text for regular table cells */
.table-light td,
.table-light th {
  color: #333 !important;
}

/* Fix striped table rows */
.table-striped tbody tr:nth-of-type(odd) td {
  color: #333 !important;
}

.table-striped tbody tr:nth-of-type(even) td {
  color: #333 !important;
}

/* Ensure marketing comparison table text is visible */
.improved-marketing-table .text-warning,
.improved-marketing-table .text-success,
.improved-marketing-table .text-danger,
.improved-marketing-table .text-info {
  font-weight: 600 !important;
}

.improved-marketing-table tbody tr td {
  color: #2c3e50 !important;
}

/* Platform comparison table fixes */
.buzzing-cell {
  color: #e65100 !important;
}

.check-yes,
.check-no,
.check-partial {
  font-weight: bold !important;
}

/* Linktree comparison table fixes */
.linktree-status-yes,
.linktree-status-no,
.linktree-status-partial {
  font-weight: 600 !important;
}

/* Claude theme table overrides */
.claude-theme .table,
.claude-theme .comparison-table,
.claude-theme .improved-marketing-table,
.claude-theme .linktree-comparison-table {
  color: var(--claude-text) !important;
}

.claude-theme .table td,
.claude-theme .table th,
.claude-theme .comparison-table td,
.claude-theme .comparison-table th {
  color: var(--claude-text) !important;
}

.claude-theme .table thead th,
.claude-theme .comparison-table thead th {
  color: white !important;
}

/* Print Styles */
@media print {
  .navbar,
  .btn,
  .help-tooltip {
    display: none;
  }

  .card {
    break-inside: avoid;
    box-shadow: none;
    border: 1px solid #000;
  }

  /* Ensure printed tables are readable */
  .table,
  .comparison-table,
  .improved-marketing-table,
  .linktree-comparison-table {
    color: black !important;
  }

  .table td,
  .table th,
  .comparison-table td,
  .comparison-table th {
    color: black !important;
  }
}

/* Lighten-only background overlay (doesn't affect text) */
.lighten-10 {
  position: relative;
  isolation: isolate; /* Keep overlay within this block */
}
.lighten-10::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.10); /* ≈ 10% lighter */
  pointer-events: none;
  z-index: 0;
  border-radius: inherit; /* if the block is rounded */
}
/* Ensure the content sits above the overlay */
.lighten-10 > * {
  position: relative;
  z-index: 1;
}
