/* Cookie banner GDPR portale (F20c). */

.cookie-banner-csrf-bridge {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

#cookie-consent-banner {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 9999;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  padding: 18px 18px 14px;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  font-family: system-ui, -apple-system, sans-serif;
  color: #111827;
}

#cookie-consent-title {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
}

.cookie-consent-lead {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: #374151;
}

#cookie-consent-options {
  margin: 8px 0 12px;
}

.cookie-consent-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  margin-bottom: 6px;
}

.cookie-consent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.cookie-consent-details-link {
  font-size: 12px;
  color: #475569;
  margin-right: auto;
}

.cookie-consent-btn {
  padding: 8px 14px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  background: #fff;
  color: #0f172a;
  font-size: 13px;
  cursor: pointer;
}

.cookie-consent-btn--accept {
  border-color: transparent;
  background: #d44a2c;
  color: #fff;
  font-weight: 600;
}

.cookie-consent-btn--save {
  border-color: transparent;
  background: #0f172a;
  color: #fff;
  font-weight: 600;
}

#cookie-consent-error {
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  font-size: 12px;
  line-height: 1.45;
}

/* Dopo una revoca (consenso nel browser, #25 del fork): gli script gia' partiti si fermano solo ricaricando. */
.cookie-consent-reload {
  position: fixed;
  inset: auto 16px 16px 16px;
  z-index: 9999;
  max-width: 760px;
  margin-left: auto;
  margin-right: auto;
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.18);
  padding: 14px 18px;
  font-size: 14px;
}
.cookie-consent-reload[hidden] {
  display: none;
}

/* Mappe senza consenso «Preferenze» (#25 del fork): OpenStreetMap e la scelta di usare Google Maps. */
.rec-maps-consent {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 1000;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  max-width: calc(100% - 20px);
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 6px 8px;
  font-size: 12px;
  color: #1f2937;
}
.maplibre-3d-head .rec-maps-consent,
.portal-map-3d-head .rec-maps-consent {
  position: static;
  margin-top: 6px;
}
.rec-maps-consent__btn {
  border: 1px solid #0f6b4b;
  background: #fff;
  color: #0f6b4b;
  border-radius: 999px;
  padding: 2px 10px;
  font-size: 12px;
  cursor: pointer;
}

/* Video incorporati senza consenso «Marketing» (#26 del fork): copertina dal nostro dominio e due scelte. */
.portal-consent-video {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  background: #111827;
  border-radius: 12px;
  overflow: hidden;
}
.portal-consent-video__cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
}
.portal-consent-video__panel {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 16px;
  text-align: center;
  color: #fff;
}
.portal-consent-video__panel p {
  margin: 0 0 4px;
  font-size: 14px;
}
.portal-consent-video__btn {
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: #fff;
  color: #111827;
  font-weight: 600;
  cursor: pointer;
}
.portal-consent-video iframe {
  width: 100%;
  height: 100%;
  border: 0;
}
