/* ============ banner cookie + pagine privacy/cookie ============ */
.cc, .legal-page { --cc-bg: #0a0806; --cc-panel: rgba(14,10,7,.97); --cc-ink: #f4ece0; --cc-ink2: rgba(244,236,224,.82); --cc-ink3: rgba(244,236,224,.58); --cc-line: rgba(244,236,224,.18); --cc-accent: #ff8300; --cc-accent-ink: #140c04; --cc-font: 'Hanken Grotesk',system-ui,-apple-system,'Segoe UI',sans-serif; --cc-disp: 'Instrument Serif',Georgia,serif; }
.cc { position: fixed; left: 16px; bottom: 16px; z-index: 9000; width: min(460px, calc(100vw - 32px)); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow: auto; overscroll-behavior: contain; padding: 22px 22px 18px; border-radius: 18px; border: 1px solid var(--cc-line); background: var(--cc-panel); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .9); color: var(--cc-ink2); font-family: var(--cc-font); font-weight: 400; text-align: left; opacity: 0; transform: translateY(18px); transition: opacity .35s ease, transform .35s cubic-bezier(.2, .9, .2, 1); cursor: auto; }
.cc *, .cc *::before, .cc *::after { box-sizing: border-box; cursor: auto; }
.cc button, .cc label, .cc a { cursor: pointer; }
.cc.on { opacity: 1; transform: none; }
.cc[hidden], .cc [hidden] { display: none !important; }
.cc__x { position: absolute; top: 10px; right: 12px; width: 36px; height: 36px; border-radius: 50%; font-size: 22px; line-height: 1; color: var(--cc-ink2); background: none; border: 0; }
.cc__x:hover { background: color-mix(in srgb, var(--cc-ink) 10%, transparent); color: var(--cc-ink); }
.cc__k { margin: 0; font-size: 11px; font-weight: 600; letter-spacing: .26em; text-transform: uppercase; color: var(--cc-accent); }
.cc__t { margin: 6px 0 0; font-family: var(--cc-disp); font-weight: 400; font-size: 24px; line-height: 1.15; letter-spacing: 0; text-transform: none; color: var(--cc-ink); }
.cc__d { margin: 10px 0 0; font-size: 13.5px; line-height: 1.55; }
.cc__d a { color: var(--cc-ink); text-decoration: underline; text-underline-offset: 3px; }
.cc__cats { display: grid; gap: 8px; margin-top: 14px; }
.cc__cat { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--cc-line); }
.cc__cat b { display: block; font-size: 14px; font-weight: 600; color: var(--cc-ink); }
.cc__cat small { display: block; margin-top: 2px; font-size: 12.5px; line-height: 1.45; color: var(--cc-ink3); }
.cc__cat input { position: absolute; opacity: 0; pointer-events: none; }
.cc__cat i { flex: none; position: relative; width: 40px; height: 22px; border-radius: 999px; background: color-mix(in srgb, var(--cc-ink) 22%, transparent); transition: background .25s; }
.cc__cat i::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--cc-panel); transition: transform .25s cubic-bezier(.2, .9, .2, 1); }
.cc__cat input:checked + i { background: var(--cc-accent); }
.cc__cat input:checked + i::after { transform: translateX(18px); background: var(--cc-accent-ink); }
.cc__cat input:disabled + i { opacity: .55; }
.cc__cat input:focus-visible + i { outline: 2px solid var(--cc-ink); outline-offset: 2px; }
/* Accetta e Rifiuta hanno lo stesso peso visivo, come chiede il Garante */
.cc__btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; }
.cc__b { height: 46px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--cc-accent); background: var(--cc-accent); color: var(--cc-accent-ink); font: 600 14px/1 var(--cc-font); letter-spacing: 0; text-transform: none; transition: filter .25s; }
.cc__b:hover { filter: brightness(1.1); }
.cc__b--link { grid-column: 1 / -1; height: auto; min-height: 44px; padding: 6px; border: 0; background: none; font-weight: 500; color: var(--cc-ink2); text-decoration: underline; text-underline-offset: 3px; }
.cc__b--link:hover { background: none; color: var(--cc-ink); filter: none; }
.cc__b[data-cc="save"] { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .cc { -webkit-backdrop-filter: none; backdrop-filter: none; left: 8px; right: 8px; bottom: 8px; width: auto; max-height: 86vh; max-height: 86dvh; padding: 20px 18px 14px; border-radius: 16px; }
  .cc__t { font-size: 22px; }
  .cc__d { font-size: 13px; }
  .cc__b { height: 48px; }
}
@media (prefers-reduced-motion: reduce) { .cc { transition: opacity .2s; transform: none; } }

/* ---------- pagine privacy e cookie ---------- */
.legal-page { margin: 0; background: var(--cc-bg); color: var(--cc-ink2); font-family: var(--cc-font); -webkit-text-size-adjust: 100%; overflow: auto !important; height: auto !important; cursor: auto; }
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; max-width: 780px; margin: 0 auto; padding: 22px 20px 0; font-size: 14px; }
.legal-top a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cc-ink); text-decoration: underline; text-underline-offset: 3px; }
.legal-top b { font-family: var(--cc-disp); font-weight: 600; letter-spacing: .06em; color: var(--cc-ink); }
.legal { max-width: 780px; margin: 0 auto; padding: 28px 20px 70px; font-size: 16px; line-height: 1.7; }
.legal h1 { margin: 12px 0 0; font-family: var(--cc-disp); font-weight: 400; font-size: clamp(2.2rem, 7vw, 3.4rem); line-height: 1.08; letter-spacing: 0; text-transform: none; color: var(--cc-ink); }
.legal__upd { margin: 14px 0 0; font-size: 13.5px; color: var(--cc-ink3); }
.legal h2 { margin: 40px 0 0; font-family: var(--cc-disp); font-weight: 400; font-size: 1.55rem; line-height: 1.2; letter-spacing: 0; text-transform: none; color: var(--cc-ink); }
.legal h3 { margin: 24px 0 0; font-family: var(--cc-font); font-size: 16px; font-weight: 700; letter-spacing: 0; text-transform: none; color: var(--cc-ink); }
.legal p, .legal ul, .legal .legal__scroll { margin: 12px 0 0; }
.legal ul { padding-left: 20px; }
.legal li { margin-top: 4px; }
.legal a { color: var(--cc-ink); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--cc-accent); }
.legal strong { color: var(--cc-ink); font-weight: 600; }
.legal code { font-size: 13px; padding: 2px 6px; border-radius: 6px; background: color-mix(in srgb, var(--cc-ink) 9%, transparent); color: var(--cc-ink); overflow-wrap: anywhere; }
.legal__table code { white-space: nowrap; overflow-wrap: normal; }
.legal__scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.legal__table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.legal__table th, .legal__table td { padding: 10px 12px; border: 1px solid var(--cc-line); text-align: left; vertical-align: top; }
.legal__table th { color: var(--cc-ink); font-weight: 600; background: color-mix(in srgb, var(--cc-ink) 6%, transparent); }
.legal .todo { padding: 0 4px; border-radius: 4px; background: #ffe58a; color: #3a2a00; font-style: normal; }
.legal__btn { display: inline-flex; align-items: center; min-height: 46px; margin-top: 14px; padding: 0 22px; border-radius: 999px; border: 0; background: var(--cc-accent); color: var(--cc-accent-ink); font: 600 14px/1 var(--cc-font); cursor: pointer; }
.legal-foot { max-width: 780px; margin: 0 auto; padding: 0 20px 50px; display: flex; flex-wrap: wrap; gap: 4px 18px; font-size: 14px; color: var(--cc-ink3); }
.legal-foot a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cc-ink2); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 560px) { .legal { font-size: 15.5px; } .legal h2 { font-size: 1.4rem; } }

/* telefoni: banner basso e compatto, così non copre il modulo; sparisce mentre si scrive */
@media (max-width: 560px) {
  .cc { max-height: 38vh; max-height: 38dvh; padding: 12px 14px 8px; border-radius: 14px; }
  .cc__k { display: none; }
  .cc__t { font-size: 17px; margin-top: 0; padding-right: 36px; }
  .cc__x { top: 4px; right: 6px; }
  .cc__d { font-size: 12px; line-height: 1.4; margin-top: 6px; }
  .cc__btns { margin-top: 10px; gap: 6px; }
  .cc__b { height: 40px; font-size: 13px; }
  .cc__b--link { min-height: 34px; padding: 2px; }
}
html.is-typing .cc { display: none !important; }

/* il banner non deve intrappolare lo scorrimento del dito: la pagina scorre anche se si parte da qui */
@media (max-width: 560px) { .cc { overflow: visible; overscroll-behavior: auto; touch-action: pan-y; } }


/* regola fissa: banner cookie PICCOLO (telefono ~145 px, computer 380 px) */
@media (min-width: 561px) {
  .cc { width: min(380px, calc(100vw - 32px)); padding: 14px 16px 10px; border-radius: 14px; left: 14px; bottom: 14px; }
  .cc__k { display: none; }
  .cc__t { font-size: 17px; margin-top: 0; padding-right: 30px; }
  .cc__d { font-size: 12.5px; line-height: 1.45; margin-top: 6px; }
  .cc__btns { margin-top: 10px; gap: 6px; }
  .cc__b { height: 38px; font-size: 13px; }
  .cc__b--link { min-height: 30px; font-size: 12.5px; }
  .cc__x { width: 30px; height: 30px; top: 6px; right: 8px; font-size: 18px; }
}
@media (max-width: 560px) {
  .cc { padding: 8px 12px 4px; border-radius: 12px; left: 8px; right: 8px; bottom: calc(8px + env(safe-area-inset-bottom)); }
  .cc__t { font-size: 14px; padding-right: 28px; }
  .cc__d { font-size: 11px; line-height: 1.38; margin-top: 2px; }
  .cc__btns { margin-top: 7px; gap: 6px; }
  .cc__b { height: 34px; font-size: 12.5px; }
  .cc__b--link { min-height: 26px; padding: 0; font-size: 11.5px; }
  .cc__x { width: 28px; height: 28px; top: 2px; right: 4px; font-size: 18px; }
}

/* testo breve ovunque; quello lungo solo in "Personalizza" */
.cc__long { display: none; } .cc__short { display: inline; }
.cc.is-custom .cc__long { display: inline; } .cc.is-custom .cc__short { display: none; }
.cc__short a { color: var(--cc-ink); text-decoration: underline; text-underline-offset: 3px; }
