/* Cookie: banner e pannello delle preferenze. Colori dai token del sito. */
.ck-link { background: none; border: 0; padding: 0; font: inherit; font-weight: 600; color: var(--ink-soft); cursor: pointer; text-decoration: none; }
.ck-link:hover { color: var(--brand); }

.ck-banner {
  position: fixed; z-index: 80; left: 12px; right: 12px; bottom: 12px;
  max-width: 44rem; margin: 0 auto; max-height: calc(100dvh - 24px); overflow-y: auto;
  padding: 20px; border-radius: 20px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); box-shadow: 0 24px 60px -20px rgba(33,26,42,.55);
}
.ck-banner[hidden], .ck-modal[hidden] { display: none; }
.ck-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.ck-title { font-family: var(--display); font-weight: 800; font-size: 1.25rem; line-height: 1.2; margin: 0; }
.ck-title:focus { outline: none; }
.ck-x { flex: none; width: 44px; height: 44px; margin: -8px -8px 0 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink); cursor: pointer; display: grid; place-items: center; }
.ck-x:hover { background: var(--surface-sunk); }
.ck-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.ck-text { margin-top: 8px; color: var(--ink-soft); font-size: .9375rem; line-height: 1.55; }
.ck-text a { color: var(--brand); text-underline-offset: 3px; }
/* Tre azioni identiche: stessa forma, stesso peso */
.ck-actions { display: grid; gap: 10px; margin-top: 16px; }
@media (min-width: 560px) { .ck-actions { grid-template-columns: repeat(3, 1fr); } }
.ck-btn {
  min-height: 48px; padding: 0 18px; border-radius: 999px; cursor: pointer;
  font: 700 .96875rem/1.1 var(--font); color: var(--ink); background: var(--surface);
  border: 2px solid var(--ink); transition: background-color .2s, color .2s, transform .2s;
}
.ck-btn:hover { background: var(--ink); color: var(--paper); }
.ck-btn:active { transform: scale(.98); }

.ck-modal { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 12px; background: rgba(21,17,27,.6); }
.ck-panel {
  width: 100%; max-width: 38rem; max-height: calc(100dvh - 24px); overflow-y: auto;
  padding: 22px; border-radius: 22px; background: var(--surface); color: var(--ink);
  border: 1px solid var(--rule); box-shadow: 0 30px 70px -20px rgba(0,0,0,.6);
}
.ck-cats { margin-top: 12px; }
.ck-cat { padding: 16px 0; border-top: 1px solid var(--rule); }
.ck-cat-row { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.ck-cat h3 { font-size: 1.0625rem; margin: 0; }
.ck-cat p { margin-top: 6px; color: var(--ink-soft); font-size: .9375rem; line-height: 1.5; }
.ck-state { color: var(--ink-faint); font-size: .875rem; font-weight: 600; white-space: nowrap; }
.ck-switch { position: relative; flex: none; width: 52px; height: 32px; }
.ck-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.ck-switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--ink-faint); transition: background-color .2s; }
.ck-switch i::after { content: ""; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ck-switch input:checked + i { background: #a8330a; }
.ck-switch input:checked + i::after { transform: translateX(20px); }
.ck-switch input:focus-visible + i { outline: 2.5px solid var(--brand); outline-offset: 3px; }
.ck-panel .ck-actions { margin-top: 8px; padding-top: 16px; border-top: 1px solid var(--rule); }
@media (prefers-color-scheme: dark) { .ck-switch input:checked + i { background: #c24d1e; } }
@media (prefers-reduced-motion: reduce) { .ck-btn, .ck-switch i, .ck-switch i::after { transition: none; } }
.ck-banner :focus-visible, .ck-panel :focus-visible { outline: 2.5px solid var(--brand); outline-offset: 3px; }
.ck-banner .ck-title:focus-visible, .ck-panel .ck-title:focus-visible { outline: none; }
