/* ═══ Banner cookie — Parco Paduli ═══════════════════════════════ */
.cc-banner, .cc-panel {
  --cc-bg: #403e53; --cc-fg: #e7e4da; --cc-accent: #cae1ce;
  --cc-verde: #006a3d; --cc-crema: #f6e0b2;
  font-family: 'DM Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  color: var(--cc-fg);
  z-index: 2000;
}
.cc-banner[hidden], .cc-panel[hidden], .cc-overlay[hidden] { display: none !important; }

.cc-banner {
  position: fixed;
  left: 1rem; right: 1rem;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  max-width: 980px;
  margin: 0 auto;
  background: var(--cc-bg);
  border-top: 3px solid #d3037d;
  box-shadow: 0 12px 40px rgba(0,0,0,0.35);
  padding: 1.4rem 3.2rem 1.4rem 1.6rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
}
.cc-banner p { margin: 0; flex: 1 1 380px; font-size: 0.86rem; line-height: 1.6; font-weight: 300; }
.cc-banner p strong { font-weight: 500; color: var(--cc-crema); }
.cc-banner a, .cc-panel a { color: var(--cc-accent); }
.cc-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.cc-btn {
  font: inherit;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.75rem 1.3rem;
  border: 1.5px solid var(--cc-accent);
  background: transparent;
  color: var(--cc-fg);
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.cc-btn:hover { background: rgba(202,225,206,0.12); }
.cc-btn-primary { background: var(--cc-verde); border-color: var(--cc-verde); color: #fff; }
.cc-btn-primary:hover { background: #00804a; }
.cc-btn:focus-visible, .cc-close:focus-visible, .cc-switch input:focus-visible + span {
  outline: 2px solid var(--cc-crema); outline-offset: 2px;
}

.cc-close {
  position: absolute; top: 0.6rem; right: 0.7rem;
  width: 36px; height: 36px;
  border: none; background: transparent;
  color: var(--cc-fg); font-size: 1.4rem; line-height: 1;
  cursor: pointer; opacity: 0.8;
}
.cc-close:hover { opacity: 1; }

/* Pannello preferenze */
.cc-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 1999; }
.cc-panel {
  position: fixed;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(560px, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
  background: var(--cc-bg);
  border-top: 3px solid #d3037d;
  padding: 2rem 1.8rem 1.6rem;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
}
.cc-panel h2 {
  font-family: 'Libre Baskerville', Georgia, serif;
  font-size: 1.3rem; font-weight: 400;
  color: var(--cc-crema);
  margin: 0 0 0.8rem;
}
.cc-panel > p { font-size: 0.84rem; line-height: 1.6; font-weight: 300; margin: 0 0 1.2rem; }
.cc-cat {
  border-top: 1px solid rgba(231,228,218,0.12);
  padding: 1rem 0;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.3rem 1rem;
  align-items: start;
}
.cc-cat h3 { font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--cc-accent); margin: 0; font-weight: 500; }
.cc-cat p { grid-column: 1 / 2; font-size: 0.8rem; line-height: 1.55; margin: 0; font-weight: 300; opacity: 0.85; }
.cc-cat .cc-switch { grid-row: 1 / 3; grid-column: 2; }

.cc-switch { position: relative; display: inline-block; width: 46px; height: 26px; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-switch span {
  position: absolute; inset: 0;
  background: rgba(231,228,218,0.25);
  border-radius: 26px;
  transition: background 0.2s;
  pointer-events: none;
}
.cc-switch span::before {
  content: ""; position: absolute;
  width: 20px; height: 20px; left: 3px; top: 3px;
  background: #fff; border-radius: 50%;
  transition: transform 0.2s;
}
.cc-switch input:checked + span { background: var(--cc-verde); }
.cc-switch input:checked + span::before { transform: translateX(20px); }
.cc-switch input:disabled { cursor: not-allowed; }
.cc-switch input:disabled + span { opacity: 0.6; }
.cc-panel .cc-actions { margin-top: 1.2rem; justify-content: flex-end; }

@media (max-width: 575px) {
  .cc-banner { left: 0.5rem; right: 0.5rem; bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px)); padding: 1.2rem 1.2rem 1.2rem; }
  .cc-banner p { flex-basis: 100%; padding-right: 2rem; }
  .cc-actions { width: 100%; }
  .cc-actions .cc-btn { flex: 1 1 auto; }
}
