/* 4room — banner e pannello preferenze cookie */
.cc-banner { position: fixed; left: 1rem; bottom: 1rem; z-index: 9500; width: min(460px, calc(100vw - 2rem)); }
.cc-banner[hidden], .cc-modal[hidden] { display: none; }
.cc-card, .cc-dialog {
  position: relative; background: #0b0b0c; color: #f2f4f3; border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px; padding: 1.5rem; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}
.cc-banner .cc-card { animation: cc-in 0.7s cubic-bezier(0.16, 1, 0.3, 1) both; max-height: calc(100vh - 2rem); max-height: calc(100svh - 2rem); overflow: auto; overscroll-behavior: contain; }
body.cc-open { overflow: hidden; touch-action: none; }
@keyframes cc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
.cc-kicker { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; opacity: 0.6; margin: 0 0 0.6rem; }
.cc-title { font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; margin: 0 0 0.75rem; padding-right: 2rem; }
.cc-text { font-size: 0.92rem; line-height: 1.5; opacity: 0.85; margin: 0 0 1.25rem; }
.cc-text a, .cc-meta a { color: inherit; text-decoration: underline; text-decoration-color: #5ec3cd; text-underline-offset: 0.15em; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 0.6rem 1rem; align-items: center; }
.cc-btn {
  min-height: 2.75rem; padding: 0.7rem 1.2rem; border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.4);
  background: transparent; color: inherit; font: inherit; font-size: 0.9rem; font-weight: 600; cursor: pointer;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s;
}
.cc-btn:hover { background: #fff; color: #0a0a0a; border-color: #fff; }
.cc-btn-accent { background: #5ec3cd; border-color: #5ec3cd; color: #0a0a0a; }
.cc-btn-accent:hover { background: #fff; border-color: #fff; }
.cc-linkbtn { background: none; border: 0; min-height: 2.75rem; padding: 0.5rem 0.25rem; color: inherit; font: inherit; font-size: 0.9rem; font-weight: 600; text-decoration: underline; text-underline-offset: 0.15em; cursor: pointer; }
.cc-x {
  position: absolute; top: 0.6rem; right: 0.6rem; width: 2.75rem; height: 2.75rem; border: 0; border-radius: 50%;
  background: transparent; color: inherit; font-size: 1.6rem; line-height: 1; cursor: pointer; opacity: 0.7;
}
.cc-x:hover { opacity: 1; background: rgba(255, 255, 255, 0.08); }
.cc-banner :focus-visible, .cc-modal :focus-visible { outline: 2px solid #5ec3cd; outline-offset: 3px; }

/* Pannello preferenze */
.cc-modal { position: fixed; inset: 0; z-index: 9600; display: grid; place-items: center; padding: 1rem; }
.cc-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 10, 0.72); }
.cc-dialog { width: min(560px, 100%); max-height: calc(100vh - 2rem); max-height: calc(100svh - 2rem); overflow: auto; overscroll-behavior: contain; }
.cc-dialog:focus { outline: none; }
.cc-cats { list-style: none; margin: 0 0 1.25rem; padding: 0; border-top: 1px solid rgba(255, 255, 255, 0.12); }
.cc-cat { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; padding: 0.9rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.12); }
.cc-cat-text label { font-size: 1rem; cursor: pointer; }
.cc-cat-text p { margin: 0.25rem 0 0; font-size: 0.85rem; opacity: 0.7; line-height: 1.45; }
.cc-switch {
  appearance: none; -webkit-appearance: none; width: 3.2rem; height: 1.9rem; margin: 0; flex: none;
  border-radius: 999px; background: rgba(255, 255, 255, 0.18); position: relative; cursor: pointer; transition: background-color 0.25s;
}
.cc-switch::after { content: ""; position: absolute; top: 0.2rem; left: 0.2rem; width: 1.5rem; height: 1.5rem; border-radius: 50%; background: #fff; transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1); }
.cc-switch:checked { background: #5ec3cd; }
.cc-switch:checked::after { transform: translateX(1.3rem); }
.cc-switch:disabled { opacity: 0.6; cursor: not-allowed; }
.cc-meta { font-size: 0.78rem; opacity: 0.6; margin: 1rem 0 0; }

@media (max-width: 600px) {
  .cc-banner { left: 0; right: 0; bottom: 0; width: auto; }
  .cc-card { border-radius: 16px 16px 0 0; border-bottom: 0; padding: 1.1rem 1.1rem calc(1.1rem + env(safe-area-inset-bottom)); max-height: 60svh; }
  .cc-banner .cc-title { font-size: 1.15rem; }
  .cc-banner .cc-text { font-size: 0.86rem; margin-bottom: 1rem; }
  .cc-actions .cc-btn { flex: 1 1 auto; text-align: center; }
  .cc-modal { padding: 0; align-items: end; }
  .cc-dialog { width: 100%; max-height: 92vh; max-height: 92svh; border-radius: 16px 16px 0 0; }
}
@media (prefers-reduced-motion: reduce) { .cc-banner .cc-card { animation: none; } }
