/* Cookie notice, settings and media placeholders (public/js/consent.js, views/consent.ts). Flat and small; the same
   dark look on every page, with the page's accent where it has one. */
.ck-banner, .ck-dialog, .ck-toast, .embed-gate-box {
  --ck-bg: #121214;
  --ck-line: rgba(255, 255, 255, 0.1);
  --ck-text: #f4f4f5;
  --ck-muted: #a1a1aa;
  --ck-accent: var(--accent, #ff1f2e);
  /* Always the site's own font (Onest, declared in base.css and profile.css), not the profile's chosen one. */
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ck-text);
  text-align: start;
  line-height: 1.5;
  letter-spacing: normal;
}

/* The notice: a card in the bottom-left corner; full width at the bottom on phones. It never blocks the page. */
.ck-banner {
  position: fixed; left: 16px; bottom: 16px; z-index: 2147483000;
  width: min(400px, calc(100vw - 32px));
  display: grid; gap: 12px; padding: 16px;
  border-radius: 14px; background: var(--ck-bg); border: 1px solid var(--ck-line);
  box-shadow: 0 18px 50px -20px rgba(0, 0, 0, 0.8);
  animation: ck-in 0.25s ease both;
}
.ck-text { margin: 0; font-size: 13px; color: var(--ck-muted); }
.ck-text b { display: block; margin-bottom: 2px; font-size: 14px; color: var(--ck-text); }
.ck-link { color: var(--ck-text); text-decoration: underline; text-underline-offset: 2px; font-size: 13px; }
.ck-link:hover { color: var(--ck-accent); }
.ck-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.ck-btn {
  flex: 1 1 0; min-width: max-content; padding: 9px 12px; border-radius: 10px;
  font: inherit; font-size: 13px; font-weight: 600; cursor: pointer;
  color: var(--ck-text); background: rgba(255, 255, 255, 0.08); border: 1px solid var(--ck-line);
  transition: background 0.15s, border-color 0.15s;
}
.ck-btn:hover { background: rgba(255, 255, 255, 0.14); }
.ck-btn:focus-visible, .ck-x:focus-visible, .ck-switch input:focus-visible + span { outline: 2px solid var(--ck-accent); outline-offset: 2px; }
.ck-btn.ghost { background: none; }
.ck-err { margin: 0; font-size: 12.5px; color: #f87171; }
@media (max-width: 520px) {
  .ck-banner { left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); width: auto; padding: 14px; }
}

/* Settings */
.ck-dialog {
  width: min(480px, calc(100vw - 24px)); max-height: calc(100svh - 24px); overflow: auto;
  margin: auto; padding: 20px; border-radius: 16px;
  background: var(--ck-bg); border: 1px solid var(--ck-line);
  box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.9);
}
.ck-dialog::backdrop { background: rgba(0, 0, 0, 0.6); }
.ck-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.ck-head h2 { margin: 0; font-size: 17px; font-weight: 700; }
.ck-x { width: 32px; height: 32px; border-radius: 8px; border: 0; background: none; color: var(--ck-muted); font-size: 22px; line-height: 1; cursor: pointer; }
.ck-x:hover { color: var(--ck-text); background: rgba(255, 255, 255, 0.08); }
.ck-intro { margin: 6px 0 14px; font-size: 13px; color: var(--ck-muted); }
.ck-rows { display: grid; border: 1px solid var(--ck-line); border-radius: 12px; overflow: hidden; margin-bottom: 14px; }
.ck-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; }
.ck-row + .ck-row { border-top: 1px solid var(--ck-line); }
.ck-row-text { display: grid; gap: 2px; min-width: 0; }
.ck-row-text b { font-size: 13.5px; }
.ck-row-text span { font-size: 12.5px; color: var(--ck-muted); }
.ck-always { flex: none; font-size: 12px; font-weight: 600; color: var(--ck-muted); }
.ck-switch { position: relative; flex: none; width: 40px; height: 24px; cursor: pointer; }
.ck-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.ck-switch span { position: absolute; inset: 0; border-radius: 999px; background: rgba(255, 255, 255, 0.16); transition: background 0.15s; pointer-events: none; }
.ck-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.ck-switch input:checked + span { background: var(--ck-accent); }
.ck-switch input:checked + span::after { transform: translateX(16px); }
[dir="rtl"] .ck-switch span::after { left: auto; right: 3px; }
[dir="rtl"] .ck-switch input:checked + span::after { transform: translateX(-16px); }
.ck-dialog .ck-actions { margin-bottom: 12px; }
.ck-dialog .ck-err { margin-bottom: 10px; }

.ck-toast {
  position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom)); z-index: 2147483001; transform: translateX(-50%);
  padding: 9px 14px; border-radius: 10px; font-size: 13px; background: var(--ck-bg); border: 1px solid var(--ck-line);
  animation: ck-in 0.2s ease both;
}

/* A player waiting for consent: the player's own box, with a short note and two buttons. */
.embed-gate { display: grid; place-items: center; min-height: 152px; }
.embed-gate.ratio { aspect-ratio: 16 / 9; min-height: 0; }
.embed-gate-box { display: grid; gap: 6px; justify-items: center; padding: 16px; text-align: center; max-width: 360px; }
.embed-gate-box b { font-size: 14px; }
.embed-gate-box p { margin: 0; font-size: 12.5px; color: var(--ck-muted); }
.embed-gate-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 4px; }
.embed-gate-btn {
  padding: 7px 12px; border-radius: 9px; font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer;
  color: var(--ck-text); background: rgba(255, 255, 255, 0.1); border: 1px solid var(--ck-line);
}
.embed-gate-btn:hover { background: rgba(255, 255, 255, 0.16); }
.embed-gate-btn.ghost { background: none; }

/* "Cookie settings" in the site footer: looks like the links next to it. */
.footer-cookie { padding: 0; border: 0; background: none; font: inherit; font-weight: inherit; color: var(--muted, #a1a1aa); text-align: start; cursor: pointer; transition: color 0.15s; }
.footer-cookie:hover { color: var(--text, #fff); }

@keyframes ck-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.ck-toast { animation-name: ck-toast-in; }
@keyframes ck-toast-in { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .ck-banner, .ck-toast { animation: none; } }

/* Closing the notice (no choice). */
.ck-banner { padding-inline-end: 40px; }
.ck-banner-x { position: absolute; top: 8px; inset-inline-end: 8px; width: 28px; height: 28px; font-size: 20px; }
@media (max-width: 520px) { .ck-banner { padding-inline-end: 38px; } }

/* Settings where modal dialogs are missing (older in-app browsers): a fixed panel over a dimmed page. */
.ck-shade { position: fixed; inset: 0; z-index: 2147483001; background: rgba(0, 0, 0, 0.6); }
.ck-dialog.ck-dialog-open { position: fixed; inset: 0; z-index: 2147483002; height: fit-content; color: var(--ck-text); }
