/**
 * Mappa oliveto — Adotta un Ulivo.
 * Stile allineato al sito (fondo scuro, serif, oro): tutti i colori sono
 * espliciti per non ereditare i colori del tema. I due colori marker sono
 * sovrascrivibili da Impostazioni.
 */

.adu-map-wrap {
	--adu-color-available: #1a1a1a;   /* nero: ulivo disponibile */
	--adu-color-adopted: #c9a227;     /* oro: ulivo adottato */
	--adu-color-unavailable: #9aa0a6; /* grigio: non disponibile / manutenzione */
	--adu-color-reserved: #b5651d;    /* prenotazione temporanea in corso */
	--adu-gold: #c9a227;
	--adu-gold-soft: rgba(201, 162, 39, 0.45);
	--adu-cream: #efe6d2;             /* testo chiaro su fondo scuro */
	--adu-cream-soft: rgba(239, 230, 210, 0.75);
	--adu-dark: #171310;              /* pannelli scuri */
	--adu-cluster-bg: #ffffff;
	--adu-cluster-text: #1a1a1a;
	--adu-cluster-ring-base: #e6e2d6; /* parte non-adottata dell'anello */
	--adu-ring-width: 5px;
	--adu-marker-dot: 18px;           /* diametro visivo del pallino (tap target 40px) */

	position: relative;
	width: 100%;
	margin: 0 auto;
	padding-bottom: 96px;             /* respiro prima del footer */
	font-family: inherit;
}

/* ----------------------------------------------------------------------
 * Header sopra la mappa (colori espliciti: mai testo scuro su fondo scuro)
 * -------------------------------------------------------------------- */

.adu-map-hero {
	text-align: center;
	padding: 10px 16px 26px;
}

.adu-map-eyebrow {
	margin: 0 0 10px;
	font-size: 13px;
	letter-spacing: 0.28em;
	text-transform: uppercase;
	color: var(--adu-gold) !important;
	font-weight: 500;
}

.adu-map-title {
	margin: 0 0 12px;
	line-height: 1.2;
	color: var(--adu-cream) !important;
	font-weight: 400;
	font-size: clamp(30px, 4.2vw, 44px);
	letter-spacing: 0.02em;
}

.adu-map-sub {
	margin: 0 auto 22px;
	max-width: 560px;
	color: var(--adu-cream-soft) !important;
	font-size: 17px;
	line-height: 1.6;
}

.adu-map-stats {
	display: flex;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
}

.adu-stat {
	display: inline-flex;
	align-items: baseline;
	gap: 8px;
	background: rgba(239, 230, 210, 0.04);
	color: var(--adu-cream);
	border: 1px solid var(--adu-gold-soft);
	border-radius: 999px;
	padding: 9px 20px;
	font-size: 14px;
	letter-spacing: 0.04em;
}

.adu-stat strong {
	font-size: 21px;
	color: var(--adu-cream);
	font-weight: 600;
}

.adu-stat--gold strong { color: var(--adu-gold); }

/* ----------------------------------------------------------------------
 * Cornice mappa
 * -------------------------------------------------------------------- */

.adu-map-frame {
	background: var(--adu-dark);
	border: 1px solid var(--adu-gold-soft);
	border-radius: 4px;
	padding: 8px;
}

.adu-map {
	width: 100%;
	height: 72vh;
	min-height: 440px;
	background: #232019;
	border-radius: 2px;
	z-index: 0;
	overflow: hidden;
}

@media (max-width: 480px) {
	.adu-map { height: 64vh; min-height: 380px; }
}

/* Overlay con dissolvenza (HD drone e mappa larga). */
.adu-map .adu-map-layer {
	transition: opacity 0.5s ease;
	will-change: opacity;
}

/* Controlli zoom: stile blindato contro i CSS del tema
   (niente sottolineature, colori link o line-height ereditati). */

.adu-map .leaflet-control-zoom,
.adu-mini-map .leaflet-control-zoom {
	border: none;
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
	border-radius: 4px;
	overflow: hidden;
}

.adu-map .leaflet-control-zoom a,
.adu-map .leaflet-control-zoom a:hover,
.adu-map .leaflet-control-zoom a:focus,
.adu-map .leaflet-control-zoom a:visited,
.adu-mini-map .leaflet-control-zoom a,
.adu-mini-map .leaflet-control-zoom a:hover,
.adu-mini-map .leaflet-control-zoom a:focus,
.adu-mini-map .leaflet-control-zoom a:visited {
	width: 38px !important;
	height: 38px !important;
	line-height: 38px !important;
	font-size: 20px !important;
	font-weight: 400 !important;
	font-family: Arial, sans-serif !important;
	color: #241f14 !important;
	background: #ffffff !important;
	text-decoration: none !important;
	border-bottom: 1px solid #eee7d8 !important;
	box-shadow: none !important;
	outline: none;
}

.adu-map .leaflet-control-zoom a:hover,
.adu-mini-map .leaflet-control-zoom a:hover { background: #f6f1e4 !important; }
.adu-map .leaflet-control-zoom a:last-child,
.adu-mini-map .leaflet-control-zoom a:last-child { border-bottom: none !important; }
.adu-map .leaflet-control-zoom a.leaflet-disabled,
.adu-mini-map .leaflet-control-zoom a.leaflet-disabled { color: #c5beae !important; }

/* ----------------------------------------------------------------------
 * Cluster: cerchio bianco, numero = disponibili, anello oro = % adottati
 * -------------------------------------------------------------------- */

.adu-cluster-icon { background: none; border: none; }

.adu-cluster {
	box-sizing: border-box;
	border-radius: 50%;
	padding: var(--adu-ring-width);
	background: conic-gradient(
		var(--adu-color-adopted) var(--adu-ring-pct, 0%),
		var(--adu-cluster-ring-base) 0
	);
	box-shadow: 0 3px 12px rgba(0, 0, 0, 0.35);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.15s ease;
}

.adu-cluster:hover { transform: scale(1.06); }

.adu-cluster-count {
	width: 100%;
	height: 100%;
	border-radius: 50%;
	background: var(--adu-cluster-bg);
	color: var(--adu-cluster-text);
	font-weight: 700;
	font-size: 15px;
	font-family: Arial, sans-serif;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ----------------------------------------------------------------------
 * Marker singoli (tap target 40px, pallino visivo centrato)
 * -------------------------------------------------------------------- */

.adu-marker-icon { background: none; border: none; }

.adu-marker {
	width: var(--adu-marker-dot);
	height: var(--adu-marker-dot);
	margin: calc((40px - var(--adu-marker-dot)) / 2);
	border-radius: 50%;
	border: 2px solid #ffffff;
	box-shadow: 0 1px 5px rgba(0, 0, 0, 0.45);
	transition: transform 0.12s ease;
}

.adu-marker:hover { transform: scale(1.25); }

.adu-marker--available   { background: var(--adu-color-available); }
.adu-marker--adopted     { background: var(--adu-color-adopted); }
.adu-marker--unavailable { background: var(--adu-color-unavailable); }
.adu-marker--reserved    { background: var(--adu-color-reserved); opacity: 0.75; }

/* ----------------------------------------------------------------------
 * Card popup
 * -------------------------------------------------------------------- */

.adu-popup .leaflet-popup-content-wrapper {
	border-radius: 4px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);
	background: #ffffff;
	color: #241f14;
}

.adu-popup .leaflet-popup-content { margin: 14px 16px 16px; }

.adu-card { min-width: 210px; max-width: 250px; font-size: 14px; line-height: 1.45; color: #241f14; }

.adu-card-photo {
	display: block;
	width: 100%;
	height: 130px;
	object-fit: cover;
	border-radius: 3px;
	margin: 0 0 10px;
}

.adu-card-code {
	margin: 0 0 2px;
	font-weight: 700;
	font-size: 16px;
	letter-spacing: 0.02em;
	color: #241f14;
}

.adu-card-state {
	margin: 0 0 8px;
	color: #857c66;
	text-transform: uppercase;
	font-size: 11px;
	letter-spacing: 0.14em;
	font-weight: 600;
}

.adu-card-state--adopted { color: #c9a227; }
.adu-card-name { margin: 0 0 2px; font-weight: 600; font-size: 15px; color: #241f14; }
.adu-card-by { margin: 0 0 6px; font-style: italic; color: #6d6656; }
.adu-card-phase { margin: 0 0 10px; color: #4d4636; }

/* Pulsanti: ogni proprietà è blindata (!important) perché temi e builder
   applicano colori propri (anche rosa…) agli elementi <button> e <a>. */

.adu-btn,
.adu-btn:hover,
.adu-btn:focus,
.adu-btn:active,
.adu-btn:visited {
	display: block !important;
	width: 100% !important;
	box-sizing: border-box !important;
	text-align: center !important;
	padding: 11px 16px !important;
	margin: 0 !important;
	border-radius: 3px !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	letter-spacing: 0.12em !important;
	text-transform: uppercase !important;
	line-height: 1.3 !important;
	cursor: pointer;
	text-decoration: none !important;
	box-shadow: none !important;
	outline: none;
	transition: background 0.15s ease, color 0.15s ease;
}

.adu-btn--primary,
.adu-btn--primary:visited {
	background: #c9a227 !important;
	border: 1px solid #c9a227 !important;
	color: #ffffff !important;
}

.adu-btn--primary:hover,
.adu-btn--primary:focus {
	background: #b08d1e !important;
	border-color: #b08d1e !important;
	color: #ffffff !important;
}

.adu-btn--ghost,
.adu-btn--ghost:visited {
	background: #ffffff !important;
	border: 1px solid #c9a227 !important;
	color: #241f14 !important;
}

.adu-btn--ghost:hover,
.adu-btn--ghost:focus {
	background: #faf5e6 !important;
	border-color: #b08d1e !important;
	color: #241f14 !important;
}

/* ----------------------------------------------------------------------
 * Legenda
 * -------------------------------------------------------------------- */

.adu-map-legend {
	display: flex;
	align-items: center;
	gap: 18px;
	flex-wrap: wrap;
	padding: 12px 8px 4px;
	font-size: 13px;
	color: var(--adu-cream);
	letter-spacing: 0.03em;
}

.adu-legend-item { display: inline-flex; align-items: center; gap: 7px; }

.adu-legend-dot {
	display: inline-block;
	width: 13px;
	height: 13px;
	border-radius: 50%;
	border: 2px solid #ffffff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.adu-legend-dot--available { background: var(--adu-color-available); }
.adu-legend-dot--adopted   { background: var(--adu-color-adopted); }

.adu-legend-hint {
	color: var(--adu-cream-soft);
	font-size: 12px;
	margin-left: auto;
}

@media (max-width: 640px) {
	.adu-legend-hint { margin-left: 0; flex-basis: 100%; }
}

/* ----------------------------------------------------------------------
 * FAQ
 * -------------------------------------------------------------------- */

.adu-faq {
	max-width: 760px;
	margin: 72px auto 0;
	padding: 0 16px;
	text-align: center;
}

.adu-faq-title {
	margin: 0 0 28px;
	color: var(--adu-cream) !important;
	font-weight: 400;
	font-size: clamp(24px, 3.2vw, 34px);
	letter-spacing: 0.02em;
}

.adu-faq-list { text-align: left; }

.adu-faq-item {
	border-bottom: 1px solid rgba(239, 230, 210, 0.16);
}

.adu-faq-item:first-child { border-top: 1px solid rgba(239, 230, 210, 0.16); }

.adu-faq-item summary {
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	cursor: pointer;
	padding: 18px 4px;
	color: var(--adu-cream);
	font-size: 17px;
	letter-spacing: 0.02em;
	transition: color 0.15s ease;
}

.adu-faq-item summary::-webkit-details-marker { display: none; }
.adu-faq-item summary:hover { color: var(--adu-gold); }

.adu-faq-mark {
	flex: none;
	position: relative;
	width: 14px;
	height: 14px;
}

.adu-faq-mark::before,
.adu-faq-mark::after {
	content: '';
	position: absolute;
	background: var(--adu-gold);
	transition: transform 0.2s ease;
}

.adu-faq-mark::before { top: 6px; left: 0; width: 14px; height: 2px; }
.adu-faq-mark::after  { top: 0; left: 6px; width: 2px; height: 14px; }

.adu-faq-item[open] .adu-faq-mark::after { transform: scaleY(0); }
.adu-faq-item[open] summary { color: var(--adu-gold); }

.adu-faq-answer {
	padding: 0 4px 20px;
	color: var(--adu-cream-soft);
	font-size: 15px;
	line-height: 1.7;
	max-width: 660px;
}

/* ----------------------------------------------------------------------
 * Modal dettaglio ("Scopri di più")
 * -------------------------------------------------------------------- */

.adu-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(20, 16, 8, 0.65);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.adu-modal {
	position: relative;
	background: #ffffff;
	color: #241f14;
	border-radius: 4px;
	border-top: 3px solid #c9a227;
	padding: 30px 26px;
	max-width: 430px;
	width: 100%;
	box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

/* X di chiusura: blindata come i pulsanti (i temi colorano i <button>). */
.adu-modal-close,
.adu-modal-close:hover,
.adu-modal-close:focus,
.adu-modal-close:active {
	position: absolute !important;
	top: 8px !important;
	right: 12px !important;
	width: auto !important;
	background: transparent !important;
	border: none !important;
	border-radius: 0 !important;
	padding: 2px 6px !important;
	margin: 0 !important;
	font-size: 26px !important;
	line-height: 1 !important;
	cursor: pointer;
	color: #857c66 !important;
	box-shadow: none !important;
	outline: none;
}

.adu-modal-close:hover { color: #241f14 !important; }

.adu-modal-name { margin: 4px 0 8px; color: #241f14; }

.adu-modal-dedication {
	margin: 12px 0 0;
	font-style: italic;
	color: #4d4636;
	border-left: 3px solid #c9a227;
	padding-left: 12px;
}

.adu-modal-photo {
	display: block;
	width: 100%;
	height: 170px;
	object-fit: cover;
	border-radius: 3px;
	margin: 4px 0 14px;
}

.adu-modal-photo--tall { height: 240px; }

/* Dettaglio ulivo adottato */

.adu-modal--tree { max-width: 470px; }

.adu-facts {
	list-style: none;
	margin: 16px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid #eee7d8;
}

.adu-facts li {
	position: relative;
	padding: 5px 0 5px 22px;
	color: #4d4636;
	font-size: 14px;
	line-height: 1.5;
}

.adu-facts li::before {
	content: '';
	position: absolute;
	left: 4px;
	top: 12px;
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #c9a227;
}

.adu-modal-cta {
	margin: 16px 0 0;
	padding-top: 14px;
	border-top: 1px solid #eee7d8;
	font-style: italic;
	color: #857c66;
	font-size: 14px;
	line-height: 1.5;
}

/* ----------------------------------------------------------------------
 * "Il tuo olio sta nascendo" — avanzamento annata
 * -------------------------------------------------------------------- */

.adu-progress { margin: 14px 0 10px; }

.adu-progress--compact { margin: 8px 0 12px; }

.adu-progress-title {
	margin: 0 0 8px;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	font-weight: 600;
	color: #c9a227;
}

.adu-progress-bar {
	height: 5px;
	border-radius: 999px;
	background: #eee7d8;
	overflow: hidden;
}

.adu-progress-bar span {
	display: block;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, #d9bd62, #c9a227);
	transition: width 0.8s ease;
}

.adu-fase-icon {
	width: 17px;
	height: 17px;
	flex: none;
	color: #c9a227;
}

.adu-progress-line {
	display: flex;
	align-items: center;
	gap: 7px;
	margin: 7px 0 0;
	font-size: 13px;
	color: #4d4636;
}

.adu-progress-line em { color: #857c66; font-style: normal; }

.adu-progress-rows {
	list-style: none;
	margin: 10px 0 0;
	padding: 0;
}

.adu-progress-rows li {
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 4px 0;
	font-size: 14px;
	color: #4d4636;
}

/* Modal pre-acquisto */

.adu-modal--adopt { max-width: 460px; }

.adu-modal-lead {
	margin: 0 0 16px;
	color: #6d6656;
	font-size: 14px;
	line-height: 1.5;
}

.adu-field { display: block; margin: 0 0 14px; }

.adu-field span {
	display: block;
	margin-bottom: 5px;
	font-size: 13px;
	font-weight: 600;
	color: #241f14;
	letter-spacing: 0.02em;
}

.adu-modal .adu-field input,
.adu-modal .adu-field select,
.adu-modal .adu-field textarea {
	width: 100% !important;
	box-sizing: border-box !important;
	padding: 10px 12px !important;
	border: 1px solid #d8d2c2 !important;
	border-radius: 3px !important;
	background: #fdfcf8 !important;
	color: #241f14 !important;
	font-family: inherit !important;
	font-size: 14px !important;
	line-height: 1.4 !important;
	box-shadow: none !important;
}

.adu-modal .adu-field input:focus,
.adu-modal .adu-field select:focus,
.adu-modal .adu-field textarea:focus {
	border-color: #c9a227 !important;
	outline: none !important;
}

.adu-modal-note {
	margin: 2px 0 14px;
	font-size: 12px;
	color: #857c66;
}

/* ----------------------------------------------------------------------
 * Pulsanti: testo sempre visibile
 *
 * Il tema applica ai link un effetto di testo in gradiente
 * (background-clip sul testo con riempimento trasparente). Sul pulsante
 * il risultato è una targa dorata muta, che rivela la scritta solo al
 * passaggio del mouse. Il colore va imposto anche a -webkit-text-fill-color,
 * perché quella proprietà vince su `color`.
 * -------------------------------------------------------------------- */

.adu-btn,
.adu-btn:link,
.adu-btn:visited,
.adu-btn:hover,
.adu-btn:focus,
.adu-btn:active {
	-webkit-background-clip: border-box !important;
	background-clip: border-box !important;
	text-shadow: none !important;
	transition: background-color 0.18s ease, border-color 0.18s ease,
	            transform 0.18s ease, box-shadow 0.18s ease !important;
}

.adu-btn--primary,
.adu-btn--primary:link,
.adu-btn--primary:visited,
.adu-btn--primary:not(:hover) {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
}

.adu-btn--ghost,
.adu-btn--ghost:link,
.adu-btn--ghost:visited,
.adu-btn--ghost:not(:hover) {
	color: #241f14 !important;
	-webkit-text-fill-color: #241f14 !important;
}

/* Il passaggio del mouse solleva il pulsante invece di far comparire
   il testo: l'informazione c'è sempre, il movimento la conferma. */
.adu-btn--primary:hover,
.adu-btn--primary:focus {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	transform: translateY(-1px);
	box-shadow: 0 5px 16px rgba(201, 162, 39, 0.34);
}

.adu-btn--ghost:hover,
.adu-btn--ghost:focus {
	color: #241f14 !important;
	-webkit-text-fill-color: #241f14 !important;
	transform: translateY(-1px);
	box-shadow: 0 5px 16px rgba(36, 31, 20, 0.22);
}

.adu-btn--primary:active,
.adu-btn--ghost:active {
	transform: translateY(0);
	box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
	.adu-btn,
	.adu-btn:hover,
	.adu-btn:focus,
	.adu-btn:active {
		transition: none !important;
		transform: none !important;
	}
}
