/*
  Colour roles for the four appearances. The role names are the same as on the sibling sites
  (Skylark, OAP Lizzard), so the shared layout and component styles work unchanged; only the
  values here are Still Questing's own. Every other stylesheet uses these names and never a
  literal colour.

  The colours come from the OAP badges: gold lettering, wood brown, night-sky blue and bronze.

    Light      a quest log: warm parchment, brown ink, gold headings
    Dark       the OAP window: dark panels with bronze edge lines
    Blue Dark  night in Elwynn: deep blue with bronze
    System     Light or Dark, following the device

  The pairs of text and background used together are checked for WCAG AA contrast by the tests
  (tests/StillQuesting.Web.Tests/ThemeContrastTests.cs). Run them after changing a colour.
*/

/* Light. Also the base for System on a light device. */
:root {
  color-scheme: light;
  --page: #efe2c6;
  --surface: #f8f0dd;
  --surface-2: #f3e8cf;
  --text: #2b1f12;
  --text-2: #5a4630;
  --border: #c9b183;
  --control-border: #7d6642;  /* a field's edge: must stand out from the page and surfaces */
  --accent: #7a4300;          /* links and actions */
  --accent-strong: #5f3300;   /* hover */
  --on-accent: #fff9e8;       /* text on an accent background */
  --accent-soft: #ead9b0;     /* the chosen menu item, callouts */
  --heading: #6e4a08;         /* page titles */
  --heading-section: #6e4a08; /* section titles */
  --eyebrow: #6b4700;         /* the small capitals above a title */
  --focus: #14457f;
  --shadow: 0 1px 2px rgba(60, 40, 10, 0.08);
  --info-bg: #e6e4d2;    --info-line: #3f6696;
  --success-bg: #e2ebcf; --success-line: #2c6a2c;
  --warning-bg: #f3e3b5; --warning-line: #8a5f00;
  --error-bg: #f4d9cc;   --error-line: #9a2a1c;
}

/* Dark: an explicit choice. The borders are the OAP window's bronze. */
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #141210;
  --surface: #1f1b16;
  --surface-2: #2a241c;
  --text: #ede3d0;
  --text-2: #b9aa90;
  --border: #5c4a30;
  --control-border: #9a8258;
  --accent: #e8bb52;
  --accent-strong: #f3d27e;
  --on-accent: #1a1408;
  --accent-soft: #33291b;
  --heading: #f0c860;
  --heading-section: #f0c860;
  --eyebrow: #d6b56f;
  --focus: #9ccaff;
  --shadow: none;
  --info-bg: #1c2733;    --info-line: #6f97d6;
  --success-bg: #1d2b1c; --success-line: #86cf86;
  --warning-bg: #33291b; --warning-line: #e8bb52;
  --error-bg: #3a211c;   --error-line: #f39484;
}

/*
  System on a dark device. CSS cannot share one block between a media query and a selector,
  so these values repeat the Dark block above. A test checks the two blocks stay identical.
*/
@media (prefers-color-scheme: dark) {
  :root[data-theme="system"] {
    color-scheme: dark;
    --page: #141210;
    --surface: #1f1b16;
    --surface-2: #2a241c;
    --text: #ede3d0;
    --text-2: #b9aa90;
    --border: #5c4a30;
    --control-border: #9a8258;
    --accent: #e8bb52;
    --accent-strong: #f3d27e;
    --on-accent: #1a1408;
    --accent-soft: #33291b;
    --heading: #f0c860;
    --heading-section: #f0c860;
    --eyebrow: #d6b56f;
    --focus: #9ccaff;
    --shadow: none;
    --info-bg: #1c2733;    --info-line: #6f97d6;
    --success-bg: #1d2b1c; --success-line: #86cf86;
    --warning-bg: #33291b; --warning-line: #e8bb52;
    --error-bg: #3a211c;   --error-line: #f39484;
  }
}

/* Blue Dark. */
:root[data-theme="bluedark"] {
  color-scheme: dark;
  --page: #0b1524;
  --surface: #122036;
  --surface-2: #1a2c48;
  --text: #e5ebf6;
  --text-2: #aab8cf;
  --border: #3b5078;
  --control-border: #7d93b8;
  --accent: #e0b06a;
  --accent-strong: #efc98e;
  --on-accent: #0b1524;
  --accent-soft: #1f3354;
  --heading: #e6bb78;
  --heading-section: #e6bb78;
  --eyebrow: #d8b774;
  --focus: #ffd68a;
  --shadow: none;
  --info-bg: #16294a;    --info-line: #7c9ee0;
  --success-bg: #14302e; --success-line: #8fd4a0;
  --warning-bg: #2e2a1c; --warning-line: #e6bb78;
  --error-bg: #3a2229;   --error-line: #f5a093;
}
