/* ===== Cookie consent (shared/_cookie_consent) =====
   A small, quiet card bottom-left. Buttons use the site's button language:
   pill shape and the dark layer that rises from the bottom on hover
   (same as .btn-cta and the newsletter "Subscribe" button). */

.consent {
  position: fixed; left: 24px; bottom: 24px; z-index: 90;
  width: min(380px, calc(100vw - 32px));
  pointer-events: none;
}
.consent[hidden] { display: none; }
.consent__card {
  padding: 22px;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.05), 0 16px 48px rgba(0, 0, 0, 0.12);
  color: var(--ink);
  opacity: 0; transform: translateY(16px);
  transition: opacity 0.4s var(--ease-out), transform 0.6s var(--ease-out);
}
.consent.is-open { pointer-events: auto; }
.consent.is-open .consent__card { opacity: 1; transform: none; }

.consent__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.consent__title { font-weight: 400; font-size: 18px; line-height: 1.2; letter-spacing: -0.02em; }
.consent__text { margin-top: 8px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.consent__text a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0, 0, 0, 0.25); transition: text-decoration-color 0.2s; }
.consent__text a:hover { text-decoration-color: currentColor; }

.consent__link {
  flex: none;
  font-size: 14px; line-height: 1; color: var(--muted);
  text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(0, 0, 0, 0.2);
  transition: color 0.2s, text-decoration-color 0.2s;
}
.consent__link:hover { color: var(--ink); text-decoration-color: currentColor; }

/* ---------- buttons: site wipe hover ---------- */
.consent__actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }
.consent__btn {
  position: relative; isolation: isolate; overflow: hidden;
  height: 46px; padding: 0 16px;
  border-radius: 40px;
  font-family: var(--font-ui); font-size: 15px; line-height: 1; letter-spacing: -0.01em; white-space: nowrap;
  transform: translateZ(0);
  transition: color 0.18s;
}
.consent__btn::before {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  border-radius: inherit;
  background: #17171a;
  transform: translate3d(0, 101%, 0);
  transition: transform 0.18s cubic-bezier(0.4, 0, 1, 1);
}
.consent__btn:hover::before,
.consent__btn:focus-visible::before {
  transform: translate3d(0, 0, 0);
  transition: transform 0.38s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1));
}
.consent__btn:hover, .consent__btn:focus-visible { color: #fff; transition: color 0.3s var(--ease-expo, cubic-bezier(0.16, 1, 0.3, 1)); }
.consent__btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
/* Reject: soft cream (like "Subscribe"); Accept: the orange CTA. Same size = equal choice. */
.consent__btn--ghost { background: var(--card); color: var(--ink); }
.consent__btn--solid {
  background: var(--accent); color: #fff;
  box-shadow: inset 0 4px 8px rgba(255, 255, 255, 0.2);
}

/* ---------- settings ---------- */
.consent__back {
  display: grid; place-items: center; flex: none;
  width: 32px; height: 32px; margin-right: auto; border-radius: 50%;
  background: var(--card);
  transition: background-color 0.2s, color 0.2s;
}
.consent__back svg { width: 14px; height: 14px; transform: rotate(180deg); }
.consent__back:hover { background: #17171a; color: #fff; }
.consent__settings .consent__head { justify-content: flex-start; }
.consent__settings .consent__title { margin-right: auto; }
.consent__settings .consent__back { margin-right: 0; }

.consent__cats { margin-top: 14px; display: grid; gap: 8px; }
.consent__cat {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card);
}
.consent__cat-text { display: flex; flex-direction: column; gap: 3px; cursor: pointer; }
.consent__cat-name { font-size: 15px; line-height: 1.3; color: var(--ink); }
.consent__cat-desc { font-size: 13px; line-height: 1.45; color: var(--muted); }
.consent__always { flex: none; font-size: 12px; line-height: 1; color: var(--muted); white-space: nowrap; }

.consent__switch { position: relative; flex: none; width: 40px; height: 24px; }
.consent__switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.consent__switch span { position: absolute; inset: 0; border-radius: 99px; background: #d4d4d0; transition: background-color 0.25s; }
.consent__switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
  transition: transform 0.3s var(--ease-out);
}
.consent__switch input:checked + span { background: var(--accent); }
.consent__switch input:checked + span::after { transform: translateX(16px); }
.consent__switch input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* footer "Cookie settings" — looks like the other footer links */
.site-footer__cookie { padding: 0; font: inherit; color: inherit; cursor: pointer; text-align: left; }
.site-footer__cookie:hover { opacity: 0.6; }

@media (max-width: 640px) {
  .consent { left: 12px; right: 12px; bottom: 12px; width: auto; }
  .consent__card { padding: 20px; }
}
@media (max-width: 359px) {
  .consent__actions { grid-template-columns: 1fr; }
  .consent__actions .consent__btn--solid { order: -1; }
}
@media (prefers-reduced-motion: reduce) {
  .consent__card { transition: opacity 0.2s; transform: none; }
}
