/* ============================================================
   WoxomQuote Theme System — Light + Dark
   Two themes only. Light is default.
   ============================================================ */

/* --- Light Theme (default) --- */
:root,
[data-theme="light"] {
  /* Core surfaces */
  --bg: #EFF3F8;
  --surface: #FFFFFF;
  --surface-elevated: #F8FBFE;
  --surface-subtle: #E8EFF6;
  --primary: #1F5F93;
  --primary-hover: #184B74;
  --primary-light: rgba(31, 95, 147, 0.10);
  --primary-strong: #123756;
  --hero-glow: rgba(31, 95, 147, 0.12);

  /* Text */
  --text: #1A1D23;
  --text-secondary: #516071;
  --text-muted: #6C7C8E;

  /* Borders */
  --border: #D5DFEA;
  --border-light: #E9EFF5;
  --border-strong: #B8C9D8;

  /* Inputs */
  --input-bg: #FFFFFF;
  --input-border: #C4D1DD;

  /* Status */
  --success: #16A34A;
  --success-bg: rgba(22, 163, 74, 0.08);
  --warning: #D97706;
  --warning-bg: rgba(217, 119, 6, 0.08);
  --error: #DC2626;
  --error-bg: rgba(220, 38, 38, 0.08);
  --info-bg: rgba(54, 171, 224, 0.08);

  /* Overlay & shadows */
  --overlay: rgba(0, 0, 0, 0.4);
  --shadow-sm: 0 8px 24px rgba(17, 35, 56, 0.06);
  --shadow-md: 0 18px 44px rgba(17, 35, 56, 0.10);
  --shadow-lg: 0 28px 72px rgba(17, 35, 56, 0.16);

  /* Border radius */
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;

  /* Focus ring */
  --focus-ring: rgba(54, 171, 224, 0.3);

  /* Carrier stripe colors (brand-accurate) */
  --carrier-cigna: #0072C6;       /* Cigna blue */
  --carrier-ngah: #E87722;        /* Allstate Health orange */
  --carrier-cms: #0071BC;         /* HealthCare.gov blue (fallback) */
  --carrier-pivot: #00A1DE;       /* Pivot Health teal */
  --carrier-uhone: #002677;       /* UnitedHealthcare navy */
  --carrier-manhattan: #003366;   /* Manhattan Life navy */
  --carrier-flex: #F59E0B;        /* Flex Benefits amber */
  --carrier-lifex: #36ABE0;       /* LifeX/Woxom blue */
  --carrier-ironhealth: #1E3A5F;  /* Iron Health dark blue */
  /* ACA Marketplace carriers */
  --carrier-bcbs: #005EB8;        /* Blue Cross Blue Shield / Anthem / Regence / Premera / Highmark */
  --carrier-ambetter: #E91E8C;    /* Ambetter pink */
  --carrier-oscar: #0066FF;       /* Oscar Health "Hot Blue" */
  --carrier-molina: #009CA6;      /* Molina Healthcare teal */
  --carrier-aetna: #7D3F98;       /* Aetna / CVS Health purple */
  --carrier-humana: #5BA908;      /* Humana green */
  --carrier-kaiser: #004D8B;      /* Kaiser Permanente blue */
  --carrier-caresource: #E35205;  /* CareSource orange */
  --carrier-medica: #0072CE;      /* Medica blue */
  --carrier-healthpartners: #007A33; /* HealthPartners green */
  --carrier-priority: #003DA5;    /* Priority Health blue */
  --carrier-providence: #6B2D5B;  /* Providence purple */
  --carrier-quartz: #00A9A5;      /* Quartz teal */
  --carrier-selecthealth: #003366; /* SelectHealth navy */
  --carrier-pacificsource: #4A7729; /* PacificSource green */
  --carrier-avmed: #F37021;       /* AvMed orange */
  --carrier-harvardpilgrim: #003DA5; /* Harvard Pilgrim blue */
  --carrier-wellsense: #00A3E0;   /* WellSense teal */
  --carrier-christus: #8B1538;    /* CHRISTUS maroon */
  --carrier-community: #0072CE;   /* Community Health blue */
}

/* --- Dark Theme --- */
[data-theme="dark"] {
  /* Core surfaces */
  --bg: #0B1320;
  --surface: #111C2C;
  --surface-elevated: #172638;
  --surface-subtle: #0E1725;
  --primary: #6CA7D3;
  --primary-hover: #90BCDF;
  --primary-light: rgba(108, 167, 211, 0.16);
  --primary-strong: #D6E7F5;
  --hero-glow: rgba(108, 167, 211, 0.14);

  /* Text */
  --text: #EDF3F9;
  --text-secondary: #B2C1D0;
  --text-muted: #89A0B5;

  /* Borders */
  --border: #243347;
  --border-light: #172333;
  --border-strong: #34506A;

  /* Inputs */
  --input-bg: #0E1725;
  --input-border: #2A4158;

  /* Status */
  --success: #22C55E;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warning: #F59E0B;
  --warning-bg: rgba(245, 158, 11, 0.12);
  --error: #EF4444;
  --error-bg: rgba(239, 68, 68, 0.12);
  --info-bg: rgba(91, 192, 235, 0.12);

  /* Overlay & shadows */
  --overlay: rgba(0, 0, 0, 0.6);
  --shadow-sm: 0 10px 28px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 20px 56px rgba(0, 0, 0, 0.32);
  --shadow-lg: 0 32px 80px rgba(0, 0, 0, 0.42);

  /* Focus ring */
  --focus-ring: rgba(91, 192, 235, 0.4);
}

/* --- Smooth theme transitions (respects reduced-motion) --- */
@media (prefers-reduced-motion: no-preference) {
  *,
  *::before,
  *::after {
    transition: background-color 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  }
}

/* Disable transitions during print */
@media print {
  *,
  *::before,
  *::after {
    transition: none !important;
  }
}

/* Disable transitions for animated/spinner elements */
.spinner,
.spinner *,
.loading-spinner,
[class*="animate-"] {
  transition: none !important;
}

/* --- Theme toggle button --- */
#theme-toggle {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  width: 46px;
  height: 46px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(16px);
}

#theme-toggle:hover {
  background: var(--primary-light);
  box-shadow: var(--shadow-lg);
}

#theme-toggle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
