/* ==========================================================================
   Cookie consent banner — isolated component layer.
   Pairs with parts/cookie-banner.php and assets/js/consent.js. Built entirely
   on the main.css tokens, so it inherits the theme's colour, spacing, radius
   and button system with nothing hardcoded — change a token, this follows.
   ========================================================================== */

/* Mobile-first: a floating card on the bottom margin, lifted clear of the
   sticky call bar (height --sticky-call-h) so neither ever covers the other. */
.cookie-banner {
  position: fixed;
  z-index: 60; /* over the sticky call bar (50), under the skip link (100) */
  inset: auto var(--s-3) calc(var(--sticky-call-h) + var(--s-3)) var(--s-3);
}

.cookie-banner[hidden] { display: none; }

/* No sticky call bar from 768px up, so the card sits on the bottom-left margin
   and stops growing — a measure that reads rather than a full-width strip. */
@media (min-width: 768px) {
  .cookie-banner {
    inset: auto auto var(--s-5) var(--s-5);
    max-width: 30rem;
  }
}

.cookie-banner__panel {
  background: var(--c-white);
  color: var(--c-body);
  border: 1px solid var(--c-edge);
  border-radius: var(--radius);
  padding: var(--s-5);
  box-shadow: 0 8px 28px rgba(29, 37, 48, 0.18);
}

.cookie-banner__title {
  margin: 0 0 var(--s-2);
  font-size: var(--text-lg);
  line-height: var(--lh-tight);
  color: var(--c-ink);
}

.cookie-banner__text {
  margin: 0 0 var(--s-4);
  font-size: var(--text-sm);
  line-height: var(--lh-normal);
}

/* The brand orange is background-only; as a link it has to be the dark accent. */
.cookie-banner__link { color: var(--c-accent-text); }
.cookie-banner__link:hover,
.cookie-banner__link:focus-visible { text-decoration: underline; }

/* Two equal buttons. Reject is no less reachable than Accept (PECR). They share
   the row and wrap to full width together on the narrowest phones. */
.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
}
.cookie-banner__actions .btn { flex: 1 1 auto; }

/* The "change or withdraw your choice" control in the footer legal row. Styled
   as a link so it reads as one, but it is a real button (it opens the banner). */
.cookie-reopen {
  min-height: 44px;
  padding: 10px 0;
  display: inline-flex;
  align-items: center;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}
.cookie-reopen:hover,
.cookie-reopen:focus-visible { color: var(--c-white); }
