/* ============================================================
   WeatherWindow.AI — consent banner + always-visible cookie
   disclosure line (GA4 Task 3, D-A/D-C/N1).

   index.html and the article pages load DISJOINT token trees with
   no shared stylesheet:
     index.html    -> tokens.css            (--panel --body --dim --line --r --sans)
     article pages -> styles-foundation.css (--surface --text --text-dim
                                              --border-dim --radius --font-sans)
   Every color/radius/font property below goes through a local --wwc-*
   variable that fallback-chains through both names, so this file
   renders correctly on either tree without ever guessing which one is
   loaded. Never introduce a literal color or radius here — it will be
   right on one tree and wrong on the other.

   Neither component uses the rationed brass brand accent: the footer
   line is chrome (not a call to action), and the banner's two buttons
   must be visually equal weight — EDPB guidance treats an emphasized
   Accept beside a de-emphasized Decline as an invalid consent mechanism.
   ============================================================ */

.ww-consent,
.ww-consent-line {
  --wwc-surface: var(--panel, var(--surface));
  --wwc-text: var(--body, var(--text));
  --wwc-dim: var(--dim, var(--text-dim));
  --wwc-line: var(--line, var(--border-dim));
  --wwc-radius: var(--r, var(--radius));
  --wwc-font: var(--sans, var(--font-sans));
}

/* ---- Banner (.ww-consent) — fixed, dismissible only via a real choice ---- */

.ww-consent {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 9999;
  max-width: 28rem;
  margin: 0 auto;
  background: var(--wwc-surface);
  color: var(--wwc-text);
  font-family: var(--wwc-font);
  border: 1px solid var(--wwc-line);
  border-radius: var(--wwc-radius);
  box-shadow: var(--shadow, none);
}

.ww-consent[hidden] {
  display: none;
}

.ww-consent__inner {
  padding: 1.5rem;
}

.ww-consent__title {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--wwc-text);
}

.ww-consent__body {
  margin: 0 0 1.5rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--wwc-dim);
}

/* Inline Privacy Policy link inside the banner body. Not brand-accented —
   this component's whole compliance rationale is that nothing in it
   out-competes anything else. */
.ww-consent__link {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
}

.ww-consent__link:hover,
.ww-consent__link:focus-visible {
  color: var(--wwc-text);
}

.ww-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Accept and Decline share this single class on purpose — no --primary /
   --ghost split. Equal padding, equal border weight, equal font-weight. */
.ww-consent__btn {
  flex: 1 1 8rem;
  padding: 0.7rem 1rem;
  background: transparent;
  color: var(--wwc-text);
  font-family: var(--wwc-font);
  font-size: 0.88rem;
  font-weight: 600;
  border: 1px solid var(--wwc-line);
  border-radius: var(--wwc-radius);
  cursor: pointer;
}

.ww-consent__btn:hover,
.ww-consent__btn:focus-visible {
  border-color: var(--wwc-text);
}

@media (max-width: 30rem) {
  .ww-consent {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    max-width: none;
  }

  .ww-consent__inner {
    padding: 1.25rem;
  }

  .ww-consent__actions {
    flex-direction: column;
  }

  .ww-consent__btn {
    flex: 1 1 auto;
  }
}

/* ---- Footer disclosure line (.ww-consent-line) — always in flow ---- */

.ww-consent-line {
  margin: 2rem 0 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--wwc-line);
  color: var(--wwc-dim);
  font-family: var(--wwc-font);
  font-size: 0.8rem;
  line-height: 1.6;
}

.ww-consent-line[hidden] {
  display: none;
}

.ww-consent-line__link {
  background: none;
  border: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font-family: inherit;
  font-size: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
}

.ww-consent-line__link:hover,
.ww-consent-line__link:focus-visible {
  color: var(--wwc-text);
}
