/* ============================================================================
   Consent banner
   ---------------------------------------------------------------------------
   New file, separate from sheprep.css on purpose (see the analytics/consent
   workplan) — third-party-consent chrome stays out of the base theme file.
   Reuses sheprep.css's tokens (--card, --ink, --ink-2, --ink-3, --rule,
   --marigold, --marigold-2, --teal, --sans, --gutter, --shell) so it
   inherits 2am mode for free: those custom properties already flip on
   `prefers-color-scheme` and `:root[data-theme]` in sheprep.css, and this
   file needs no dark-mode rules of its own as a result.

   `position: fixed` throughout: the banner must never participate in
   normal layout, so it can never contribute to CLS (currently 0, must stay
   0) regardless of when it mounts or unmounts.
   ========================================================================= */

/* A compact card in the bottom-left, not a full-width bar. On a site whose
   whole point is being readable at 3am, a banner spanning the viewport is a
   wall in front of the content. This sits out of the way and stays small. */
.consent {
  position: fixed;
  left: 1rem;
  bottom: 1rem;
  width: min(360px, calc(100vw - 2rem));
  z-index: 999;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.14);
}

.consent__inner {
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.75rem;
}

.consent__text {
  margin: 0;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--ink-2);
}

.consent__text a {
  color: var(--teal);
}

.consent__actions {
  display: flex;
  gap: 0.5rem;
}

/* Reject and Accept share this base — same padding, same font size, same
   border weight — so neither reads as more clickable than the other.
   Reject is not a de-emphasised text link; it's a full button, deliberately,
   because UK/EU consent rules require it be exactly as easy to choose as
   Accept. */
.consent__btn {
  flex: 1 1 0;
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 620;
  line-height: 1;
  padding: 0.55rem 0.9rem;
  border-radius: 6px;
  border: 1px solid transparent;
  cursor: pointer;
}

.consent__btn--reject {
  background: var(--card);
  border-color: var(--rule);
  color: var(--ink);
}
.consent__btn--reject:hover {
  border-color: var(--ink-3);
}

.consent__btn--accept {
  background: var(--marigold);
  border-color: var(--marigold);
  color: #fff;
}
.consent__btn--accept:hover {
  background: var(--marigold-2);
  border-color: var(--marigold-2);
}

/* On narrow screens the card spans the available width but stays a card,
   inset from the edges, rather than becoming a full-bleed bar. */
@media (max-width: 560px) {
  .consent {
    left: 0.75rem;
    right: 0.75rem;
    bottom: 0.75rem;
    width: auto;
  }
}
