/* ════════════════════════════════════════════════════════════
   IL CORBEZZOLO TROPEA — GDPR COOKIE CONSENT
   Foglio di stile condiviso — usare su TUTTE le pagine del sito.
   Colori scritti in chiaro (non dipende dalle CSS var di ogni pagina)
   per garantire resa identica ovunque venga incluso questo file.
   ════════════════════════════════════════════════════════════ */

#cc-root, #cc-root * { box-sizing: border-box; }
#cc-root {
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --cc-tu: #0B8FAC;   --cc-tu-d: #076680; --cc-tu-l: #E0F4F8;
  --cc-co: #C85A2A;   --cc-co-d: #8A3C1C;
  --cc-notte: #1A2A38;
  --cc-text2: #6b7280;
  --cc-border: rgba(255,255,255,.14);
  --cc-border-dark: rgba(26,42,56,.12);
  --cc-ve: #3A7D44; --cc-ve-l: #EAF3EC; --cc-ve-d: #255430;
  --cc-vi: #7F77DD; --cc-vi-l: #EEEDFE; --cc-vi-d: #3C3489;
  --cc-sa: #E8C97E; --cc-sa-l: #FDF6E3; --cc-sa-d: #9A7B2C;
}

/* ── OVERLAY (dietro al pannello preferenze) ── */
.cc-overlay {
  position: fixed; inset: 0; z-index: 100000;
  background: rgba(10,16,22,.62);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.cc-overlay.cc-open { display: flex; }

/* ── BANNER ── */
.cc-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 99999;
  background: var(--cc-notte);
  color: rgba(255,255,255,.92);
  padding: 20px 24px;
  box-shadow: 0 -6px 28px rgba(0,0,0,.28);
  border-top: 1px solid rgba(255,255,255,.08);
  display: none;
  animation: cc-slide-up .35s ease;
}
.cc-banner.cc-open { display: block; }
@keyframes cc-slide-up { from { transform: translateY(100%); } to { transform: translateY(0); } }

.cc-banner-inner {
  max-width: 1180px; margin: 0 auto;
  display: flex; align-items: center; gap: 28px; flex-wrap: wrap;
}
.cc-banner-icon { font-size: 26px; flex-shrink: 0; line-height: 1; }
.cc-banner-text { flex: 1; min-width: 240px; }
.cc-banner-text strong {
  display: block; font-family: 'Cormorant Garamond', serif;
  font-size: 18px; font-weight: 600; margin-bottom: 4px; color: #fff;
}
.cc-banner-text p { font-size: 13px; line-height: 1.6; color: rgba(255,255,255,.78); margin: 0; }
.cc-banner-text a { color: #9FE1CB; text-decoration: underline; }
.cc-banner-actions {
  display: flex; gap: 10px; flex-wrap: wrap; flex-shrink: 0;
  align-items: center;
}

.cc-btn {
  font-family: 'DM Sans', sans-serif;
  font-size: 13px; font-weight: 700;
  padding: 11px 20px; border-radius: 24px;
  border: none; cursor: pointer;
  transition: transform .15s, box-shadow .15s, background .15s;
  white-space: nowrap;
}
.cc-btn:hover { transform: translateY(-1px); }
.cc-btn-primary { background: var(--cc-co); color: #fff; box-shadow: 0 4px 14px rgba(200,90,42,.35); }
.cc-btn-primary:hover { background: #b04f24; }
.cc-btn-outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.35); }
.cc-btn-outline:hover { background: rgba(255,255,255,.1); }
.cc-btn-ghost { background: transparent; color: rgba(255,255,255,.75); text-decoration: underline; padding: 11px 8px; }
.cc-btn-ghost:hover { color: #fff; }

/* ── PANEL (preferenze granulari) ── */
.cc-panel {
  background: #fff; color: var(--cc-notte);
  width: 100%; max-width: 620px; max-height: 88vh;
  border-radius: 18px; overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.cc-panel-head {
  padding: 22px 26px 18px; border-bottom: 1px solid var(--cc-border-dark);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.cc-panel-head h2 {
  font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600;
  color: var(--cc-notte); margin: 0 0 4px;
}
.cc-panel-head p { font-size: 12.5px; color: var(--cc-text2); margin: 0; line-height: 1.55; }
.cc-panel-close {
  background: var(--cc-tu-l); color: var(--cc-tu-d); border: none;
  width: 30px; height: 30px; border-radius: 50%; cursor: pointer;
  font-size: 15px; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
.cc-panel-close:hover { background: #cdeaf1; }

.cc-panel-body { padding: 14px 26px; overflow-y: auto; flex: 1; }

.cc-cat { border: 1px solid var(--cc-border-dark); border-radius: 14px; margin-bottom: 10px; overflow: hidden; }
.cc-cat-head { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: #f7f6f3; }
.cc-cat-title { font-size: 13.5px; font-weight: 700; color: var(--cc-notte); flex: 1; }
.cc-cat-badge {
  font-size: 9.5px; font-weight: 800; padding: 3px 9px; border-radius: 20px;
  letter-spacing: .4px; text-transform: uppercase; flex-shrink: 0;
}
.cc-badge-req { background: var(--cc-ve-l); color: var(--cc-ve-d); }
.cc-badge-opt { background: var(--cc-sa-l); color: var(--cc-sa-d); }
.cc-badge-optin { background: var(--cc-vi-l); color: var(--cc-vi-d); }
.cc-cat-body { padding: 12px 16px; font-size: 12.5px; color: var(--cc-text2); line-height: 1.6; background: #fff; }
.cc-cat-body code { background: #f0efeb; padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* Toggle switch */
.cc-switch { position: relative; width: 42px; height: 24px; flex-shrink: 0; }
.cc-switch input { opacity: 0; width: 0; height: 0; }
.cc-switch-track {
  position: absolute; inset: 0; background: #d5d3cd; border-radius: 24px;
  cursor: pointer; transition: background .2s;
}
.cc-switch-track::before {
  content: ''; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%; transition: transform .2s;
  box-shadow: 0 1px 3px rgba(0,0,0,.25);
}
.cc-switch input:checked + .cc-switch-track { background: var(--cc-tu); }
.cc-switch input:checked + .cc-switch-track::before { transform: translateX(18px); }
.cc-switch input:disabled + .cc-switch-track { background: var(--cc-ve); cursor: not-allowed; opacity: .85; }

.cc-panel-foot {
  padding: 16px 26px; border-top: 1px solid var(--cc-border-dark);
  display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end;
  background: #f7f6f3;
}
.cc-panel-foot .cc-btn-outline { color: var(--cc-notte); border-color: var(--cc-border-dark); }
.cc-panel-foot .cc-btn-outline:hover { background: #eeece7; }

/* ── REOPEN FLOATING BUTTON ── */
.cc-reopen {
  position: fixed; left: 18px; bottom: 18px; z-index: 9990;
  width: 46px; height: 46px; border-radius: 50%;
  background: var(--cc-notte); color: #fff; border: none;
  font-size: 20px; cursor: pointer; display: none;
  align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(0,0,0,.28);
  transition: transform .15s, background .15s;
}
.cc-reopen.cc-show { display: flex; }
.cc-reopen:hover { transform: scale(1.08); background: var(--cc-tu-d); }

/* ── INLINE GATE (per iframe booking prenotazione) ── */
.cc-inline-gate {
  position: absolute; inset: 0; z-index: 20;
  background: rgba(10,16,22,.92); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 28px 22px; gap: 14px; border-radius: inherit;
}
.cc-inline-gate p { font-size: 13px; line-height: 1.6; max-width: 380px; color: rgba(255,255,255,.85); margin: 0; }
.cc-inline-gate .cc-btn { padding: 10px 22px; }

@media (max-width: 640px) {
  .cc-banner { padding: 16px 16px 18px; }
  .cc-banner-inner { gap: 14px; }
  .cc-banner-actions { width: 100%; }
  .cc-banner-actions .cc-btn { flex: 1; text-align: center; }
  .cc-panel-body { padding: 12px 18px; }
  .cc-panel-head, .cc-panel-foot { padding-left: 18px; padding-right: 18px; }
}
