/* StileJuventus V9.477 — rifinitura grafica banner Privacy / Pubblicità / Premium.
 * Solo presentazione: nessuna modifica a consenso, CMP, monetizzazione o Premium. */

/* V9.489 HF1 — le due viste del consenso sono mutuamente esclusive.
 * Alcuni override responsive usano display:flex!important sulla prima vista:
 * [hidden] deve vincere sempre, altrimenti il Centro preferenze viene renderizzato
 * sotto alla schermata iniziale invece di sostituirla. */
.slr-consent-first[hidden],
.slr-consent-preferences[hidden]{
  display:none!important;
}

/* Titolo più editoriale e meno invasivo su desktop/tablet. */
.slr-consent-dialog-choice h2#slr-consent-title{
  max-width:980px;
  margin:8px 58px 14px 0!important;
  font-size:clamp(30px,3vw,42px)!important;
  line-height:1.04!important;
  letter-spacing:-.04em!important;
}

/*
 * Tema Giorno: alcuni override storici del sito applicano anche
 * -webkit-text-fill-color ai bottoni. Forziamo quindi colore + text-fill sui
 * CTA scuri e sui loro figli, compresi hover/focus, per Safari/Chrome.
 */
html[data-slr-theme="light"] body.slr-site button.slr-consent-choice.is-accept,
html[data-slr-theme="light"] body.slr-site button.slr-consent-choice.is-accept:is(:hover,:focus-visible){
  background:#0f1419!important;
  background-color:#0f1419!important;
  border-color:#0f1419!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html[data-slr-theme="light"] body.slr-site button.slr-consent-choice.is-accept:is(:hover,:focus-visible){
  background:#000!important;
  background-color:#000!important;
  border-color:#000!important;
}
html[data-slr-theme="light"] body.slr-site button.slr-consent-choice.is-accept :is(strong,span,b,i),
html[data-slr-theme="light"] body.slr-site button.slr-consent-choice.is-accept:is(:hover,:focus-visible) :is(strong,span,b,i){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  opacity:1!important;
}
html[data-slr-theme="light"] body.slr-site button.slr-consent-choice.is-accept small,
html[data-slr-theme="light"] body.slr-site button.slr-consent-choice.is-accept:is(:hover,:focus-visible) small{
  color:#d9dfe5!important;
  -webkit-text-fill-color:#d9dfe5!important;
  opacity:1!important;
}
html[data-slr-theme="light"] body.slr-site button.slr-consent-choice.is-accept .slr-consent-choice-kicker{
  background:rgba(255,255,255,.14)!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Anche il chip PREMIUM è scuro: il testo deve restare bianco. */
html[data-slr-theme="light"] body.slr-site button.slr-consent-choice.is-premium .slr-consent-choice-kicker{
  background:#151515!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

/* Pulsante Google nelle preferenze: stessa protezione al contrasto. */
html[data-slr-theme="light"] body.slr-site .slr-consent-google-settings,
html[data-slr-theme="light"] body.slr-site .slr-consent-google-settings:is(:hover,:focus-visible){
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

@media(max-width:900px){
  .slr-consent-dialog-choice{
    width:min(760px,100%)!important;
  }
  .slr-consent-dialog-choice h2#slr-consent-title{
    font-size:clamp(28px,5vw,36px)!important;
  }
  .slr-consent-copy-choice{
    gap:8px!important;
  }
  .slr-consent-choice-grid{
    gap:10px!important;
    margin-top:18px!important;
  }
  .slr-consent-choice{
    min-height:0!important;
    padding:17px 18px!important;
    border-radius:18px!important;
  }
}

/*
 * Mobile: ordine esplicito dei blocchi. La vecchia CMP assegna order:5 alla
 * copy; senza questo override il link rosso "Gestisci..." può salire prima
 * dei testi introduttivi. Ogni elemento torna quindi nel flusso corretto.
 */
@media(max-width:680px){
  .slr-consent-layer{
    padding:8px 8px calc(70px + env(safe-area-inset-bottom,0px))!important;
  }
  .slr-consent-dialog.slr-consent-dialog-choice{
    width:100%!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - 86px - env(safe-area-inset-bottom,0px))!important;
    margin:0 auto!important;
    padding:18px 14px calc(15px + env(safe-area-inset-bottom,0px))!important;
    border-radius:20px!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
  }
  .slr-consent-first{
    display:flex!important;
    flex-direction:column!important;
    min-width:0!important;
  }
  .slr-consent-first>.slr-consent-eyebrow{order:1!important}
  .slr-consent-first>h2#slr-consent-title{order:2!important}
  .slr-consent-first>.slr-consent-copy{order:3!important}
  .slr-consent-first>.slr-consent-choice-grid{order:4!important}
  .slr-consent-first>.slr-consent-customize-link{order:5!important}
  .slr-consent-first>.slr-consent-links{order:6!important}

  .slr-consent-eyebrow{
    padding-right:42px!important;
    font-size:9px!important;
    line-height:1.3!important;
    letter-spacing:.12em!important;
  }
  .slr-consent-dialog-choice h2#slr-consent-title{
    margin:7px 42px 11px 0!important;
    font-size:clamp(24px,7.2vw,29px)!important;
    line-height:1.04!important;
    letter-spacing:-.035em!important;
  }
  .slr-consent-copy-choice,
  .slr-consent-copy-premium{
    grid-template-columns:1fr!important;
    gap:7px!important;
  }
  .slr-consent-copy-choice p,
  .slr-consent-copy-premium p{
    font-size:12.5px!important;
    line-height:1.4!important;
  }
  .slr-consent-choice-grid{
    grid-template-columns:1fr!important;
    gap:8px!important;
    margin-top:14px!important;
  }
  .slr-consent-choice{
    width:100%!important;
    min-height:0!important;
    gap:5px!important;
    padding:13px 14px!important;
    border-radius:16px!important;
    transform:none!important;
  }
  .slr-consent-choice:hover,
  .slr-consent-choice:focus-visible{
    transform:none!important;
  }
  .slr-consent-choice strong{
    font-size:16px!important;
    line-height:1.18!important;
  }
  .slr-consent-choice small{
    font-size:11.5px!important;
    line-height:1.36!important;
  }
  .slr-consent-choice-kicker{
    min-height:20px!important;
    padding:3px 7px!important;
    font-size:8.5px!important;
  }
  .slr-consent-customize-link{
    position:static!important;
    display:block!important;
    width:fit-content!important;
    max-width:100%!important;
    margin:12px auto 0!important;
    padding:2px 0!important;
    font-size:13px!important;
    line-height:1.3!important;
    text-align:center!important;
    white-space:normal!important;
    transform:none!important;
  }
  .slr-consent-links{
    display:flex!important;
    flex-wrap:wrap!important;
    gap:8px 14px!important;
    margin:14px 0 0!important;
    font-size:11.5px!important;
    line-height:1.35!important;
  }
  .slr-consent-close{
    top:10px!important;
    right:10px!important;
    width:36px!important;
    height:36px!important;
    font-size:22px!important;
  }
}

@media(max-width:380px){
  .slr-consent-dialog.slr-consent-dialog-choice{
    padding-inline:12px!important;
  }
  .slr-consent-dialog-choice h2#slr-consent-title{
    font-size:23px!important;
  }
  .slr-consent-choice{
    padding:12px!important;
  }
  .slr-consent-copy-choice p,
  .slr-consent-copy-premium p{
    font-size:12px!important;
  }
}

/* V9.523 — la chiusura della prima scelta equivale alle sole tecnologie
 * necessarie: il comando deve essere immediatamente riconoscibile e accessibile. */
.slr-consent-dialog-choice .slr-consent-close{
  background:#fff!important;
  border:2px solid #1b2229!important;
  color:#111820!important;
  -webkit-text-fill-color:#111820!important;
  box-shadow:0 4px 16px rgba(0,0,0,.14)!important;
  font-weight:900!important;
}
.slr-consent-dialog-choice .slr-consent-close:is(:hover,:focus-visible){
  background:#111820!important;
  border-color:#111820!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
  outline:3px solid rgba(153,10,44,.24)!important;
  outline-offset:2px!important;
}
html[data-slr-theme="dark"] .slr-consent-dialog-choice .slr-consent-close{
  background:#f0b51d!important;
  border-color:#f0b51d!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
}
html[data-slr-theme="dark"] .slr-consent-dialog-choice .slr-consent-close:is(:hover,:focus-visible){
  background:#ffd24a!important;
  border-color:#ffd24a!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  outline-color:rgba(240,181,29,.35)!important;
}
/* V9.524: FREE/PREMIUM, due percorsi commerciali. */
@media (min-width:761px){
  .slr-consent-choice-grid.slr-consent-choice-grid-commercial{grid-template-columns:repeat(2,minmax(0,1fr))!important}
}


/* V9.525 — primo livello Privacy/CMP compatto e interamente visibile.
 * Nessuna modifica alla logica di consenso: si riducono soltanto copy, spazi
 * e dimensioni del primo livello FREE/PREMIUM. */
.slr-consent-layer{
  align-items:center!important;
  padding:16px!important;
}
.slr-consent-dialog.slr-consent-dialog-choice{
  width:min(1160px,calc(100vw - 32px))!important;
  max-height:calc(100dvh - 32px)!important;
  padding:24px 28px 20px!important;
  overflow:auto!important;
}
.slr-consent-dialog-choice .slr-consent-first>.slr-consent-eyebrow{
  font-size:10px!important;
  line-height:1.2!important;
  letter-spacing:.15em!important;
}
.slr-consent-dialog-choice h2#slr-consent-title{
  max-width:none!important;
  margin:6px 58px 12px 0!important;
  font-size:clamp(30px,2.7vw,39px)!important;
  line-height:1.02!important;
}
.slr-consent-dialog-choice .slr-consent-copy-choice{
  grid-template-columns:repeat(3,minmax(0,1fr))!important;
  gap:12px!important;
}
.slr-consent-dialog-choice .slr-consent-copy-choice p{
  font-size:13px!important;
  line-height:1.38!important;
}
.slr-consent-dialog-choice .slr-consent-choice-grid{
  gap:12px!important;
  margin-top:14px!important;
}
.slr-consent-dialog-choice .slr-consent-choice-grid-commercial{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
}
.slr-consent-dialog-choice .slr-consent-choice{
  min-height:112px!important;
  gap:6px!important;
  padding:15px 18px!important;
  border-radius:20px!important;
}
.slr-consent-dialog-choice .slr-consent-choice strong{
  font-size:19px!important;
  line-height:1.12!important;
}
.slr-consent-dialog-choice .slr-consent-choice small{
  font-size:12px!important;
  line-height:1.35!important;
}
.slr-consent-dialog-choice .slr-consent-choice-kicker{
  min-height:21px!important;
  padding:3px 8px!important;
  font-size:9px!important;
}
.slr-consent-dialog-choice .slr-consent-customize-link{
  margin:10px auto 0!important;
  font-size:13px!important;
  line-height:1.25!important;
}
.slr-consent-dialog-choice .slr-consent-links{
  gap:10px 18px!important;
  margin-top:10px!important;
  font-size:12px!important;
  line-height:1.25!important;
}
.slr-consent-dialog-choice .slr-consent-status{
  min-height:0!important;
  margin:7px 0 0!important;
  font-size:11px!important;
}

/* Tema Notte: lo stato hover/focus/active di Premium deve mantenere sempre
 * contrasto pieno, anche in presenza degli override globali del tema. */
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-premium{
  background:#2d291c!important;
  border-color:#6e5d25!important;
  color:#fff8dc!important;
  -webkit-text-fill-color:#fff8dc!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-premium small{
  color:#d7cfaa!important;
  -webkit-text-fill-color:#d7cfaa!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-premium:is(:hover,:focus-visible,:active){
  background:#f0b51d!important;
  background-color:#f0b51d!important;
  border-color:#f0b51d!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  box-shadow:0 14px 34px rgba(0,0,0,.28)!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-premium:is(:hover,:focus-visible,:active) :is(strong,span,b,i){
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  opacity:1!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-premium:is(:hover,:focus-visible,:active) small{
  color:#33290d!important;
  -webkit-text-fill-color:#33290d!important;
  opacity:1!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-premium:is(:hover,:focus-visible,:active) .slr-consent-choice-kicker{
  background:#111!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}

@media(max-width:900px){
  .slr-consent-layer{padding:12px!important}
  .slr-consent-dialog.slr-consent-dialog-choice{
    width:min(820px,calc(100vw - 24px))!important;
    max-height:calc(100dvh - 24px)!important;
    padding:20px 20px 17px!important;
  }
  .slr-consent-dialog-choice h2#slr-consent-title{
    margin-bottom:10px!important;
    font-size:clamp(27px,4.2vw,34px)!important;
  }
  .slr-consent-dialog-choice .slr-consent-copy-choice{
    grid-template-columns:repeat(3,minmax(0,1fr))!important;
    gap:9px!important;
  }
  .slr-consent-dialog-choice .slr-consent-copy-choice p{
    font-size:12px!important;
    line-height:1.34!important;
  }
  .slr-consent-dialog-choice .slr-consent-choice-grid-commercial{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
  }
  .slr-consent-dialog-choice .slr-consent-choice{
    min-height:98px!important;
    padding:13px 15px!important;
  }
}

@media(max-width:680px){
  .slr-consent-layer{
    align-items:center!important;
    padding:max(8px,env(safe-area-inset-top,0px)) 8px max(8px,env(safe-area-inset-bottom,0px))!important;
  }
  .slr-consent-dialog.slr-consent-dialog-choice{
    width:100%!important;
    max-width:calc(100vw - 16px)!important;
    max-height:calc(100dvh - max(16px,env(safe-area-inset-top,0px) + env(safe-area-inset-bottom,0px)))!important;
    margin:0 auto!important;
    padding:15px 13px 13px!important;
    border-radius:20px!important;
    overflow:auto!important;
  }
  .slr-consent-dialog-choice .slr-consent-first>.slr-consent-eyebrow{
    padding-right:38px!important;
    font-size:8.5px!important;
  }
  .slr-consent-dialog-choice h2#slr-consent-title{
    margin:5px 38px 8px 0!important;
    font-size:clamp(22px,6.5vw,27px)!important;
    line-height:1.02!important;
  }
  .slr-consent-dialog-choice .slr-consent-copy-choice{
    grid-template-columns:1fr!important;
    gap:4px!important;
  }
  .slr-consent-dialog-choice .slr-consent-copy-choice p{
    font-size:11.5px!important;
    line-height:1.28!important;
  }
  .slr-consent-dialog-choice .slr-consent-choice-grid{
    margin-top:9px!important;
    gap:7px!important;
  }
  .slr-consent-dialog-choice .slr-consent-choice-grid-commercial{
    grid-template-columns:1fr!important;
  }
  .slr-consent-dialog-choice .slr-consent-choice{
    min-height:0!important;
    gap:3px!important;
    padding:10px 12px!important;
    border-radius:15px!important;
  }
  .slr-consent-dialog-choice .slr-consent-choice strong{
    font-size:16px!important;
  }
  .slr-consent-dialog-choice .slr-consent-choice small{
    font-size:10.5px!important;
    line-height:1.25!important;
  }
  .slr-consent-dialog-choice .slr-consent-choice-kicker{
    min-height:18px!important;
    padding:2px 6px!important;
    font-size:7.5px!important;
  }
  .slr-consent-dialog-choice .slr-consent-customize-link{
    margin-top:8px!important;
    font-size:11.5px!important;
  }
  .slr-consent-dialog-choice .slr-consent-links{
    gap:5px 12px!important;
    margin-top:8px!important;
    font-size:10.5px!important;
  }
  .slr-consent-dialog-choice .slr-consent-close{
    top:9px!important;
    right:9px!important;
    width:32px!important;
    height:32px!important;
    font-size:20px!important;
  }
}

@media(max-width:380px), (max-height:620px){
  .slr-consent-dialog.slr-consent-dialog-choice{padding:11px 11px 10px!important}
  .slr-consent-dialog-choice h2#slr-consent-title{font-size:21px!important;margin-bottom:6px!important}
  .slr-consent-dialog-choice .slr-consent-copy-choice{gap:2px!important}
  .slr-consent-dialog-choice .slr-consent-copy-choice p{font-size:10.5px!important;line-height:1.2!important}
  .slr-consent-dialog-choice .slr-consent-choice-grid{margin-top:6px!important;gap:5px!important}
  .slr-consent-dialog-choice .slr-consent-choice{padding:8px 10px!important}
  .slr-consent-dialog-choice .slr-consent-choice small{font-size:9.8px!important}
  .slr-consent-dialog-choice .slr-consent-customize-link{margin-top:6px!important;font-size:10.5px!important}
  .slr-consent-dialog-choice .slr-consent-links{margin-top:6px!important;font-size:9.8px!important}
}

/* V9.526 — Tema Notte: il CTA FREE "Continua gratis" deve restare sempre
 * leggibile. Gli override globali del tema potevano trasformare l'hover in
 * fondo nero con testo scuro. Blocchiamo quindi esplicitamente tutti gli
 * stati interattivi, compresi i figli e il text-fill WebKit. */
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-accept{
  background:#ffd24a!important;
  background-color:#ffd24a!important;
  border-color:#ffd24a!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-accept :is(strong,span,b,i){
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  opacity:1!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-accept small{
  color:#2f2a19!important;
  -webkit-text-fill-color:#2f2a19!important;
  opacity:1!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-accept .slr-consent-choice-kicker{
  background:#111!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-accept:is(:hover,:focus-visible,:active){
  background:#f0b51d!important;
  background-color:#f0b51d!important;
  border-color:#f0b51d!important;
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  box-shadow:0 14px 34px rgba(0,0,0,.28)!important;
  transform:none!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-accept:is(:hover,:focus-visible,:active) :is(strong,span,b,i){
  color:#111!important;
  -webkit-text-fill-color:#111!important;
  opacity:1!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-accept:is(:hover,:focus-visible,:active) small{
  color:#2f2508!important;
  -webkit-text-fill-color:#2f2508!important;
  opacity:1!important;
}
html[data-slr-theme="dark"] body.slr-site button.slr-consent-choice.is-accept:is(:hover,:focus-visible,:active) .slr-consent-choice-kicker{
  background:#111!important;
  color:#fff!important;
  -webkit-text-fill-color:#fff!important;
}
