/* GL Groupe – banner del consenso alle statistiche */

.gl-consenso {
  position: fixed; z-index: 90; left: 50%; bottom: calc(14px + env(safe-area-inset-bottom, 0px));
  width: min(820px, calc(100% - 24px));
  max-height: calc(100vh - 28px); max-height: calc(100dvh - 28px - env(safe-area-inset-bottom, 0px));
  overflow-y: auto; overscroll-behavior: contain;
  padding: 22px; border-radius: 24px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(177,198,196,.17), transparent 55%),
    rgba(13,16,16,.96);
  border: 1px solid var(--line2);
  box-shadow: 0 30px 80px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.05);
  -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  color: var(--ink);
  opacity: 0; transform: translate(-50%, 28px);
  transition: opacity .4s ease, transform .5s cubic-bezier(.2,.7,.2,1);
}
.gl-consenso[hidden], .gl-consenso [hidden] { display: none !important; }
.gl-consenso-testa { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
.gl-consenso.in { opacity: 1; transform: translate(-50%, 0); }

/* Piccolo vinile che gira, come nell'apertura di GL Records */
.gl-consenso-disco {
  position: relative; width: 58px; aspect-ratio: 1; border-radius: 50%; flex: none;
  background:
    conic-gradient(from 210deg, transparent 0 10%, rgba(255,255,255,.12) 16%, transparent 24% 58%, rgba(255,255,255,.08) 64%, transparent 72%),
    repeating-radial-gradient(circle, #101413 0 1px, #1A201F 1px 2.5px);
  box-shadow: 0 10px 24px rgba(0,0,0,.5), 0 0 0 1px #262D2C, inset 0 0 0 3px #0B0D0D;
  animation: spin 6s linear infinite;
}
.gl-consenso-disco::after {
  content: ""; position: absolute; inset: 33%; border-radius: 50%;
  background: radial-gradient(circle, var(--bg) 0 14%, var(--sage) 15% 100%);
  box-shadow: 0 0 0 2px #0B0D0D;
}

.gl-consenso-kicker { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--sage); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.gl-consenso-kicker .eq { height: 12px; }
.gl-consenso h2 { margin: 0 0 6px; font-family: var(--display); font-weight: 800; font-size: clamp(26px, 4vw, 32px); line-height: .95; text-transform: uppercase; letter-spacing: .005em; }
.gl-consenso p { margin: 0; color: var(--soft); font-size: 15px; line-height: 1.5; }
.gl-consenso p + p { margin-top: 6px; }
.gl-consenso p a { color: var(--sage); }
.gl-consenso-stato { margin-top: 12px !important; color: var(--muted) !important; font-size: 13.5px !important; }

/* Categorie: necessari sempre attivi, statistiche con interruttore */
.gl-consenso-dettagli { display: grid; gap: 10px; margin-top: 16px; }
@media (min-width: 760px) { .gl-consenso-dettagli { grid-template-columns: 1fr 1fr; } }
.gl-cat { padding: 14px 16px; border: 1px solid var(--line2); border-radius: 16px; background: rgba(7,8,8,.55); }
.gl-cat-testa { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 6px; }
.gl-cat h3 { margin: 0; font-family: var(--display); font-weight: 800; font-size: 20px; line-height: 1; text-transform: uppercase; }
.gl-consenso .gl-cat p { font-size: 13.5px; color: var(--muted); }
.gl-sempre { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--sage); white-space: nowrap; }
.gl-switch { position: relative; display: inline-flex; flex: none; }
.gl-switch input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; z-index: 1; }
.gl-switch span { position: relative; width: 50px; height: 28px; border-radius: 99px; background: #262D2C; border: 1px solid var(--line2); transition: background-color .2s ease, border-color .2s ease; }
.gl-switch span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: var(--soft); transition: transform .25s cubic-bezier(.2,.7,.2,1), background-color .2s ease; }
.gl-switch input:checked + span { background: var(--sage); border-color: var(--sage); }
.gl-switch input:checked + span::after { transform: translateX(22px); background: var(--bg); }
.gl-switch input:focus-visible + span { outline: 2px solid var(--sage-hi); outline-offset: 3px; }

/* Tre scelte con lo stesso peso */
.gl-consenso-azioni { display: grid; grid-template-columns: 1fr; gap: 10px; margin-top: 16px; }
@media (min-width: 640px) { .gl-consenso-azioni { grid-template-columns: repeat(3, 1fr); } }
.gl-consenso-azioni .btn { min-height: 48px; padding: 0 18px; }
.gl-consenso-azioni .btn.ghost { border-color: var(--sage); }
.gl-consenso .btn:focus-visible, .link-consenso:focus-visible { outline: 2px solid var(--sage-hi); outline-offset: 3px; }

/* Link "Preferenze cookie" nei piè di pagina */
.link-consenso { padding: 0; border: 0; background: none; color: var(--muted); font: inherit; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link-consenso:hover { color: var(--ink); }
.legal .btn.link-scelta { margin-top: 6px; }

@media (prefers-reduced-motion: reduce) {
  .gl-consenso { transition: none; transform: translate(-50%, 0); }
  .gl-consenso-disco, .gl-consenso .eq i { animation: none; }
}
