/* =========================================================
   COOKIE CONSENT
   ========================================================= */
.cookie-banner[hidden],
.cookie-preferences[hidden] { display:none !important; }

.cookie-banner {
  position:fixed;
  left:20px;
  right:20px;
  bottom:20px;
  z-index:99999;
  background:#fff;
  color:#0b1428;
  border:1px solid rgba(11,20,40,.12);
  border-radius:16px;
  box-shadow:0 12px 40px rgba(0,0,0,.18);
  padding:22px;
  font-family:inherit;
}
.cookie-banner-inner {
  max-width:1100px;
  margin:0 auto;
  display:flex;
  gap:24px;
  align-items:center;
  justify-content:space-between;
}
.cookie-banner-text { flex:1; }
.cookie-banner-title { margin:0 0 7px; font-size:18px; font-weight:700; }
.cookie-banner-text p { margin:0; line-height:1.5; font-size:14px; }
.cookie-banner-actions { display:flex; gap:9px; flex-wrap:wrap; justify-content:flex-end; }

.cookie-btn {
  border:0;
  border-radius:9px;
  padding:11px 16px;
  font:inherit;
  font-size:14px;
  font-weight:600;
  cursor:pointer;
}
.cookie-btn-primary { background:#0b1428; color:#fff; }
.cookie-btn-secondary { background:#eef0f3; color:#0b1428; }
.cookie-btn-link { background:transparent; color:#0b1428; text-decoration:underline; }

.cookie-preferences {
  position:fixed;
  inset:0;
  z-index:100000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(0,0,0,.5);
}
.cookie-modal {
  width:min(620px,100%);
  max-height:min(720px,90vh);
  overflow:auto;
  background:#fff;
  color:#0b1428;
  border-radius:18px;
  box-shadow:0 20px 70px rgba(0,0,0,.3);
  padding:26px;
  font-family:inherit;
}
.cookie-modal h2 { margin:0 0 8px; font-size:24px; }
.cookie-modal > p { margin:0 0 20px; line-height:1.5; font-size:14px; }

.cookie-category {
  border:1px solid rgba(11,20,40,.12);
  border-radius:12px;
  padding:15px;
  margin:10px 0;
}
.cookie-category-head {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
}
.cookie-category strong { font-size:15px; }
.cookie-category small { display:block; margin-top:6px; line-height:1.45; font-size:13px; opacity:.8; }

.cookie-toggle { position:relative; display:inline-flex; width:44px; height:24px; flex:0 0 auto; }
.cookie-toggle input { opacity:0; width:0; height:0; position:absolute; }
.cookie-toggle-slider {
  position:absolute; inset:0; cursor:pointer;
  border-radius:999px; background:#c8ccd2; transition:.2s;
}
.cookie-toggle-slider:before {
  content:""; position:absolute; width:18px; height:18px;
  left:3px; top:3px; border-radius:50%; background:#fff; transition:.2s;
}
.cookie-toggle input:checked + .cookie-toggle-slider { background:#0b1428; }
.cookie-toggle input:checked + .cookie-toggle-slider:before { transform:translateX(20px); }

.cookie-modal-actions {
  display:flex; gap:10px; justify-content:flex-end;
  flex-wrap:wrap; margin-top:20px;
}

/* Link inserito nel footer: non è fisso e non copre i diritti */
.cookie-footer-link {
  display:inline;
  margin-left:8px;
  padding:0;
  border:0;
  background:transparent;
  color:inherit;
  font:inherit;
  cursor:pointer;
  text-decoration:underline;
  text-underline-offset:3px;
}
.cookie-footer-link:hover { opacity:.7; }

@media (max-width:700px) {
  .cookie-banner { left:10px; right:10px; bottom:10px; padding:18px; }
  .cookie-banner-inner { display:block; }
  .cookie-banner-actions { margin-top:15px; justify-content:flex-start; }
  .cookie-btn { flex:1 1 auto; }
  .cookie-modal { padding:20px; }
}
