/* Banner consenso cookie (self-contained: funziona anche sulle pagine HatLink standalone) */
.cc {
  position: fixed;
  inset: auto 1rem 1rem 1rem;
  z-index: 10000;
  display: flex;
  justify-content: center;
  pointer-events: none;
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
}
.cc[hidden] { display: none; }
.cc-box {
  position: relative;
  pointer-events: auto;
  width: min(100%, 60rem);
  display: grid;
  gap: 1rem 1.6rem;
  grid-template-columns: minmax(0, 1fr);
  padding: 1.3rem 1.4rem;
  color: #e4e4e7;
  background: #0d0d0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 1rem;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.6);
  transform: translateY(12px);
  opacity: 0;
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.35s ease;
}
.cc.is-open .cc-box { transform: none; opacity: 1; }
@media (min-width: 860px) {
  .cc-box { grid-template-columns: minmax(0, 1fr) auto; align-items: end; }
}
.cc-x {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: 50%;
  color: #a1a1aa;
  background: transparent;
  cursor: pointer;
}
.cc-x:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.cc-title { margin: 0 2rem 0.35rem 0; font-family: "Outfit", sans-serif; font-weight: 700; font-size: 1.1rem; color: #fff; }
.cc-desc { margin: 0; font-size: 0.86rem; line-height: 1.55; color: #b4b4bd; }
.cc-desc a { color: #fff; text-decoration: underline; text-underline-offset: 0.18em; }
.cc-prefs { display: grid; gap: 0.5rem; margin-top: 0.9rem; }
.cc-prefs[hidden] { display: none; }
.cc-cat {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0.65rem;
  cursor: pointer;
}
.cc-cat-txt strong { display: block; font-size: 0.9rem; color: #fff; }
.cc-cat-txt small { display: block; font-size: 0.78rem; color: #a1a1aa; }
.cc-switch { position: relative; flex: none; width: 2.6rem; height: 1.5rem; }
.cc-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cc-switch i {
  position: absolute;
  inset: 0;
  border-radius: 99px;
  background: #3f3f46;
  transition: background 0.2s ease;
  pointer-events: none;
}
.cc-switch i::after {
  content: "";
  position: absolute;
  top: 0.2rem;
  left: 0.2rem;
  width: 1.1rem;
  height: 1.1rem;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.2s ease;
}
.cc-switch input:checked + i { background: #ff002b; }
.cc-switch input:checked + i::after { transform: translateX(1.1rem); }
.cc-switch input:focus-visible + i { outline: 2px solid #ff5c77; outline-offset: 2px; }
.cc-switch.is-locked i { background: #16a34a; opacity: 0.7; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.cc-btn {
  flex: 1 1 auto;
  min-height: 2.6rem;
  padding: 0 1.1rem;
  border-radius: 0.55rem;
  font: 700 0.88rem "Plus Jakarta Sans", system-ui, sans-serif;
  cursor: pointer;
  white-space: nowrap;
}
.cc-btn[hidden] { display: none; }
/* Accetta e Rifiuta hanno lo stesso peso visivo (niente "dark pattern") */
.cc-btn-solid { color: #0a0a0a; background: #fff; border: 1px solid #fff; }
.cc-btn-solid:hover { background: #e4e4e7; }
.cc-btn-ghost { color: #fff; background: transparent; border: 1px solid rgba(255, 255, 255, 0.25); }
.cc-btn-ghost:hover { border-color: #fff; }
@media (max-width: 520px) {
  .cc { inset: auto 0.5rem 0.5rem 0.5rem; }
  .cc-box { padding: 1.1rem 1rem; max-height: 80vh; overflow: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .cc-box { transition: none; }
}
