/*
 * light.css — Soft lavender-indigo light-mode palette
 *
 * Loaded after style.css. Direction: barely-there lavender tint on
 * backgrounds, deep indigo for interactive elements, emerald for
 * value scores. Calm and distinctive without being warm or clinical.
 */

/* ── OS light mode ──────────────────────────────────────────────────────── */
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    color-scheme: light;

    --bg: #f8f7fc;
    --bg2: #efecf8;
    --bg3: #e4e0f2;

    --border: #cac4e4;
    --border-bright: #aaa4cc;

    --text: #16142a;
    --text2: #3e3868;
    --text3: #8078b0;

    --link: #4a3ec8;
    --link-hover: #3328a8;
    --active-bg: rgba(74, 62, 200, 0.07);
    --active-border: rgba(74, 62, 200, 0.36);

    --green: #1a7a44;
    --yellow: #8a6800;
    --red: #c02430;
    --nvidia: #4a7800;
    --amd: #b81e22;

    --row-hover: rgba(74, 62, 200, 0.04);
    --row-even: #f3f1fa;

    --btn-bg: #1a7a44;
    --btn-bg-hover: #135c33;
  }
}

/* ── Manual light mode ──────────────────────────────────────────────────── */
:root[data-theme="light"] {
  color-scheme: light;

  --bg: #f8f7fc;
  --bg2: #efecf8;
  --bg3: #e4e0f2;

  --border: #cac4e4;
  --border-bright: #aaa4cc;

  --text: #16142a;
  --text2: #3e3868;
  --text3: #8078b0;

  --link: #4a3ec8;
  --link-hover: #3328a8;
  --active-bg: rgba(74, 62, 200, 0.07);
  --active-border: rgba(74, 62, 200, 0.36);

  --green: #1a7a44;
  --yellow: #8a6800;
  --red: #c02430;
  --nvidia: #4a7800;
  --amd: #b81e22;

  --row-hover: rgba(74, 62, 200, 0.04);
  --row-even: #f3f1fa;

  --btn-bg: #1a7a44;
  --btn-bg-hover: #135c33;
}

/* ── Best value rows ────────────────────────────────────────────────────── */
:root[data-theme="light"] tr.best-value-row,
:root[data-theme="light"] tr.best-value-row:nth-child(even) {
  background: rgba(74, 62, 200, 0.15) !important;
  border-left-color: #4a3ec8;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) tr.best-value-row,
  :root:not([data-theme="dark"]) tr.best-value-row:nth-child(even) {
    background: rgba(74, 62, 200, 0.2) !important;
    border-left-color: #4a3ec8;
  }
}

/* ── Toggle track ───────────────────────────────────────────────────────── */
:root[data-theme="light"] .toggle-track.on {
  background: rgba(74, 62, 200, 0.12);
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .toggle-track.on {
    background: rgba(74, 62, 200, 0.12);
  }
}

/* ── Badge overrides ────────────────────────────────────────────────────── */
:root[data-theme="light"] .badge-ai,
:root[data-theme="light"] .badge-new {
  color: #1a7a44;
  background: rgba(26, 122, 68, 0.08);
  border-color: rgba(26, 122, 68, 0.28);
}
:root[data-theme="light"] .badge-dc {
  color: #4a3ec8;
  background: rgba(74, 62, 200, 0.08);
  border-color: rgba(74, 62, 200, 0.28);
}
:root[data-theme="light"] .badge-ws {
  color: #8a6800;
  background: rgba(138, 104, 0, 0.08);
  border-color: rgba(138, 104, 0, 0.26);
}
:root[data-theme="light"] .badge-used {
  color: #a03600;
  background: rgba(160, 54, 0, 0.08);
  border-color: rgba(160, 54, 0, 0.26);
}
:root[data-theme="light"] .badge-nvidia {
  color: #4a7800;
  background: rgba(74, 120, 0, 0.08);
  border-color: rgba(74, 120, 0, 0.28);
}
:root[data-theme="light"] .badge-amd {
  color: #b81e22;
  background: rgba(184, 30, 34, 0.08);
  border-color: rgba(184, 30, 34, 0.26);
}
:root[data-theme="light"] .badge-intel {
  color: #4a3ec8;
  background: rgba(74, 62, 200, 0.08);
  border-color: rgba(74, 62, 200, 0.28);
}

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .badge-ai,
  :root:not([data-theme="dark"]) .badge-new {
    color: #1a7a44;
    background: rgba(26, 122, 68, 0.08);
    border-color: rgba(26, 122, 68, 0.28);
  }
  :root:not([data-theme="dark"]) .badge-dc {
    color: #4a3ec8;
    background: rgba(74, 62, 200, 0.08);
    border-color: rgba(74, 62, 200, 0.28);
  }
  :root:not([data-theme="dark"]) .badge-ws {
    color: #8a6800;
    background: rgba(138, 104, 0, 0.08);
    border-color: rgba(138, 104, 0, 0.26);
  }
  :root:not([data-theme="dark"]) .badge-used {
    color: #a03600;
    background: rgba(160, 54, 0, 0.08);
    border-color: rgba(160, 54, 0, 0.26);
  }
  :root:not([data-theme="dark"]) .badge-nvidia {
    color: #4a7800;
    background: rgba(74, 120, 0, 0.08);
    border-color: rgba(74, 120, 0, 0.28);
  }
  :root:not([data-theme="dark"]) .badge-amd {
    color: #b81e22;
    background: rgba(184, 30, 34, 0.08);
    border-color: rgba(184, 30, 34, 0.26);
  }
  :root:not([data-theme="dark"]) .badge-intel {
    color: #4a3ec8;
    background: rgba(74, 62, 200, 0.08);
    border-color: rgba(74, 62, 200, 0.28);
  }
}
