/* ========== Stripe-Inspired Theme — Visual Overrides Only ========== */
/* NO spacing, NO fonts, NO layout changes. Only colors, borders, shadows, radius. */

:root {
  /* Background */
  --bg: #F6F9FC;

  /* Borders — Stripe blue-gray */
  --border: #e7ecf1;

  /* Accent — Stripe purple */
  --accent: #635BFF;

  /* Stripe gradient */
  --stripe-gradient: linear-gradient(90deg, #FF6118, #FB76FA, #635BFF);

  /* Radius — slightly tighter */
  --radius: 12px;
  --radius-sm: 10px;
}

/* ========== CARDS — White, crisp border, Stripe shadow ========== */
.card {
  background: #fff;
  border: 1px solid #e7ecf1;
  border-radius: 12px;
  box-shadow: 0 6px 20px rgba(50,50,93,0.08), 0 2px 6px rgba(0,0,0,0.03);
}

.card:hover {
  box-shadow: 0 13px 40px rgba(50,50,93,0.12), 0 3px 10px rgba(0,0,0,0.05);
  border-color: #d8dfe8;
}

/* ========== MINI CARDS ========== */
.mini-card {
  background: #fff;
  border: 1px solid #e7ecf1;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(50,50,93,0.06);
}

/* ========== HEADER — Clean frosted ========== */
.header {
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid #e7ecf1;
}

/* ========== TABS — Stripe style ========== */
.tabs {
  background: #f6f8fb;
  border: 1px solid #e7ecf1;
}

.tab.active {
  background: #fff;
  color: var(--accent);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(50,50,93,0.08);
}

/* ========== LANG BUTTONS ========== */
.lang-btn {
  background: #fff;
  border-color: #e7ecf1;
}

.lang-btn.active {
  background: var(--accent);
  border-color: var(--accent);
}

/* ========== BUTTONS — Stripe purple ========== */
.btn-primary {
  background: var(--accent);
  box-shadow: 0 4px 14px rgba(99,91,255,0.25), 0 1px 3px rgba(0,0,0,0.08);
  transition: all 0.25s cubic-bezier(.45,.05,.55,.95);
}

.btn-primary:hover {
  background: #7A73FF;
  box-shadow: 0 7px 24px rgba(99,91,255,0.35), 0 2px 6px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.btn-primary:active {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(99,91,255,0.20);
}

/* ========== CHART — Clean container ========== */
.chart-wrap {
  background: #f9fafb;
  border: 1px solid #e7ecf1;
}

/* ========== TABLE — Stripe dashed borders ========== */
.data-table th {
  background: rgba(255,255,255,0.5);
  border-bottom: 2px solid #e5edf5;
}

.data-table td {
  border-bottom: 1px dashed #e5edf5;
}

.data-table tr:hover {
  background: rgba(99,91,255,0.03);
}

/* ========== AVOID BOX — Clean, no pink bg ========== */
.avoid-box {
  background: #fff;
  border: 1px solid #e7ecf1;
  border-left: 3px solid var(--expensive);
}

/* ========== WEATHER ========== */
.weather-mini {
  background: #fff;
  border: 1px solid #e7ecf1;
}

/* ========== TREND CHIP ========== */
.trend-chip {
  background: #f6f8fb;
  border: 1px solid #e7ecf1;
}

/* ========== FORM INPUTS ========== */
.calc-form select,
.calc-form input {
  background: #fff;
  border: 1px solid #e7ecf1;
}

.calc-form select:focus,
.calc-form input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(99,91,255,0.10);
}

.calc-result {
  background: #f6f8fb;
  border: 1px solid #e7ecf1;
}

/* ========== SAVINGS CHART ========== */
.savings-chart {
  background: #f9fafb;
  border: 1px solid #e7ecf1;
}

/* ========== TIP TILES ========== */
.tip-tile {
  background: #f6f8fb;
  border: 1px solid #e7ecf1;
}

/* ========== FAQ ========== */
.faq-item {
  background: #fff;
  border: 1px solid #e7ecf1;
}

.faq-item:hover {
  border-color: rgba(99,91,255,0.15);
}

.faq-item[open] {
  border-color: rgba(99,91,255,0.20);
}

/* ========== FOOTER — Dark gradient + white logo ========== */
.site-footer {
  background: linear-gradient(180deg, #18122E 0%, #0E0A1C 100%);
}

.footer-logo-img {
  filter: brightness(0) invert(1);
}

.footer-logo-mark {
  background: rgba(99,91,255,0.15);
  border-color: rgba(99,91,255,0.30);
}

.live-dot {
  background: var(--accent);
  box-shadow: 0 0 8px rgba(99,91,255,0.40);
}

.trust-item {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.trust-item:hover {
  background: rgba(255,255,255,0.06);
}

.footer-links a:hover {
  color: #B4A3FF;
}

.footer-cta {
  background: linear-gradient(135deg, rgba(99,91,255,0.08), rgba(0,184,217,0.06));
  border-color: rgba(99,91,255,0.15);
}

/* ========== FOCUS RING ========== */
:where(a,button,input,select,textarea,[tabindex]):focus-visible {
  box-shadow: 0 0 0 3px rgba(99,91,255,0.20);
}

/* ========== DROPDOWN MENU ========== */
.tab-dropdown-menu {
  background: rgba(255,255,255,0.95);
  border: 1px solid #e7ecf1;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(50,50,93,0.18);
}

/* ========== VOLATILITY METER (missing from some minified CSS) ========== */
.vol-meter { margin-top: 12px; }
.vol-meter-track {
  height: 8px;
  background: rgba(0,0,0,0.08);
  border-radius: 999px;
  overflow: hidden;
}
.vol-meter-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #22c55e 0%, #f59e0b 55%, #ef4444 100%);
  transition: width 0.25s ease;
}
.vol-meter-labels {
  margin-top: 6px;
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: var(--text-muted);
}
.vol-hint {
  margin-top: 10px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* ========== TABLE SPACING after charts ========== */
.chart-wrap + .table-wrap,
.chart-x + .table-wrap {
  margin-top: 20px;
}

/* ========== CHART LEGEND & STATS (missing from some minified CSS) ========== */
.chart-legend {
  display: flex;
  gap: 10px;
  justify-content: center;
  margin-top: 24px;
}
.legend-pill {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 850;
  border: 1px solid rgba(0,0,0,0.08);
  background: rgba(255,255,255,0.75);
}
.legend-pill.cheap {
  color: rgba(6,95,70,0.95);
  border-color: rgba(34,197,94,0.22);
  background: rgba(34,197,94,0.10);
}
.legend-pill.ok {
  color: rgba(120,53,15,0.95);
  border-color: rgba(245,158,11,0.22);
  background: rgba(245,158,11,0.10);
}
.legend-pill.avoid {
  color: rgba(127,29,29,0.95);
  border-color: rgba(239,68,68,0.20);
  background: rgba(239,68,68,0.08);
}
.chart-stats {
  margin-top: 10px;
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  color: rgba(0,0,0,0.65);
  font-size: 13px;
}
.chart-stat strong { color: rgba(0,0,0,0.85); }

/* ========== COOKIE BANNER — Stripe purple theme ========== */
#cookie-consent-banner {
  border-color: #e7ecf1 !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 60px rgba(50,50,93,0.18) !important;
}

#cookie-consent-banner > div:first-child {
  background: var(--stripe-gradient) !important;
}

#cookie-consent-banner button[data-consent="accept"] {
  background: #635BFF !important;
  border-radius: 8px !important;
}

#cookie-consent-banner button[data-consent="reject"] {
  border-color: #e7ecf1 !important;
  border-radius: 8px !important;
}

/* ========== DROPDOWN ARROWS — remove duplicate ========== */
.tabs .tab-dropdown .dd-arrow::before {
  content: none !important;
}

/* ========== NAV TABS — readable size ========== */
.tab {
  font-size: 12px !important;
  font-weight: 600 !important;
}

/* ========== EXPAND BUTTONS — smaller arrows ========== */
.expand-btn {
  width: 12px;
  height: 12px;
  font-size: 9px;
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: rgba(0,0,0,0.02); }
::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.12); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: rgba(0,0,0,0.20); }

/* ========== DROPDOWN CLOSE ON CLICK OUTSIDE (injected via JS below) ========== */

/* ========== ACCENT BARS — Top row first two cards ========== */
.page > .grid-row:first-child > .card,
.container > .grid-row:first-child > .card,
.provider-dashboard > .card {
  overflow: hidden;
  position: relative;
}

/* First card — Stripe gradient bar */
.page > .grid-row:first-child > .card:first-child::before,
.container > .grid-row:first-child > .card:first-child::before,
.provider-dashboard > .card:first-child::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--stripe-gradient);
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: 2;
}

/* Second card — cyan-purple gradient bar */
.page > .grid-row:first-child > .card:nth-child(2)::before,
.container > .grid-row:first-child > .card:nth-child(2)::before,
.provider-dashboard > .card:nth-child(2)::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, #00B8D9, #635BFF);
  border-radius: var(--radius) var(--radius) 0 0;
  z-index: 2;
}

/* ========== SVG CHART OVERLAY ========== */
.chart-svg-overlay {
  position: absolute;
  left: 52px; right: 10px; top: 14px; bottom: 30px;
  z-index: 3;
  pointer-events: none;
  overflow: visible;
}

.chart-svg-overlay path:first-of-type {
  opacity: 0;
  animation: areaFade 0.8s ease 0.6s forwards;
}

@keyframes areaFade { to { opacity: 1; } }

/* Make bars subtle behind the SVG line */
.stripe-chart .chart-bar { opacity: 0.25; }
.stripe-chart .chart-bar:hover { opacity: 0.5; }
.stripe-chart .chart-bar.now { opacity: 0.45; box-shadow: none; }

/* Provider charts — modern bar style (no SVG line, just cleaner bars) */
#page-provider .chart-bar { border-radius: 6px 6px 2px 2px; }
#page-provider .chart-bar.cheap { background: linear-gradient(180deg, #34C77B 0%, rgba(52,199,123,0.5) 100%); }
#page-provider .chart-bar.normal { background: linear-gradient(180deg, #F0A030 0%, rgba(240,160,48,0.5) 100%); }
#page-provider .chart-bar.expensive { background: linear-gradient(180deg, #EF4444 0%, rgba(239,68,68,0.5) 100%); }
#page-provider .chart-bar:hover { opacity: 0.85; transform: scaleY(1.03); transform-origin: bottom; }
#page-provider .chart-bar.now { box-shadow: 0 0 10px rgba(99,91,255,0.3); }

/* Savings mini SVG chart */
.savings-spark-svg { height: 96px; margin-bottom: 4px; }
.savings-spark-svg svg { width: 100%; height: 100%; border-radius: 6px; }

/* ========== HERO PRICE — Gradient text ========== */
.price__value {
  background: linear-gradient(135deg, #0F172A 30%, #635BFF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
