/* ------------------------------------------------------------------ */
/* -- NuHR BRAND COLOURS -- */
/* ------------------------------------------------------------------ */
/*
 * Loaded last, after bootstrap.min.css, so it can restate Bootstrap's own tokens
 * without the vendor file being edited — that file stays replaceable.
 *
 * Scoped to the navy scheme only. Nifty ships twelve schemes the user picks in
 * Settings > Colors, navy being the default; the other eleven are that user's
 * choice and are left alone. `[data-scheme=navy]` cannot collide with them since
 * it only matches when that is the value, and `:not([data-scheme])` covers the
 * login screen, which renders before MainLayout sets the attribute.
 *
 * Palette: docs/design/brand/README.md.
 *   navy #14264f  header band, sidebar, primary buttons
 *   blue #1d6cf5  links, focus rings, active states
 * Shades follow Bootstrap's scale, the weights the theme already used for
 * #24447f: hover 15% toward black, active 30%, subtle 60-80% toward white.
 */

:root:not([data-scheme]),
:root[data-scheme="navy"] {
  --bs-primary: #14264f;
  --bs-primary-rgb: 20, 38, 79;
  --bs-indigo: #14264f;

  --bs-primary-text-emphasis: #080f20;
  --bs-primary-bg-subtle: #d0d4dc;
  --bs-primary-border-subtle: #a1a8b9;

  /* The accent carries the wordmark's blue into links and focus. It also raises
     contrast on white from 3.88:1 to 4.65:1, clearing AA for body text, which
     the outgoing #0280f5 did not. */
  --bs-blue: #1d6cf5;
  --bs-link-color: #1d6cf5;
  --bs-link-color-rgb: 29, 108, 245;
  --bs-link-hover-color: #5691f8;
  --bs-link-hover-color-rgb: 86, 145, 248;
}

[data-bs-theme="dark"]:root:not([data-scheme]),
[data-bs-theme="dark"][data-scheme="navy"] {
  /* Navy is unreadable on a dark ground, so the emphasis token tints instead,
     and links take the lighter blue the brand sheet gives for dark grounds. */
  --bs-primary-text-emphasis: #a1a8b9;

  --bs-blue: #4d8dff;
  --bs-link-color: #4d8dff;
  --bs-link-color-rgb: 77, 141, 255;
  --bs-link-hover-color: #7aa9ff;
  --bs-link-hover-color-rgb: 122, 169, 255;
}

/* Button states. Bootstrap resolves these through .btn-primary's own custom
   properties, so they have to be restated on the class, not on :root. */
:root:not([data-scheme]) .btn-primary,
:root[data-scheme="navy"] .btn-primary {
  --bs-btn-primary-hover-bg: #112043;
  --bs-btn-primary-active-bg: #0e1b37;
}
