/* ===== BANNER (TUO DESIGN) ===== */
.cookie-banner{
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;

  width: min(420px, 92vw);
  padding: 18px 20px;

  background: rgba(45,45,45,.62);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 14px 38px rgba(0,0,0,.38);

  display: flex;
  flex-direction: column;
  gap: 14px;

  animation: cookieIn .45s ease-out;
}

@keyframes cookieIn{
  from{ opacity:0; transform: translateY(18px); }
  to{ opacity:1; transform: translateY(0); }
}

.cookie-text{
  font-size: 13px;
  line-height: 1.45;
  color: rgba(255,255,255,.92);
}

.cookie-text a{
  color: #fff;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-actions{
  display: flex;
  gap: 10px;
  justify-content: flex-start;
  flex-wrap: wrap;
}

.cookie-btn{
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 650;
  border-radius: 999px;
  cursor: pointer;

  border: 1px solid transparent;
  background: transparent;
  color: #fff;

  position: relative;
  overflow: hidden;
  isolation: isolate;

  transition: color .28s ease, border-color .28s ease, box-shadow .28s ease, transform .2s ease;
  white-space: nowrap;
}

.cookie-btn::before{
  content:"";
  position:absolute;
  inset:0;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .45s ease;
  z-index:-1;
}

.cookie-btn:hover{ transform: translateY(-1px); }
.cookie-btn:hover::before{ transform: scaleX(1); }

.cookie-btn.ghost{
  border-color: rgba(255,255,255,.55);
  color: #fff;
}
.cookie-btn.ghost::before{ background: #111; }
.cookie-btn.ghost:hover{ box-shadow: 0 10px 22px rgba(0,0,0,.35); }

.cookie-btn.solid{
  background: rgba(255,255,255,.92);
  border-color: rgba(255,255,255,.92);
  color: #062019;
}
.cookie-btn.solid::before{ background: #00F0C0; }
.cookie-btn.solid:hover{
  box-shadow: 0 12px 26px rgba(0,240,192,.45);
  color: #041b15;
}

/* tablet */
@media (min-width: 800px) and (max-width: 1399px){
  .cookie-banner{
    width: min(520px, 92vw);
    padding: 24px 26px;
    border-radius: 18px;
    gap: 16px;
  }
  .cookie-text{ font-size: 15px; line-height: 1.55; }
  .cookie-actions{ gap: 12px; }
  .cookie-btn{ padding: 11px 20px; font-size: 15px; }
}

/* desktop grandi */
@media (min-width: 1400px){
  .cookie-banner{
    width: min(500px, 92vw);
    padding: 22px 24px;
    border-radius: 16px;
    gap: 16px;
  }
  .cookie-text{ font-size: 14.5px; line-height: 1.55; }
  .cookie-actions{ gap: 12px; }
  .cookie-btn{ padding: 10px 18px; font-size: 14.5px; }
}

/* mobile */
@media (max-width: 799px){
  .cookie-banner{
    width: min(420px, 92vw);
    padding: 18px 20px;
    border-radius: 14px;
    gap: 14px;
  }
  .cookie-text{ font-size: 13px; line-height: 1.45; }
  .cookie-actions{ gap: 10px; }
  .cookie-btn{ padding: 8px 14px; font-size: 13px; }
}

@media (max-width: 600px){
  .cookie-banner{
    left: 16px;
    right: 16px;
    width: auto;
  }
}

/* ===== MODALE (COERENTE COL BANNER) ===== */
.cookie-modal{
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
}

.cookie-modal.is-open{ display: block; }

.cookie-modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.cookie-modal__panel{
  position: relative;
  width: min(560px, calc(100vw - 32px));
  margin: 7vh auto;
  padding: 0;
  border-radius: 18px;

  background: rgba(45,45,45,.72);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 30px 80px rgba(0,0,0,.45);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);

  overflow: hidden;
  animation: cookieModalIn .35s ease;
}

@keyframes cookieModalIn{
  from{ opacity:0; transform: translateY(18px); }
  to{ opacity:1; transform: translateY(0); }
}

.cookie-modal__header{
  padding: 16px 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;

  border-bottom: 1px solid rgba(255,255,255,.12);
}

.cookie-modal__header h2{
  margin: 0;
  color: rgba(255,255,255,.95);
  font-size: 16px;
  font-weight: 800;
  letter-spacing: .02em;
}

.cookie-modal__close{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.18);
  color: #fff;
  cursor: pointer;
  font-size: 22px;
  line-height: 1;
}

.cookie-modal__close:hover{
  box-shadow: 0 10px 22px rgba(0,0,0,.35);
}

.cookie-modal__content{
  padding: 16px 18px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  color: rgba(255,255,255,.92);
  font-size: 13px;
  line-height: 1.45;
}

.cookie-note{
  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
}

.cookie-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;

  padding: 12px 12px;
  border-radius: 14px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.10);
}

.cookie-row__text{
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.cookie-row__title{
  font-weight: 800;
  color: rgba(255,255,255,.96);
}

.cookie-row__desc{
  color: rgba(255,255,255,.75);
  font-size: 12.5px;
}

.cookie-switch{
  position: relative;
  width: 48px;
  height: 28px;
  flex: 0 0 auto;
}

.cookie-switch input{
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-switch span{
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255,255,255,.22);
  border: 1px solid rgba(255,255,255,.18);
  transition: .25s ease;
}

.cookie-switch span::before{
  content:"";
  position:absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  transition: .25s ease;
}

.cookie-switch input:checked + span{
  background: rgba(0,180,240,.55);
  border-color: rgba(0,180,240,.55);
}

.cookie-switch input:checked + span::before{
  transform: translateX(20px);
}

.cookie-links{
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 6px;
}

.cookie-links a{
  color: #fff;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-modal__footer{
  padding: 16px 18px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;

  border-top: 1px solid rgba(255,255,255,.12);
}

/* ✅ NON MODIFICO IL TUO CSS ESISTENTE. AGGIUNGO SOLO QUESTO: */
.cookie-modal[aria-hidden="true"]{
  pointer-events: none;
}
.cookie-modal.is-open{
  pointer-events: auto;
}

/* Caso A: un solo bottone → allinealo a destra */
/* Fallback sicuro: quando i bottoni B sono nascosti */
.cookie-actions .js-cookie-b-only[hidden] ~ .cookie-btn{
  margin-left: auto;
}


/* (opzionale) stile semplice coerente coi tuoi layout */
.legal-page{
  width: min(92vw, 860px);
  margin: clamp(18px, 3vw, 34px) auto clamp(36px, 6vw, 80px);
  padding: clamp(18px, 2.4vw, 28px);
  border: 1px solid rgba(0,0,0,.10);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.06);
}
.legal-page h1{
  margin: 0 0 14px;
  font-size: 22px;
  letter-spacing: .01em;
}
.legal-page h2{
  margin: 16px 0 8px;
  font-size: 14px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: rgba(0,0,0,.60);
}
.legal-page p, .legal-page li{
  font-size: 15px;
  line-height: 1.55;
  color: rgba(0,0,0,.82);
}
.legal-page ul{
  margin: 8px 0 0 20px;
}