/* =========================================================
   Cookie consent banner — separate, self-contained stylesheet.
   Fixed to the bottom of the viewport, hidden by default (no
   layout shift), shown only until the visitor makes a choice.
   ========================================================= */

.cookie-banner {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 200;
  background: var(--results-dark-bg, #1C2620);
  color: var(--results-dark-ink, #F3F7F1);
  border-top: 1px solid rgba(255,255,255,.1);
  box-shadow: 0 -12px 32px -8px rgba(0,0,0,.35);
  padding: 20px var(--gut, 24px);
  transform: translateY(110%);
  transition: transform .32s cubic-bezier(.2,.8,.2,1);
}
.cookie-banner[data-visible="true"] { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .cookie-banner { transition: none; }
}

.cookie-banner-inner {
  max-width: var(--max, 1240px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  margin: 0;
  font-size: .92rem;
  line-height: 1.55;
  color: var(--results-dark-ink-2, #B9C4BC);
  max-width: 62ch;
  flex: 1 1 320px;
}
.cookie-banner-text a {
  color: var(--brand, #4F5FEE);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-banner-text a:hover { color: #fff; }

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.cookie-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 20px;
  border-radius: var(--r-pill, 999px);
  font-family: var(--display, inherit);
  font-weight: 700;
  font-size: .87rem;
  cursor: pointer;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: transform .12s ease, background .12s ease, border-color .12s ease, color .12s ease;
}
.cookie-btn:focus-visible {
  outline: 2.5px solid var(--brand, #4F5FEE);
  outline-offset: 2px;
}

.cookie-btn-accept {
  background: var(--brand, #4F5FEE);
  color: #FFFFFF;
}
.cookie-btn-accept:hover { transform: translateY(-1px); filter: brightness(1.05); }

.cookie-btn-reject {
  background: transparent;
  color: var(--results-dark-ink, #F3F7F1);
  border-color: rgba(255,255,255,.28);
}
.cookie-btn-reject:hover { border-color: rgba(255,255,255,.55); }

.cookie-btn-settings {
  background: transparent;
  color: var(--results-dark-ink-2, #B9C4BC);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 2px;
  padding: 11px 8px;
}
.cookie-btn-settings:hover { color: #fff; }

/* ---------- settings (preferences) panel ---------- */
.cookie-settings-panel {
  max-width: var(--max, 1240px);
  margin: 16px auto 0;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,.12);
}
.cookie-settings-panel[hidden] { display: none; }

.cookie-setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.cookie-setting-row:last-of-type { border-bottom: none; }
.cookie-setting-copy { flex: 1 1 auto; }
.cookie-setting-copy strong {
  display: block;
  font-family: var(--display, inherit);
  font-size: .92rem;
  font-weight: 700;
  color: var(--results-dark-ink, #F3F7F1);
  margin-bottom: 2px;
}
.cookie-setting-copy span {
  display: block;
  font-size: .85rem;
  color: var(--results-dark-ink-2, #B9C4BC);
  line-height: 1.5;
}

/* accessible toggle switch */
.cookie-toggle {
  position: relative;
  flex: 0 0 auto;
  width: 46px; height: 26px;
  border-radius: 999px;
  background: rgba(255,255,255,.18);
  border: 0;
  cursor: pointer;
  transition: background .15s ease;
}
.cookie-toggle::before {
  content: "";
  position: absolute;
  top: 3px; left: 3px;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform .15s ease;
}
.cookie-toggle[aria-checked="true"] { background: var(--brand, #4F5FEE); }
.cookie-toggle[aria-checked="true"]::before { transform: translateX(20px); }
.cookie-toggle:disabled { opacity: .6; cursor: not-allowed; }
.cookie-toggle:focus-visible {
  outline: 2.5px solid var(--brand, #4F5FEE);
  outline-offset: 3px;
}

.cookie-settings-save {
  margin-top: 16px;
}

@media (max-width: 700px) {
  .cookie-banner { padding: 18px 18px 20px; }
  .cookie-banner-inner { flex-direction: column; align-items: stretch; gap: 14px; }
  .cookie-banner-actions { justify-content: stretch; }
  .cookie-btn { flex: 1 1 auto; }
  .cookie-btn-settings { flex: 0 0 auto; }
}

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