/* consent.css — cookie consent banner.
   Bottom-anchored bar; becomes a centred sheet on narrow screens. */

.consent {
  position: fixed;
  inset-inline: 0;
  bottom: 0;
  z-index: 9000;
  padding: 16px;
  display: flex;
  justify-content: center;
  pointer-events: none; /* only the panel itself is interactive */
}

.consent[hidden] { display: none; }

.consent__panel {
  pointer-events: auto;
  width: 100%;
  max-width: var(--page-max);
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 20px 24px;
  background: var(--ink-2);
  border: 1px solid var(--line-2);
  border-radius: var(--radius-lg);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  animation: consent-rise 260ms cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes consent-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

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

.consent__main { flex: 1; min-width: 0; }

.consent__title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1.2;
  color: var(--fg);
  margin: 0 0 6px;
}

.consent__body {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--muted);
  margin: 0;
  max-width: 68ch;
}

.consent__body a {
  color: var(--aqua);
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* ── Granular preferences ─────────────────────────────────────────────── */

.consent__prefs {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 12px;
}

.consent__prefs[hidden] { display: none; }

.consent__pref {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  cursor: pointer;
}

.consent__pref input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  flex: none;
  accent-color: var(--aqua);
  cursor: pointer;
}

.consent__pref input:disabled { cursor: default; opacity: 0.55; }

.consent__pref span {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--muted);
}

.consent__pref strong {
  display: block;
  font-weight: 600;
  color: var(--fg);
}

/* ── Actions ──────────────────────────────────────────────────────────── */

.consent__actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
}

.consent__btn {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.8125rem;
  line-height: 1;
  padding: 11px 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.consent__btn[hidden] { display: none; }

.consent__btn--primary {
  background: var(--royal);
  color: var(--white);
}

.consent__btn--primary:hover { background: var(--royal-dark); }

.consent__btn--ghost {
  background: transparent;
  color: var(--muted);
  border-color: var(--line-2);
}

.consent__btn--ghost:hover {
  color: var(--fg);
  border-color: var(--muted);
}

.consent__btn:focus-visible {
  outline: 2px solid var(--aqua);
  outline-offset: 2px;
}

/* ── Narrow screens ───────────────────────────────────────────────────── */

@media (max-width: 860px) {
  .consent__panel {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 20px;
  }

  .consent__actions { flex-wrap: wrap; }

  /* Equal-width buttons read better than a ragged row on a phone. */
  .consent__btn { flex: 1 1 auto; text-align: center; }
}

/* ── Footer trigger ───────────────────────────────────────────────────── */

.consent-link {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-decoration: none;
}

.consent-link:hover { text-decoration: underline; }
