/* ─────────────────────────────────────────────────────────────────────────
   CONSENT BANNER THEME — Nirvana Forest

   Themes vanilla-cookieconsent (vendored, MIT, /assets/vendor/) by remapping
   its own --cc-* custom properties. No new visual components: the palette,
   radius, and type scale below are the site's existing design-system values.

   DELIBERATE: this file pins literal palette values instead of referencing
   the page's custom properties. The plan-design tool redefines --forest to
   #33c08c (a bright accent in its dark instrument theme), so var(--forest)
   would paint the banner bright green there and fail contrast. The consent
   banner must look identical on every page, so its palette is pinned to the
   canonical values:
     --forest #0D2B1E · --emerald #0F7A57 · --text #111827 · --muted #5C6470
     --rule #E5E7EB · --forest-pale #E1F5EE · radius 8px

   Accessibility: Accept and Decline are BOTH solid buttons at identical size,
   weight, and padding (equalWeightButtons is also set in the JS config), so
   refusing is exactly as easy and as prominent as accepting.
   ───────────────────────────────────────────────────────────────────────── */

#cc-main {
  /* type */
  --cc-font-family: 'Lato', 'Lato Fallback', system-ui, -apple-system, 'Segoe UI', sans-serif;

  /* surfaces */
  --cc-bg: #FFFFFF;
  --cc-primary-color: #111827;             /* body text        */
  --cc-secondary-color: #5C6470;           /* muted text       */
  --cc-link-color: #0F7A57;                /* emerald          */
  --cc-separator-border-color: #E5E7EB;
  --cc-overlay-bg: rgba(13, 43, 30, .6);   /* forest scrim     */

  /* primary action — Accept (emerald, matches .btn-primary) */
  --cc-btn-primary-bg: #0F7A57;
  --cc-btn-primary-color: #FFFFFF;
  --cc-btn-primary-border-color: #0F7A57;
  --cc-btn-primary-hover-bg: #0D2B1E;
  --cc-btn-primary-hover-color: #FFFFFF;
  --cc-btn-primary-hover-border-color: #0D2B1E;

  /* secondary action — Decline (forest, solid: equal weight, not a downgrade) */
  --cc-btn-secondary-bg: #0D2B1E;
  --cc-btn-secondary-color: #FFFFFF;
  --cc-btn-secondary-border-color: #0D2B1E;
  --cc-btn-secondary-hover-bg: #0F7A57;
  --cc-btn-secondary-hover-color: #FFFFFF;
  --cc-btn-secondary-hover-border-color: #0F7A57;

  /* preferences modal chrome */
  --cc-cookie-category-block-bg: #F9FAFB;
  --cc-cookie-category-block-border: #E5E7EB;
  --cc-cookie-category-block-hover-bg: #E1F5EE;
  --cc-cookie-category-block-hover-border: #9FE1CB;
  --cc-cookie-category-expanded-block-bg: #FFFFFF;
  --cc-toggle-on-bg: #0F7A57;
  --cc-toggle-off-bg: #5C6470;
  --cc-toggle-readonly-bg: #E5E7EB;
  --cc-toggle-on-knob-bg: #FFFFFF;
  --cc-toggle-off-knob-bg: #FFFFFF;
  --cc-footer-bg: #F9FAFB;
  --cc-footer-color: #5C6470;
  --cc-footer-border-color: #E5E7EB;

  /* geometry — site radius */
  --cc-modal-border-radius: 8px;
  --cc-btn-border-radius: 8px;
  --cc-pm-toggle-border-radius: 20px;
}

/* Headings use the brand display face, as everywhere else on the site. */
#cc-main .cm__title,
#cc-main .pm__title {
  font-family: 'Playfair Display', 'Playfair Fallback', Georgia, serif;
  font-weight: 500;
  letter-spacing: 0;
}

/* Buttons match the site's button components: same weight and tracking. */
#cc-main .cm__btn,
#cc-main .pm__btn {
  font-weight: 700;
  letter-spacing: .01em;
}

/* Accept and Decline: EQUAL PROMINENCE, distinguishable by hue only.
   Both are solid, full-width, identical height, size, and font weight — the
   only difference is emerald vs forest, so neither is visually preferred.
   (equalWeightButtons in the JS config already forces identical geometry;
   without a hue difference the two sit adjacent and identical, which is a
   misclick hazard rather than a fairness win.) Both clear 4.5:1 on white. */
#cc-main .cm__btn[data-role="all"] {
  background: #0F7A57;
  border-color: #0F7A57;
  color: #FFFFFF;
}
#cc-main .cm__btn[data-role="all"]:hover {
  background: #0D2B1E;
  border-color: #0D2B1E;
}
#cc-main .cm__btn[data-role="necessary"] {
  background: #0D2B1E;
  border-color: #0D2B1E;
  color: #FFFFFF;
}
#cc-main .cm__btn[data-role="necessary"]:hover {
  background: #0F7A57;
  border-color: #0F7A57;
}

/* "Choose what to allow" is tertiary — declining never requires it, so it
   sits below the two one-click actions rather than competing with them. */
#cc-main .cm__btn[data-role="show"] {
  background: transparent;
  border: 1px solid #E5E7EB;
  color: #0D2B1E;
}
#cc-main .cm__btn[data-role="show"]:hover {
  background: #E1F5EE;
  border-color: #9FE1CB;
  color: #0D2B1E;
}

/* Visible keyboard focus on the forest palette (the library's default ring is
   a neutral blue that reads as foreign here). */
#cc-main button:focus-visible,
#cc-main a:focus-visible {
  outline: 2px solid #0F7A57;
  outline-offset: 2px;
}

/* Respect reduced-motion preferences. */
@media (prefers-reduced-motion: reduce) {
  #cc-main { --cc-modal-transition-duration: 0s; }
}

/* Cookie-preferences control. It was an <a href="#">, which is a placeholder
   anchor: it goes nowhere without JS and reads as a broken link to assistive
   tech. It performs an action, so it is a button, styled to sit in the footer
   link row unchanged. */
.link-btn {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: inherit;
  text-decoration: inherit;
  cursor: pointer;
}
.link-btn:hover { text-decoration: underline; }
