/* ==========================================================================
   OPLYO — CMP (banner + centro preferenze + link nel footer). Nessun font esterno, nessun framework.
   Il banner e' position:fixed (nessun layout shift) e non blocca la navigazione; il centro preferenze e' modale
   solo mentre e' aperto. Le tre azioni del banner hanno lo stesso peso visivo. Senza JS non c'e' banner.
   ========================================================================== */
.cmp [hidden] { display: none !important; }
.cmp { font-family: Inter, "Inter Fallback", -apple-system, "Segoe UI", sans-serif; color: var(--ink, #0e0e11); }
.cmp_sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.cmp_bar, .cmp_prefs { background: var(--surface, #fff); border: 1px solid var(--line, #e7e7e3); box-shadow: var(--sh-2, 0 10px 28px -12px rgba(16, 16, 22, .22)); }
.cmp_bar { position: fixed; z-index: 70; left: 1.25rem; bottom: 1.25rem; width: min(27.5rem, calc(100vw - 2.5rem)); padding: 1.125rem 1.25rem 1.25rem; border-radius: var(--r-m, 16px); }
.cmp_bar:focus, .cmp_prefs:focus { outline: none; }
.cmp h2 { margin: 0 0 .375rem; font-size: 1.0625rem; line-height: 1.25; font-weight: 650; letter-spacing: -.01em; }
.cmp p { margin: 0; font-size: .875rem; line-height: 1.5; color: var(--ink-2, #45464d); }
.cmp a { color: var(--ink, #0e0e11); text-decoration: underline; text-underline-offset: 2px; }

.cmp_actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: .5rem; margin-top: 1rem; }
.cmp_btn { appearance: none; font: inherit; font-size: .875rem; font-weight: 600; line-height: 1.2; min-height: 44px; padding: .5rem .5rem; border-radius: 999px; border: 1px solid var(--ink, #0e0e11); background: var(--surface, #fff); color: var(--ink, #0e0e11); cursor: pointer; touch-action: manipulation; }
.cmp_btn:hover { background: var(--ink, #0e0e11); color: var(--surface, #fff); }
.cmp a:focus-visible, .cmp_btn:focus-visible, .cmp_sw:focus-visible { outline: 3px solid var(--ai, #6b5cd6); outline-offset: 2px; }

.cmp_scrim { position: fixed; inset: 0; z-index: 71; background: rgba(14, 14, 17, .45); }
.cmp_prefs { position: fixed; z-index: 72; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(33rem, calc(100vw - 2rem)); max-height: calc(100dvh - 2rem); overflow: auto; padding: 1.5rem; border-radius: var(--r-m, 16px); }
.cmp_intro { margin-bottom: .75rem; }
.cmp_row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .875rem 0; border-top: 1px solid var(--line, #e7e7e3); }
.cmp_row_t { min-width: 0; }
.cmp .cmp_row_h { display: block; margin: 0 0 .125rem; font-size: .9375rem; font-weight: 600; color: var(--ink, #0e0e11); }
.cmp_on { flex: none; font-size: .8125rem; font-weight: 600; color: var(--ink-3, #6b6c74); }
.cmp_policy { padding-top: .875rem; border-top: 1px solid var(--line, #e7e7e3); }

/* interruttore: input nativo (tastiera e lettori di schermo gratis), resa con appearance:none */
.cmp_sw { appearance: none; flex: none; position: relative; width: 2.75rem; height: 1.5rem; margin: 0; border-radius: 999px; background: #c9cad1; border: 1px solid #b4b5bd; cursor: pointer; transition: background-color .15s ease; }
.cmp_sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: calc(1.5rem - 6px); height: calc(1.5rem - 6px); border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transition: transform .15s ease; }
.cmp_sw:checked { background: var(--ink, #0e0e11); border-color: var(--ink, #0e0e11); }
.cmp_sw:checked::after { transform: translateX(1.25rem); }
.cmp_back { display: block; width: 100%; margin-top: .5rem; border-color: var(--line, #e7e7e3); color: var(--ink-2, #45464d); font-weight: 500; }
.cmp_prefs .cmp_actions { margin-top: 1rem; }

/* link nel footer (stesse metriche dei link di .ft_col) */
.ft_col .ft_cmp { appearance: none; background: none; border: 0; padding: 0; margin: 0; font: inherit; font-size: var(--ty-ft, calc(15px * var(--vs, 1))); color: var(--ink-3, #6b6c74); text-align: left; cursor: pointer; width: fit-content; transition: color .15s ease; }
.ft_col .ft_cmp:hover { color: var(--ink, #0e0e11); }
.ft_col .ft_cmp:focus-visible { outline: 3px solid var(--ai, #6b5cd6); outline-offset: 2px; }
html:not(.js) .ft_cmp { display: none; }

@media (max-width: 991px) {
  .ft_col .ft_cmp { display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding-block: .5rem; line-height: 1.35; }
  /* Menu a tutto schermo aperto (html.hd-lock, js/oplyo-ai.js): il banner (z-index 70) stava sopra il menu (z-index 65) e copriva le lingue
     del foglio "Lingua" dalla terza in giu'. Finche' il menu e' aperto il banner e' nascosto; alla chiusura riappare invariato. */
  html.hd-lock .cmp_bar { visibility: hidden; pointer-events: none; }
}
@media (max-width: 640px) {
  .cmp_bar { left: 0; right: 0; bottom: 0; width: auto; border-radius: var(--r-m, 16px) var(--r-m, 16px) 0 0; border-bottom: 0; padding: 1rem 1rem calc(1rem + env(safe-area-inset-bottom, 0px)); }
  .cmp_prefs { left: 0; right: 0; top: auto; bottom: 0; transform: none; width: auto; max-height: 92dvh; border-radius: var(--r-m, 16px) var(--r-m, 16px) 0 0; padding: 1.25rem 1rem calc(1.25rem + env(safe-area-inset-bottom, 0px)); }
}
@media (max-width: 420px) {
  .cmp_btn { font-size: .8125rem; padding-inline: .25rem; }          /* tre azioni affiancate anche a 360-390 px: banner basso, CTA della pagina meno coperte */
}
@media (max-width: 339px) {
  .cmp_actions { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .cmp_sw, .cmp_sw::after { transition: none; }
}
