/* Gestione del consenso interna al sito — nessuna piattaforma esterna. */
.cookie-banner {
  width: min(680px, calc(100% - 32px));
  max-height: min(88vh, 720px);
  overflow-y: auto;
  padding: 26px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 24px;
  background: rgba(7, 20, 27, .985);
  color: #eef4f6;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .32);
}
.cookie-banner[hidden],
.cookie-preferences[hidden],
.cookie-actions[hidden] {
  display: none !important;
}
.cookie-banner__summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 20px;
}
.cookie-banner__eyebrow {
  margin: 0 0 6px !important;
  color: var(--yellow) !important;
  font-family: var(--font-display);
  font-size: .76rem !important;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.cookie-banner h2 {
  margin: 0 0 10px;
  color: #fff;
  font-size: clamp(1.22rem, 2.2vw, 1.55rem);
}
.cookie-banner p {
  margin: 0;
  color: rgba(238, 244, 246, .78);
  font-size: .91rem;
  line-height: 1.55;
}
.cookie-banner__info {
  color: var(--yellow);
  font-family: var(--font-display);
  font-size: .82rem;
  font-weight: 700;
  white-space: nowrap;
}
.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}
.cookie-actions button,
.cookie-preferences__actions button {
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-family: var(--font-display);
  font-size: .84rem;
  font-weight: 750;
  cursor: pointer;
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.cookie-actions button:hover,
.cookie-preferences__actions button:hover {
  transform: translateY(-1px);
}
.cookie-accept,
.cookie-save {
  background: var(--yellow);
  color: var(--navy);
}
.cookie-essential,
.cookie-customize,
.cookie-back {
  border-color: rgba(255,255,255,.22) !important;
  background: rgba(255,255,255,.07);
  color: #fff;
}
.cookie-preferences {
  margin-top: 22px;
  border-top: 1px solid rgba(255,255,255,.14);
  padding-top: 8px;
}
.cookie-preference-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  padding: 16px 0;
  border-bottom: 1px solid rgba(255,255,255,.1);
}
.cookie-preference-row strong {
  display: block;
  margin-bottom: 4px;
  color: #fff;
  font-family: var(--font-display);
  font-size: .94rem;
}
.cookie-preference-row p,
.cookie-preference-row span span {
  display: block;
  color: rgba(238,244,246,.7);
  font-size: .82rem;
  line-height: 1.45;
}
.cookie-preference-row--interactive {
  cursor: pointer;
}
.cookie-preference-row input[type="checkbox"] {
  appearance: none;
  width: 48px;
  height: 28px;
  margin: 0;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  background: #31434c;
  cursor: pointer;
  position: relative;
  transition: background 160ms ease, border-color 160ms ease;
}
.cookie-preference-row input[type="checkbox"]::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  transition: transform 160ms ease;
}
.cookie-preference-row input[type="checkbox"]:checked {
  border-color: var(--yellow);
  background: var(--yellow);
}
.cookie-preference-row input[type="checkbox"]:checked::after {
  transform: translateX(20px);
  background: var(--navy);
}
.cookie-preference-row input[type="checkbox"]:focus-visible {
  outline: 3px solid rgba(255,205,0,.42);
  outline-offset: 3px;
}
.cookie-status {
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 6px 11px;
  border-radius: 999px;
  font-size: .74rem;
  font-weight: 750;
}
.cookie-status--required {
  background: rgba(255,205,0,.14);
  color: var(--yellow);
}
.cookie-preferences__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 18px;
}

.projects-map.is-consent-blocked {
  display: grid;
  place-items: center;
  min-height: 430px;
  padding: 30px;
  background:
    radial-gradient(circle at 80% 10%, rgba(255,205,0,.13), transparent 32%),
    linear-gradient(145deg, #f8f7f3, #eef2f1);
}
.projects-map-consent {
  display: grid;
  justify-items: center;
  max-width: 620px;
  text-align: center;
}
.projects-map-consent__icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: var(--navy);
  color: var(--yellow);
  font-size: 2rem;
  font-weight: 800;
}
.projects-map-consent h3 {
  margin: 0 0 9px;
  color: var(--navy);
}
.projects-map-consent p {
  margin: 0 0 20px;
  color: var(--ink-soft);
}
html[data-theme="dark"] .projects-map.is-consent-blocked {
  background:
    radial-gradient(circle at 80% 10%, rgba(255,205,0,.1), transparent 32%),
    linear-gradient(145deg, #0d1e27, #102832);
}
html[data-theme="dark"] .projects-map-consent h3 {
  color: #fff;
}
html[data-theme="dark"] .projects-map-consent p {
  color: #c4d0d5;
}

@media (max-width: 640px) {
  .cookie-banner {
    left: 12px;
    bottom: 12px;
    width: calc(100% - 24px);
    padding: 20px;
    border-radius: 20px;
  }
  .cookie-banner__summary {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .cookie-banner__info {
    justify-self: start;
  }
  .cookie-actions,
  .cookie-preferences__actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .cookie-actions button,
  .cookie-preferences__actions button {
    width: 100%;
  }
  .cookie-preference-row {
    gap: 12px;
  }
  .projects-map.is-consent-blocked {
    min-height: 370px;
    padding: 22px 16px;
  }
}
