/* ===== BANNER COOKIE — GDPR ===== */
.cc-banner {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 9999;
  max-width: 760px; margin: 0 auto;
  background: #ffffff; color: #14122e;
  border: 1px solid #e6e6f0; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(20,18,46,.28);
  padding: 1.4rem 1.5rem;
  transform: translateY(160%); opacity: 0; transition: transform .5s cubic-bezier(.16,1,.3,1), opacity .4s;
}
.cc-banner.show { transform: translateY(0); opacity: 1; }
.cc-title { font-weight: 700; font-size: 1.05rem; margin-bottom: .4rem; display: flex; align-items: center; gap: .5rem; }
.cc-text { font-size: .9rem; line-height: 1.6; color: #4a4860; margin-bottom: 1rem; }
.cc-text a { color: #7c3aed; font-weight: 600; }
.cc-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.cc-btn { font-family: inherit; font-weight: 600; font-size: .9rem; padding: .7rem 1.3rem; border-radius: 50px; cursor: pointer; border: 2px solid transparent; transition: all .2s; }
.cc-accept { background: linear-gradient(120deg,#2563eb,#7c3aed); color: #fff; }
.cc-accept:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(124,58,237,.35); }
.cc-reject { background: #f1f1f7; color: #14122e; }
.cc-reject:hover { background: #e6e6f0; }
.cc-custom { background: transparent; color: #6b6e8c; border-color: #e0e0ec; }
.cc-custom:hover { border-color: #7c3aed; color: #7c3aed; }

/* pannello preferenze */
.cc-prefs { margin-top: 1.1rem; padding-top: 1.1rem; border-top: 1px solid #ececf4; display: none; }
.cc-prefs.open { display: block; animation: ccfade .3s ease; }
@keyframes ccfade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; } }
.cc-cat { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding: .7rem 0; border-bottom: 1px solid #f3f3f9; }
.cc-cat:last-of-type { border-bottom: none; }
.cc-cat-info strong { display: block; font-size: .92rem; }
.cc-cat-info span { font-size: .82rem; color: #6b6e8c; }
/* switch */
.cc-switch { position: relative; width: 46px; height: 26px; flex-shrink: 0; margin-top: .2rem; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-slider { position: absolute; inset: 0; background: #cfcfdd; border-radius: 50px; transition: .25s; cursor: pointer; }
.cc-slider::before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .25s; }
.cc-switch input:checked + .cc-slider { background: linear-gradient(120deg,#2563eb,#7c3aed); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); }
.cc-switch input:disabled + .cc-slider { background: #a9c4f5; cursor: not-allowed; }
.cc-prefs-actions { margin-top: 1rem; display: flex; gap: .6rem; }

/* bottone fluttuante per riaprire le preferenze */
.cc-fab {
  position: fixed; left: 1rem; bottom: 1rem; z-index: 9998;
  width: 46px; height: 46px; border-radius: 50%; border: none; cursor: pointer;
  background: #ffffff; box-shadow: 0 8px 24px rgba(20,18,46,.2);
  font-size: 1.3rem; display: none; place-items: center; transition: transform .2s;
}
.cc-fab:hover { transform: scale(1.1); }
.cc-fab.show { display: grid; }

@media (max-width: 540px) {
  .cc-actions { flex-direction: column; }
  .cc-btn { width: 100%; }
}
