/* Interim cookie-consent banner — see assets/js/consent.js. Uses the tokens
   defined in style.css, so load it after that file. */

.cookie-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 250; /* above the header (100) and lightbox (200), below the skip link (300) */
  max-width: 1040px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 20px 28px;
  padding: 18px 22px;
  /* Near-opaque: this sits over the dark hero photo, so the glass tokens alone
     would leave the text under-contrasted. */
  background: rgba(255, 255, 255, 0.95);
  -webkit-backdrop-filter: blur(var(--glass-blur));
  backdrop-filter: blur(var(--glass-blur));
  border: 1px solid var(--glass-border-dark);
  border-radius: var(--radius-md);
  box-shadow: var(--glass-elevation);
  color: var(--ink);
  animation: cookie-banner-in .5s var(--ease) both;
}
.cookie-banner[hidden] { display: none; }

.cookie-banner__text {
  flex: 1 1 auto;
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.55;
}
.cookie-banner__text a {
  color: var(--cb-golden-brown-deep);
  text-decoration: underline;
  text-underline-offset: 2px;
  white-space: nowrap;
}
.cookie-banner__text a:hover { color: var(--cb-golden-brown); }

.cookie-banner__actions {
  flex: 0 0 auto;
  display: flex;
  gap: 10px;
}

/* Both choices share size, weight and a filled style so neither is hidden. */
.cookie-banner__btn {
  min-height: 44px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--radius-pill);
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  color: #fff;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .25s var(--ease), background .25s var(--ease);
}
.cookie-banner__btn:active { transform: scale(0.97); }
.cookie-banner__btn--accepted { background: var(--cb-golden-brown-deep); }
.cookie-banner__btn--accepted:hover { background: var(--cb-golden-brown); }
.cookie-banner__btn--rejected { background: var(--cb-dark-grey); }
.cookie-banner__btn--rejected:hover { background: var(--ink); }
.cookie-banner__btn:focus-visible { outline: 2px solid var(--cb-mustard); outline-offset: 2px; }

/* Footer link that reopens the banner; styled like its sibling links. */
.footer-links .footer-cookie-settings {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 8px;
  background: none;
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.footer-links .footer-cookie-settings[hidden] { display: none; }
.footer-links .footer-cookie-settings:hover { color: var(--cb-golden-brown); }

@keyframes cookie-banner-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (max-width: 720px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    left: 10px;
    right: 10px;
    bottom: 10px;
    padding: 16px;
  }
  .cookie-banner__actions { flex-direction: column-reverse; }
  .cookie-banner__btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .cookie-banner { animation: none; }
}

@media print {
  .cookie-banner { display: none; }
}
