/* Cookie banner (js/consent.js). A small card bottom left on desktop, a
   sheet along the bottom on phones. The contact dock steps aside while it
   is open (html.cc-open), so the two never overlap. */
.cc {
  position: fixed; z-index: 200; left: clamp(1rem, 2.5vw, 2rem); bottom: clamp(1rem, 2.5vw, 2rem);
  width: min(27rem, calc(100vw - 2rem)); box-sizing: border-box;
  padding: 1.5rem 1.6rem 1.25rem;
  background: var(--sc-surface); color: var(--sc-ink);
  border: 1px solid color-mix(in oklab, var(--pf-line) 70%, transparent);
  box-shadow: 0 18px 50px -20px rgb(38 31 30 / 0.45);
  opacity: 0; transform: translateY(1rem); visibility: hidden;
  transition: opacity 0.4s ease, transform 0.4s ease, visibility 0s linear 0.4s;
}
.cc.is-open { opacity: 1; transform: none; visibility: visible; transition-delay: 0s; }
.cc__title {
  margin: 0 0 0.7rem; font-size: 0.62rem; font-weight: 400;
  letter-spacing: 0.28em; text-transform: uppercase;
}
.cc__text { margin: 0; font-size: 0.78rem; line-height: 1.7; color: color-mix(in oklab, var(--sc-ink) 80%, transparent); }
.cc__text a { color: var(--sc-ink); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
.cc__prefs { margin-top: 1rem; border-top: 1px solid var(--pf-line); }
.cc__prefs[hidden] { display: none; }
.cc__cat {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.8rem 0; border-bottom: 1px solid var(--pf-line); cursor: pointer;
}
.cc__cat-text b { display: block; font-size: 0.74rem; font-weight: 500; }
.cc__cat-text small { display: block; margin-top: 0.2rem; font-size: 0.68rem; line-height: 1.55; color: var(--sc-ink-soft); }
/* on/off switch */
.cc__switch {
  appearance: none; flex: none; position: relative; margin: 0;
  width: 2.3rem; height: 1.3rem; border-radius: 999px; cursor: pointer;
  background: color-mix(in oklab, var(--pf-line) 80%, var(--sc-surface));
  transition: background 0.2s ease;
}
.cc__switch::after {
  content: ""; position: absolute; top: 0.15rem; left: 0.15rem;
  width: 1rem; height: 1rem; border-radius: 50%; background: #fff;
  box-shadow: 0 1px 3px rgb(0 0 0 / 0.2); transition: transform 0.2s ease;
}
.cc__switch:checked { background: var(--sc-accent); }
.cc__switch:checked::after { transform: translateX(1rem); }
.cc__switch:disabled { opacity: 0.55; cursor: default; }
.cc__switch:focus-visible { outline: 1px solid var(--sc-ink); outline-offset: 3px; }
.cc__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem; margin-top: 1.15rem; }
/* Accept and Reject look the same on purpose: neither may be pushed. */
.cc__btn {
  flex: 1 1 0; min-height: 2.6rem; padding: 0 1rem; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: 0.58rem; font-weight: 400; letter-spacing: 0.24em; text-transform: uppercase;
  background: var(--sc-accent); color: var(--sc-accent-ink); border: 1px solid var(--sc-accent);
  transition: opacity 0.2s ease;
}
.cc__btn:hover { opacity: 0.85; }
.cc__btn--link {
  flex: 1 0 100%; min-height: 0; padding: 0.4rem 0; background: none; border: 0; color: var(--sc-ink-soft);
}
.cc__btn--link:hover { color: var(--sc-ink); opacity: 1; }
.cc__btn[hidden] { display: none; }
.cc__btn:focus-visible { outline: 1px solid var(--sc-ink); outline-offset: 3px; }
html.cc-open .pf-dock { opacity: 0; pointer-events: none; }
@media (max-width: 600px) {
  .cc { left: 0; bottom: 0; width: 100%; border-width: 1px 0 0; padding: 1.25rem var(--sc-gutter) calc(1rem + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { .cc { transition: none; } }
