/* Cookie consent card (consent.js). Midnight card bottom-left on desktop, bottom sheet on mobile.
   Sits above the mobile sticky bar (.mbar, z-index 40). While open, body has .has-consent-open. */
.zc {
  position: fixed; z-index: 60;
  left: calc(24px + env(safe-area-inset-left, 0px));
  bottom: calc(24px + env(safe-area-inset-bottom, 0px));
  width: min(440px, calc(100vw - 48px));
  max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain;
  padding: 22px;
  border-radius: var(--radius-card, 22px);
  background: var(--midnight, #151C29); color: var(--on-dark, #F1EEE5);
  font: 400 .95rem/1.5 var(--font, system-ui, sans-serif);
  box-shadow: 0 0 0 1px var(--line-dark, rgba(241,238,229,.14)), 0 1px 0 rgba(241,238,229,.08) inset, 0 28px 60px -24px rgba(21,28,41,.75);
  animation: zc-in .4s var(--ease, ease-out) both;
}
.zc[hidden] { display: none; }
@keyframes zc-in { from { opacity: 0; transform: translateY(18px) scale(.98); } }

.zc__head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.zc__ava { flex: none; width: 48px; height: 48px; border-radius: 16px; object-fit: cover; background: var(--midnight-2, #1E2738); box-shadow: 0 0 0 1px var(--line-dark, rgba(241,238,229,.14)); }
.zc__eyebrow { margin: 0 0 2px; font: 700 .72rem/1 var(--font, sans-serif); letter-spacing: .12em; text-transform: uppercase; color: var(--orange, #FF6216); }
.zc__title { margin: 0; font: 800 1.2rem/1.2 var(--font, sans-serif); letter-spacing: -.02em; color: var(--on-dark, #F1EEE5); }
.zc__title:focus { outline: none; }
.zc__x { flex: none; margin-left: auto; align-self: flex-start; width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-dark, rgba(241,238,229,.14)); background: transparent; color: var(--on-dark, #F1EEE5); font: 400 1.35rem/1 var(--font, sans-serif); cursor: pointer; }
.zc__x[hidden] { display: none; }
.zc__x:hover { background: rgba(241,238,229,.08); }

.zc__text { margin: 0 0 18px; color: var(--muted-dark, #A8AEBB); }
.zc__text a { color: var(--on-dark, #F1EEE5); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange, #FF6216); white-space: nowrap; }

.zc__prefs { display: grid; gap: 8px; margin: 0 0 18px; }
.zc__prefs[hidden] { display: none; }
.zc__row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 14px; border-radius: 14px; background: var(--midnight-2, #1E2738); border: 1px solid var(--line-dark, rgba(241,238,229,.14)); cursor: pointer; }
.zc__copy strong { display: block; font-weight: 700; color: var(--on-dark, #F1EEE5); }
.zc__copy small { display: block; font-size: .84rem; line-height: 1.4; color: var(--muted-dark, #A8AEBB); }

/* Toggle switch: a native checkbox, so keyboard and screen readers work as normal. */
.zc__sw { appearance: none; -webkit-appearance: none; flex: none; position: relative; width: 46px; height: 28px; margin: 0; border-radius: 999px; background: rgba(241,238,229,.2); cursor: pointer; transition: background-color .2s; }
.zc__sw::after { content: ""; position: absolute; top: 4px; left: 4px; width: 20px; height: 20px; border-radius: 50%; background: var(--bone, #F1EEE5); box-shadow: 0 1px 3px rgba(0,0,0,.35); transition: transform .2s var(--ease, ease-out); }
.zc__sw:checked { background: var(--orange, #FF6216); }
.zc__sw:checked::after { transform: translateX(18px); }
.zc__sw:disabled { cursor: not-allowed; opacity: .5; }
.zc__sw:checked:disabled { opacity: 1; background: rgba(255,98,22,.45); }

/* Three equal choices: same size, weight and colour, so no option is nudged. */
.zc__actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.zc__btn { min-height: 48px; padding: 6px 10px; border-radius: 999px; border: 1px solid rgba(241,238,229,.28); background: rgba(241,238,229,.06); color: var(--on-dark, #F1EEE5); font: 700 .9rem/1.15 var(--font, sans-serif); letter-spacing: -.01em; cursor: pointer; transition: background-color .18s, border-color .18s, transform .18s; }
.zc__nw { white-space: nowrap; }
.zc__btn:hover { background: rgba(241,238,229,.14); border-color: rgba(241,238,229,.5); transform: translateY(-1px); }
.zc__btn:active { transform: translateY(1px); }

.zc :focus-visible { outline: 2px solid var(--orange, #FF6216); outline-offset: 3px; }
.zc__row:focus-within { border-color: rgba(255,98,22,.6); }

@media (max-width: 640px) {
  .zc {
    left: calc(8px + env(safe-area-inset-left, 0px)); right: calc(8px + env(safe-area-inset-right, 0px));
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
    width: auto; max-height: calc(100dvh - 16px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
    padding: 18px;
  }
  .zc__head { margin-bottom: 10px; }
  .zc__ava { width: 42px; height: 42px; border-radius: 14px; }
  .zc__text { margin-bottom: 14px; font-size: .92rem; }
  .zc__btn { font-size: .86rem; padding: 6px 8px; }
}

@media (prefers-reduced-motion: reduce) {
  .zc { animation: none; }
  .zc__sw, .zc__sw::after, .zc__btn { transition: none; }
}
