/* =========================================================
   XENIA — Banner consenso cookie + contenuti bloccati
   Usato da cookie-consent.js. Nessuna dipendenza, nessuna risorsa esterna.
   Token: ink #111314 · testo #3B4043 · panna #F7F7F4 · linea #DBDBD9
   ========================================================= */

.cc, .cc *, .cc *::before, .cc *::after,
.consent-embed, .consent-embed *{ box-sizing:border-box; }

/* ---------- Pannello (banner e "Personalizza") ---------- */
.cc{
  position:fixed; z-index:200; left:16px; bottom:16px;
  width:min(540px, calc(100% - 32px));
  max-height:calc(100vh - 32px); max-height:calc(100dvh - 32px);
  overflow-y:auto; overscroll-behavior:contain;
  padding:32px;
  background:#F7F7F4; border:1px solid #DBDBD9; border-radius:0;
  box-shadow:0 12px 40px rgba(17,19,20,.14);
  color:#3B4043; font-family:"Inter", Arial, sans-serif; font-size:15px; line-height:23px;
  -webkit-font-smoothing:antialiased;
}
.cc[hidden]{ display:none; }
.cc:focus{ outline:none; }
.cc--prefs{ width:min(600px, calc(100% - 32px)); }

.cc p{ margin:0; }
.cc__title{
  padding-right:40px;                           /* spazio per la X */
  font-family:"Inter Tight", Arial, sans-serif; font-weight:400;
  font-size:24px; line-height:30px; letter-spacing:-0.01em; color:#111314;
}
.cc__text{ margin-top:12px !important; }
.cc__links{ margin-top:12px !important; font-size:14px; line-height:20px; color:#111314; }
.cc a{
  color:#111314; font-weight:500;
  text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px;
}
.cc a:hover{ text-decoration-thickness:2px; }
.cc :focus-visible{ outline:2px solid #111314; outline-offset:3px; }

/* X di chiusura (= rifiuto sul banner) */
.cc__x{
  position:absolute; top:14px; right:14px;
  width:44px; height:44px; padding:0; border:0; background:none; cursor:pointer;
  display:inline-flex; align-items:center; justify-content:center; color:#111314;
}
.cc__x svg{ width:18px; height:18px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; }

/* Azioni: «Accetta tutti» e «Rifiuta» identici (pari evidenza) */
.cc__actions{ margin-top:24px; display:flex; flex-wrap:wrap; align-items:center; gap:16px; }
.cc__btn{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:148px; height:44px; padding:0 20px; margin:0;
  border:1px solid #111314; border-radius:12px; background:#111314; color:#FFFFFF;
  font-family:"Inter", Arial, sans-serif; font-size:14px; line-height:20px; font-weight:500;
  white-space:nowrap; cursor:pointer; transition:background 200ms ease, border-color 200ms ease;
}
.cc__btn:hover{ background:#3B4043; border-color:#3B4043; }
.cc__more{
  height:44px; padding:0 4px; margin:0; border:0; background:none; cursor:pointer;
  font-family:"Inter", Arial, sans-serif; font-size:14px; line-height:20px; font-weight:500; color:#111314;
  text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px;
}
.cc__more:hover{ text-decoration-thickness:2px; }

/* ---------- Categorie (pannello Personalizza) ---------- */
.cc__cats{ margin-top:24px; border-top:1px solid #DBDBD9; }
.cc__cat{
  display:flex; align-items:flex-start; justify-content:space-between; gap:24px;
  padding:20px 0; border-bottom:1px solid #DBDBD9;
}
.cc__cat-name{ display:block; font-size:15px; line-height:22px; font-weight:600; color:#111314; cursor:pointer; }
.cc__cat-desc{ margin-top:6px !important; font-size:14px; line-height:21px; }

/* Interruttore */
.cc__switch{
  -webkit-appearance:none; appearance:none;
  position:relative; flex:none; width:44px; height:24px; margin:0;
  border-radius:100px; background:#DBDBD9; cursor:pointer;
  transition:background 200ms ease;
}
.cc__switch::before{
  content:""; position:absolute; top:3px; left:3px; width:18px; height:18px; border-radius:50%;
  background:#FFFFFF; box-shadow:0 1px 2px rgba(17,19,20,.25); transition:transform 200ms ease;
}
.cc__switch:checked{ background:#111314; }
.cc__switch:checked::before{ transform:translateX(20px); }
.cc__switch:disabled{ opacity:.45; cursor:not-allowed; }
.cc__switch:focus-visible{ outline:2px solid #111314; outline-offset:3px; }

.cc--prefs .cc__actions{ margin-top:24px; }
.cc--prefs .cc__links{ margin-top:20px !important; }

/* ---------- Contenuti bloccati (es. Google Maps) ---------- */
.consent-embed{
  position:relative; display:flex; flex-direction:column;
  background:#F7F7F4; border:1px solid #DBDBD9;
}
.consent-embed.is-loaded{ border:0; }
.consent-embed iframe{
  position:absolute; inset:0; display:block; width:100%; height:100%; border:0;
}
.ce-ph{
  flex:1; display:flex; flex-direction:column; justify-content:center; align-items:flex-start;
  padding:40px; max-width:560px;
  font-family:"Inter", Arial, sans-serif; color:#3B4043; font-size:15px; line-height:23px;
}
.ce-ph p{ margin:0; }
.ce-ph__pin{ width:28px; height:28px; fill:#E5322C; }
.ce-ph__title{
  margin-top:16px !important;
  font-family:"Inter Tight", Arial, sans-serif; font-size:24px; line-height:30px; letter-spacing:-0.01em; color:#111314;
}
.ce-ph__text{ margin-top:12px !important; }
.ce-ph__actions{ margin-top:24px; display:flex; flex-wrap:wrap; align-items:center; gap:16px 24px; }
.ce-ph__link{
  display:inline-flex; align-items:center; gap:6px; padding:12px 0;
  font-size:14px; line-height:20px; font-weight:500; color:#111314;
  text-decoration:underline; text-underline-offset:3px; text-decoration-thickness:1px;
}
.ce-ph__link:hover{ text-decoration-thickness:2px; }
.ce-ph__link svg{ width:16px; height:16px; fill:none; stroke:currentColor; stroke-width:1.5; stroke-linecap:round; stroke-linejoin:round; }
.ce-ph__note{ margin-top:16px !important; font-size:13px; line-height:19px; }
.ce-ph__note a{ color:#111314; text-decoration:underline; text-underline-offset:3px; }
.ce-ph :focus-visible{ outline:2px solid #111314; outline-offset:3px; }

/* ---------- Mobile (progettato su 390) ---------- */
@media (max-width:767px){
  .cc, .cc--prefs{
    left:0; right:0; bottom:0; width:100%;
    max-height:88vh; max-height:88dvh;
    padding:24px 20px;
    border-width:1px 0 0;
    box-shadow:0 -8px 32px rgba(17,19,20,.12);
  }
  .cc__x{ top:8px; right:8px; }
  .cc__title{ font-size:22px; line-height:28px; }
  .cc__text{ font-size:14px; line-height:21px; }
  .cc__actions{ margin-top:20px; flex-direction:column; align-items:stretch; gap:16px; }
  .cc__btn{ width:100%; min-width:0; }
  .cc__more{ align-self:center; }
  .cc__cat{ gap:16px; padding:16px 0; }

  .ce-ph{ padding:24px 20px; }
  .ce-ph__title{ font-size:22px; line-height:28px; }
  .ce-ph__text{ font-size:14px; line-height:21px; }
  .ce-ph__actions{ flex-direction:column; align-items:flex-start; gap:16px; margin-top:20px; }
  .ce-ph__actions .cc__btn{ width:100%; }
}

@media (prefers-reduced-motion:reduce){
  .cc__btn, .cc__switch, .cc__switch::before{ transition:none; }
}
