/* Skins: colour families that each come in light and dark. Delft (blue) is the default and lives in base.css.
   js/theme.js puts data-skin and data-scheme (light or dark) on <html>; the previews are listed in js/lib/themes.js.
   Light skins are tinted rather than pure white, so they are easier on the eyes.
   Whatever the skin, the question banner stays blue when Dutch is shown and green when English is shown. */

/* ------------------------------------------------------------------ Tulp: tulip red and rose */

:root[data-skin="tulp"][data-scheme="light"] {
  --bg: #fbeef3;
  --surface: #fff9fb;
  --surface-2: #f6e1e9;
  --ink: #3a1830;
  --mut: #7a5068;
  --line: #efd0dc;
  --root: #c2185b;
  --shadow: 0 1px 2px rgba(80, 20, 50, 0.06), 0 8px 24px rgba(80, 20, 50, 0.07);
}

:root[data-skin="tulp"][data-scheme="dark"] {
  --bg: #1c0d15;
  --surface: #2a1420;
  --surface-2: #351a29;
  --ink: #f8e6ee;
  --mut: #c49aae;
  --line: #4a2638;
  --root: #ff7fab;
  --on: #1c0d15;
}

/* ------------------------------------------------------------------ Oranje: King's Day orange */

:root[data-skin="oranje"][data-scheme="light"] {
  --bg: #fdf1e6;
  --surface: #fffaf4;
  --surface-2: #f8e6d2;
  --ink: #33200d;
  --mut: #7a5a3a;
  --line: #f0d8bd;
  --root: #c25100;
  --shadow: 0 1px 2px rgba(90, 45, 0, 0.06), 0 8px 24px rgba(90, 45, 0, 0.07);
}

:root[data-skin="oranje"][data-scheme="dark"] {
  --bg: #1a1009;
  --surface: #281a0f;
  --surface-2: #332214;
  --ink: #fbeee0;
  --mut: #c9a888;
  --line: #4a3220;
  --root: #ff9a4d;
  --on: #1a1009;
}

/* ------------------------------------------------------------------ Polder: meadow green */

:root[data-skin="polder"][data-scheme="light"] {
  --bg: #edf5ee;
  --surface: #fbfdf9;
  --surface-2: #e3eee2;
  --ink: #14281a;
  --mut: #4f6a56;
  --line: #cfe0cd;
  --root: #2c7a43;
  --shadow: 0 1px 2px rgba(20, 60, 30, 0.06), 0 8px 24px rgba(20, 60, 30, 0.07);
}

:root[data-skin="polder"][data-scheme="dark"] {
  --bg: #0c1914;
  --surface: #14271f;
  --surface-2: #1b3329;
  --ink: #e4f1e9;
  --mut: #98b3a5;
  --line: #26463a;
  --root: #6fcf8f;
  --on: #0c1914;
}

/* ------------------------------------------------------------------ Noordzee: North Sea teal */

:root[data-skin="noordzee"][data-scheme="light"] {
  --bg: #eaf4f5;
  --surface: #f9fdfd;
  --surface-2: #dfecee;
  --ink: #0f2a30;
  --mut: #4b6a70;
  --line: #c9dfe2;
  --root: #0d7480;
  --shadow: 0 1px 2px rgba(10, 50, 60, 0.06), 0 8px 24px rgba(10, 50, 60, 0.07);
}

:root[data-skin="noordzee"][data-scheme="dark"] {
  --bg: #08171b;
  --surface: #0f252b;
  --surface-2: #153038;
  --ink: #e0f2f4;
  --mut: #8fb3b9;
  --line: #1f3f47;
  --root: #4fd1d9;
  --on: #08171b;
}

/* ------------------------------------------------------------------ Heide: heather purple */

:root[data-skin="heide"][data-scheme="light"] {
  --bg: #f3effa;
  --surface: #fcfaff;
  --surface-2: #e9e2f6;
  --ink: #241a3d;
  --mut: #625785;
  --line: #ddd3f0;
  --root: #6a3fc4;
  --shadow: 0 1px 2px rgba(40, 20, 80, 0.06), 0 8px 24px rgba(40, 20, 80, 0.07);
}

:root[data-skin="heide"][data-scheme="dark"] {
  --bg: #120d22;
  --surface: #1c1533;
  --surface-2: #241c40;
  --ink: #ece6fb;
  --mut: #a99bd0;
  --line: #352a58;
  --root: #a98bff;
  --on: #120d22;
}

/* ------------------------------------------------------------------ Zand: warm sand, like paper */

:root[data-skin="zand"][data-scheme="light"] {
  --bg: #f4ecdc;
  --surface: #fdf8ec;
  --surface-2: #efe4cc;
  --ink: #2b2418;
  --mut: #6e604a;
  --line: #e0d2b4;
  --root: #9a5a12;
  --shadow: 0 1px 2px rgba(60, 40, 10, 0.06), 0 8px 24px rgba(60, 40, 10, 0.07);
}

:root[data-skin="zand"][data-scheme="dark"] {
  --bg: #17140f;
  --surface: #221d16;
  --surface-2: #2b251c;
  --ink: #efe6d6;
  --mut: #b0a288;
  --line: #3d3426;
  --root: #e0b36a;
  --on: #17140f;
}

/* ------------------------------------------------------------------ Contrast: strong outlines, for low vision */

:root[data-skin="contrast"][data-scheme="light"] {
  --bg: #fff;
  --surface: #fff;
  --surface-2: #f0f0f0;
  --ink: #000;
  --mut: #262626;
  --line: #000;
  --root: #0033cc;
  --nl: #0033cc;
  --en: #006b4f;
  --ok: #006e1a;
  --bad: #b00020;
  --shadow: none;
}

:root[data-skin="contrast"][data-scheme="dark"] {
  --bg: #000;
  --surface: #000;
  --surface-2: #161616;
  --ink: #fff;
  --mut: #e6e6e6;
  --line: #fff;
  --root: #8fb4ff;
  --on: #000;
  --nl: #1f4fd6;
  --en: #008a66;
  --ok: #5be08a;
  --ok-ink: #000;
  --bad: #ff8a95;
  --bad-ink: #000;
}

:root[data-skin="contrast"] :focus-visible {
  outline: 4px solid var(--ink);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ Glow: cards, tiles and buttons light up in the skin's colour */

:root[data-glow] {
  --glow: color-mix(in srgb, var(--root) 45%, transparent);
}

:root[data-glow] .card,
:root[data-glow] .qcard,
:root[data-glow] .theme-card,
:root[data-glow] .font-card {
  border-color: color-mix(in srgb, var(--root) 40%, var(--line));
  box-shadow:
    0 0 0 1px var(--glow),
    0 0 22px -4px var(--glow);
}

:root[data-glow] .btn.solid,
:root[data-glow] .send,
:root[data-glow] .hero-card {
  box-shadow: 0 0 18px -2px var(--glow);
}

/* Tiles keep their inner stage marks, so the glow goes around them as a drop shadow. */
:root[data-glow] .tile:not(.locked) {
  filter: drop-shadow(0 0 6px color-mix(in srgb, var(--gc, var(--root)) 55%, transparent));
}

:root[data-glow][data-scheme="light"] {
  --glow: color-mix(in srgb, var(--root) 30%, transparent);
}
