/* ============================================================
   E-Stile Roma — consent.css
   Cookie banner + checkbox consenso newsletter
   (coerente con i token di base.css)
   ============================================================ */

/* ---------- Cookie banner ---------- */
.cookie-consent {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 900;
  display: none;
  padding: var(--s3);
  pointer-events: none;
}
.cookie-consent.is-visible { display: block; }

.cookie-consent__panel {
  pointer-events: auto;
  max-width: var(--maxw);
  margin-inline: auto;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--hair-strong);
  border-radius: var(--r-card);
  box-shadow: 0 24px 60px -24px rgba(21, 19, 15, 0.4);
  padding: var(--s4);
  display: grid;
  gap: var(--s3);
  animation: cookie-rise 0.5s var(--ease-out) both;
}
@keyframes cookie-rise {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .cookie-consent__panel { animation: none; }
}

.cookie-consent__title {
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
}
.cookie-consent__text {
  font-size: 0.9rem;
  line-height: 1.55;
  color: var(--muted);
  max-width: 78ch;
}
.cookie-consent__text a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--accent);
}
.cookie-consent__text a:hover { color: var(--accent); }

.cookie-consent__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2);
  justify-content: flex-end;
}

.cookie-btn {
  cursor: pointer;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  padding: 12px 20px;
  border-radius: var(--r-pill);
  border: 1px solid var(--hair-strong);
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.cookie-btn--ghost:hover { border-color: var(--ink); }
.cookie-btn--solid {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.cookie-btn--solid:hover { background: var(--accent); border-color: var(--accent); }

/* La home nasconde il cursore nativo (cursore custom sotto il banner):
   dentro il banner ripristiniamo un cursore visibile. */
body.has-custom-cursor .cookie-consent,
body.has-custom-cursor .cookie-consent * { cursor: auto; }
body.has-custom-cursor .cookie-consent a,
body.has-custom-cursor .cookie-consent button,
body.has-custom-cursor .cookie-consent label,
body.has-custom-cursor .cookie-consent input[type="checkbox"] { cursor: pointer; }
body.has-custom-cursor .cookie-consent .cookie-pref--locked,
body.has-custom-cursor .cookie-consent .cookie-pref--locked input { cursor: not-allowed; }

/* ---------- Pannello preferenze ---------- */
.cookie-consent__prefs {
  display: grid;
  gap: var(--s3);
  border-top: 1px solid var(--hair);
  padding-top: var(--s3);
}
.cookie-pref {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--s3);
  align-items: start;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--muted);
  cursor: pointer;
}
.cookie-pref strong { color: var(--ink); font-weight: 600; }
.cookie-pref input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
  cursor: pointer;
}
.cookie-pref--locked { cursor: default; }
.cookie-pref--locked input { cursor: not-allowed; }
.cookie-consent__save { display: flex; justify-content: flex-end; }

@media (min-width: 760px) {
  .cookie-consent__panel {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: var(--s4);
  }
  .cookie-consent__prefs { grid-column: 1 / -1; }
  .cookie-consent.is-expanded .cookie-consent__panel { grid-template-columns: 1fr; }
  .cookie-consent__actions { justify-content: flex-end; }
}

/* ---------- Consenso newsletter ---------- */
.nl-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--s2);
  max-width: 520px;
  margin: var(--s4) auto 0;
  text-align: left;
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--muted);
}
.nl-consent input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
}
.nl-consent a {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-color: var(--accent);
}
.nl-consent a:hover { color: var(--accent); }
.nl-consent.is-invalid { color: var(--accent); }
.nl-consent.is-invalid input { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- Link legali nel footer ---------- */
.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s3) var(--s4);
  align-items: center;
}
.footer__legal button.footer__link {
  cursor: pointer;
  font: inherit;
  color: inherit;
}
