/* banner dei cookie (inc/cookies.php, assets/js/cookies.js): scheda in basso a sinistra, sopra tutto tranne il
   controllo dell'età */
.cookie { position: fixed; z-index: 200; left: 16px; bottom: max(16px, env(safe-area-inset-bottom)); width: min(440px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow-y: auto; display: grid; gap: 12px; padding: 22px 22px 20px; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 4px; box-shadow: 0 18px 44px rgba(26, 24, 21, .18); font: 400 14px/1.55 var(--sans); opacity: 0; transform: translateY(16px); transition: opacity .4s, transform .5s var(--ease); }
.cookie[hidden] { display: none; }
.cookie.is-on { opacity: 1; transform: none; }
.cookie__title { font: 400 1.35rem/1.2 var(--ff-display); }
.cookie__text { color: var(--mute); }
.cookie__link { justify-self: start; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.cookie__link:hover { color: var(--accent); }
.cookie__prefs { display: grid; border-top: 1px solid var(--line); }
.cookie__prefs[hidden] { display: none; }
.cookie__cat { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
label.cookie__cat { cursor: pointer; }
.cookie__txt { display: grid; gap: 2px; }
.cookie__name { font-weight: 600; }
.cookie__desc { color: var(--mute); font-size: 13px; line-height: 1.45; }
.cookie__always { flex: none; font: 500 10.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
/* interruttore */
.cookie__switch { flex: none; appearance: none; -webkit-appearance: none; position: relative; width: 40px; height: 22px; border-radius: 999px; background: var(--line-2); cursor: pointer; transition: background .25s; }
.cookie__switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.cookie__switch:checked { background: var(--ink); }
.cookie__switch:checked::after { transform: translateX(18px); }
.cookie__switch:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.cookie__actions { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; margin-top: 4px; }
.cookie__actions .btn { padding: 0 10px; justify-content: center; }
.cookie__actions .btn[hidden] { display: none; }
@media (max-width: 560px) {
  .cookie { left: 10px; right: 10px; width: auto; bottom: max(10px, env(safe-area-inset-bottom)); padding: 18px 16px 16px; }
  .cookie__actions { grid-template-columns: 1fr 1fr; }
  .cookie__actions .btn:first-child { grid-column: 1 / -1; order: 3; }
}
@media (prefers-reduced-motion: reduce) { .cookie { transition: none; } }
@media print { .cookie { display: none !important; } }
@media (max-width: 560px) { .cookie.is-prefs .cookie__actions .btn[data-cookie="save"] { grid-column: 1 / -1; order: 3; } }
/* pulsanti pieni: rossi (colore del marchio), neri al passaggio del mouse */
.cookie__actions .btn--dark { background: var(--accent); color: var(--paper); }
.cookie__actions .btn--dark:hover, .cookie__actions .btn--dark:focus-visible { background: var(--ink); }
