/* lemmapad's themes beyond light and dark. Each sets the page's colours on
   the root element when chosen in Settings (or on the front page, which has
   a copy made by crates/core/tests/site_demos.rs). A theme is built on light
   or dark: the page's light or dark rules are switched on to match (see the
   script in index.html), and the colours here go over them. This file comes
   after style.css, so a theme wins over the paper look's colours too. */

/* Sepia: warm paper and brown ink, easy on the eyes for long reading. */
html[data-theme="sepia"] {
  --paper: #f4ecd8;
  --panel: #fbf5e6;
  --rule: #e0d3b6;
  --ink: #3b2f1e;
  --muted: #6b5c47;
  --accent: #a0522d;
  --visual: #8b5a9c;
  --pending: #b7791f;
  --good: #4e7a3a;
  --warn: #b7791f;
  --bad: #b03a2e;
  --shadow: 0 12px 40px rgb(80 55 20 / 0.18);
}

/* Solarized Light: Ethan Schoonover's palette, low contrast and calm. */
html[data-theme="solarized"] {
  --paper: #fdf6e3;
  --panel: #fffbee;
  --rule: #eee8d5;
  --ink: #3b4d53;
  /* Solarized's base01 and a deeper blue: its own base1 and blue fall
     short of a contrast of 4.5 to 1 on its paper. */
  --muted: #586e75;
  --accent: #1a6fae;
  --visual: #6c71c4;
  --pending: #b58900;
  --good: #859900;
  --warn: #b58900;
  --bad: #dc322f;
  --shadow: 0 12px 40px rgb(0 43 54 / 0.15);
}

/* Nord: a cool, dim blue-grey dark theme. */
html[data-theme="nord"] {
  --paper: #2e3440;
  --panel: #3b4252;
  --rule: #434c5e;
  --ink: #eceff4;
  --muted: #a7b1c2;
  --accent: #88c0d0;
  --visual: #b48ead;
  --pending: #ebcb8b;
  --good: #a3be8c;
  --warn: #ebcb8b;
  --bad: #bf616a;
  --shadow: 0 12px 40px rgb(0 0 0 / 0.45);
}

/* High contrast: white on black, with bright marks, for low vision and
   bright rooms. */
html[data-theme="contrast"] {
  --paper: #000000;
  --panel: #0b0b0b;
  --rule: #8a8a8a;
  --ink: #ffffff;
  --muted: #d6d6d6;
  --accent: #6cb6ff;
  --accent-ink: #000000;
  --visual: #e2a8ff;
  --pending: #ffd54a;
  --good: #6eff9e;
  --warn: #ffd54a;
  --bad: #ff7070;
  --wash: 0.18;
  --shadow: 0 0 0 1px #8a8a8a;
}

/* The mode in the status bar stands on black, framed, rather than on the
   grey of the rules, which is too light for white words. */
html[data-theme="contrast"] .mode:not(.mode-insert, .mode-resize, .mode-palette, .mode-visual) {
  background: var(--paper);
  box-shadow: inset 0 0 0 1px var(--rule);
}
