/* ============================================================
   Банер згоди на cookie — «Гучний» (DESIGN.md).
   Чорна картка: локальне перевизначення токенів (The Local Night Rule).
   «Godta alle» і «Bare nødvendige» мають однакову вагу.
   ============================================================ */

.ckb {
  --bg: #0f0f0f;
  --surface: #1c1c1b;
  --surface-2: #262625;
  --line: rgba(236, 236, 234, 0.16);
  --ink: #f2f2ef;
  --ink-2: #cfcfca;
  --ink-3: #a6a5a0;

  position: fixed;
  left: clamp(8px, 1.2vw, 16px);
  right: clamp(8px, 1.2vw, 16px);
  bottom: clamp(8px, 1.2vw, 16px);
  z-index: 400;
  display: grid;
  gap: 0.625rem;
  max-width: 32rem;
  max-height: calc(100vh - 16px);
  max-height: calc(100dvh - 16px);
  overflow-y: auto;
  padding: 1rem 1.125rem;
  border-radius: 20px;
  background: var(--bg);
  color: var(--ink-2);
  font-size: 0.9375rem;
  line-height: 1.45;
}

.ckb:focus { outline: none; }
.ckb :focus-visible { outline-color: var(--accent); }

.ckb__title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1;
  text-transform: uppercase;
}

.ckb__text a { color: var(--ink); text-underline-offset: 3px; }

.ckb__legend {
  margin-bottom: 0.5rem;
  color: var(--ink);
  font-weight: 600;
}

.ckb__prefs fieldset { display: grid; gap: 0.5rem; }

.ckb__opt {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 0.875rem;
  align-items: start;
  padding: 0.875rem 1rem;
  border-radius: 18px;
  background: var(--surface);
  cursor: pointer;
}

.ckb__opt input {
  position: absolute;
  left: 1rem;
  top: 0.875rem;
  width: 48px;
  height: 28px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.ckb__opt input:disabled { cursor: default; }
.ckb__opt b { display: block; color: var(--ink); font-weight: 600; }
.ckb__opt small { display: block; color: var(--ink-3); font-size: 1rem; line-height: 1.45; }

/* Перемикач: пігулка 48×28 з кружком */
.ckb__switch {
  position: relative;
  width: 48px;
  height: 28px;
  border: 1.5px solid var(--ink-3);
  border-radius: 999px;
  transition: background-color 0.2s var(--ease), border-color 0.2s var(--ease);
}

.ckb__switch::after {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  background: var(--ink-3);
  transition: transform 0.2s var(--ease), background-color 0.2s var(--ease);
}

.ckb__opt input:checked + .ckb__switch { background: var(--accent); border-color: var(--accent); }
.ckb__opt input:checked + .ckb__switch::after { background: var(--on-accent); transform: translateX(20px); }
.ckb__opt input:disabled + .ckb__switch { opacity: 0.6; }
.ckb__opt input:focus-visible + .ckb__switch { outline: 2px solid var(--accent); outline-offset: 3px; }

.ckb__actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.ckb__actions .btn { flex: 1 1 auto; }
.ckb .btn--primary:hover { background: #ffffff; }
.ckb .btn--secondary:hover { background: var(--ink); color: var(--bg); }

@media (min-width: 40rem) {
  .ckb { padding: 1.125rem 1.25rem; }
}

@media print {
  .ckb { display: none !important; }
}
