/*
 * AwardWise design tokens — the single source of truth for color, type, and
 * spacing across the app. Seeded from the existing hardcoded palette so this is
 * a refactor, not a re-theme: the dark values match the live app 1:1
 * (#5aa8ff blue, #0b1220 ground, the traffic-light + gold best-deal hexes that
 * were previously inline in flight-table.js).
 *
 * Loaded FIRST (before every other stylesheet) so all sheets can reference it.
 * Everything is prefixed --aw- to avoid collisions. Dark is the app default;
 * the [data-theme="light"] block is ready for a future light mode but nothing
 * toggles it yet.
 */
:root {
  /* grounds & surfaces */
  --aw-ground: #0b1220;
  --aw-ground-2: #0f1724;
  --aw-rail: #0d1522;
  --aw-surface: #15212e;
  --aw-elevated: #20313c;
  --aw-hairline: rgba(122, 143, 168, 0.18);
  --aw-hairline-strong: rgba(122, 143, 168, 0.32);

  /* text */
  --aw-ink: #e6eef8;
  --aw-ink-dim: #cbd5e1;
  --aw-muted: #7a8fa8;

  /* brand + interactive */
  --aw-accent: #5aa8ff;          /* links, highlights, wordmark accent */
  --aw-accent-btn: #2f6fed;      /* filled buttons (Send / New Session) */
  --aw-accent-btn-hover: #1e88e5;
  --aw-accent-tint: #9fbfff;
  --aw-brand: #8b6cf0;           /* violet — logo identity */
  --aw-on-accent: #ffffff;

  /* semantic — kept separate from the accent */
  --aw-good: #4caf50;
  --aw-good-dim: rgba(76, 175, 80, 0.16);
  --aw-bad: #ef4444;
  --aw-bad-dim: rgba(239, 68, 68, 0.15);

  /* traffic-light cost scale (miles / price) — matches the old getPriceColor */
  --aw-tl-low: #22c55e;
  --aw-tl-mid: #eab308;
  --aw-tl-high: #ef4444;

  /* effective-cost tint (from the old inline hexes) */
  --aw-eff-cheap: #51cf66;
  --aw-eff-pricey: #ff6b6b;

  /* Best Deal — the one place gold appears */
  --aw-best: #e8b53a;
  --aw-best-dim: rgba(232, 181, 58, 0.12);

  /* value-badge tiers (¢/pt): excellent >=2.0, good >=1.5, poor <1.5 */
  --aw-val-excellent: #22c55e;
  --aw-val-excellent-dim: rgba(34, 197, 94, 0.16);
  --aw-val-good: #eab308;
  --aw-val-good-dim: rgba(234, 179, 8, 0.16);
  --aw-val-poor: #ef4444;
  --aw-val-poor-dim: rgba(239, 68, 68, 0.15);

  /* recommendation */
  --aw-rec-points: #4caf50;
  --aw-rec-cash: #ef4444;

  /* type */
  --aw-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --aw-font-mono: "SF Mono", "JetBrains Mono", "Roboto Mono", ui-monospace, Menlo, Consolas, monospace;

  /* shape & depth */
  --aw-radius: 12px;
  --aw-radius-sm: 8px;
  --aw-radius-pill: 999px;
  --aw-shadow: 0 20px 46px -24px rgba(0, 0, 0, 0.7);

  /* spacing scale */
  --aw-space-1: 4px;
  --aw-space-2: 8px;
  --aw-space-3: 12px;
  --aw-space-4: 16px;
  --aw-space-5: 22px;
}

:root[data-theme="light"] {
  --aw-ground: #eef1f6;
  --aw-ground-2: #e7ebf3;
  --aw-rail: #f6f7fc;
  --aw-surface: #ffffff;
  --aw-elevated: #ffffff;
  --aw-hairline: rgba(28, 40, 64, 0.12);
  --aw-hairline-strong: rgba(28, 40, 64, 0.22);

  --aw-ink: #16203a;
  --aw-ink-dim: #3f4a63;
  --aw-muted: #667186;

  --aw-accent: #1e88e5;
  --aw-accent-btn: #2f6fed;
  --aw-accent-btn-hover: #2559c9;
  --aw-accent-tint: #4a90d9;
  --aw-brand: #7c3aed;

  --aw-good: #2e9b46;
  --aw-good-dim: rgba(46, 155, 70, 0.12);
  --aw-bad: #d84747;
  --aw-bad-dim: rgba(216, 71, 71, 0.12);

  --aw-tl-low: #16a34a;
  --aw-tl-mid: #b8860b;
  --aw-tl-high: #d84747;

  --aw-eff-cheap: #16a34a;
  --aw-eff-pricey: #d84747;

  --aw-best: #b8860b;
  --aw-best-dim: rgba(184, 134, 11, 0.12);

  --aw-val-excellent: #16a34a;
  --aw-val-excellent-dim: rgba(22, 163, 74, 0.13);
  --aw-val-good: #b8860b;
  --aw-val-good-dim: rgba(184, 134, 11, 0.13);
  --aw-val-poor: #d84747;
  --aw-val-poor-dim: rgba(216, 71, 71, 0.12);

  --aw-rec-points: #2e9b46;
  --aw-rec-cash: #d84747;

  --aw-shadow: 0 16px 40px -28px rgba(20, 24, 50, 0.32);
}
