/* Mappa delle cantine — stile allineato al tema Chateau */
.bww-mappa {
	position: relative;
	/* I livelli di Leaflet (z-index fino a 1000) restano dentro la mappa: niente sovrapposizioni con l'header fisso */
	z-index: 0;
	isolation: isolate;
	width: 100%;
	height: var(--bww-mappa-h, 560px);
	/* Mappa "libera": niente cornice né mare, i continenti galleggiano sulla pagina */
	background: transparent;
	overflow: hidden;
}

.bww-mappa__canvas {
	position: absolute;
	inset: 0;
	background: transparent;
	font-family: "Inter", sans-serif;
}

.bww-mappa .leaflet-container {
	background: transparent;
	outline: 0;
	cursor: grab;
}

/* Continenti a puntini */
.bww-puntino {
	fill: #7d8a5c;
	fill-opacity: 0.55;
}
.bww-mappa .leaflet-overlay-pane {
	opacity: 0;
	transition: opacity 0.8s ease;
}
.bww-mappa.is-pronta .leaflet-overlay-pane {
	opacity: 1;
}

/* Bordi sfumati: i continenti svaniscono verso i bordi. La dissolvenza è una maschera sullo strato dei
   continenti (niente livelli bianchi sopra la mappa, che creavano una cornice grigia appena visibile).
   Lo strato SVG di Leaflet è più grande della vista del 10% per lato: la vista va da 8,33% a 91,67%. */
.bww-mappa .leaflet-overlay-pane svg {
	-webkit-mask-image:
		linear-gradient(to right, transparent 8.3%, #000 16%, #000 84%, transparent 91.7%),
		linear-gradient(to bottom, transparent 8.3%, #000 18%, #000 82%, transparent 91.7%);
	-webkit-mask-composite: source-in;
	mask-image:
		linear-gradient(to right, transparent 8.3%, #000 16%, #000 84%, transparent 91.7%),
		linear-gradient(to bottom, transparent 8.3%, #000 18%, #000 82%, transparent 91.7%);
	mask-composite: intersect;
}

/* Controlli discreti: piccoli cerchi in basso a destra, visibili al passaggio del mouse */
.bww-mappa .leaflet-control-container .leaflet-bottom.leaflet-right {
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
	padding: 0 14px 14px 0;
}
.bww-mappa .leaflet-bottom.leaflet-right .leaflet-control {
	margin: 0;
}
.bww-mappa .leaflet-bar {
	display: flex;
	flex-direction: column;
	gap: 6px;
	border: 0;
	border-radius: 0;
	box-shadow: none;
	background: none;
}
.bww-mappa .leaflet-bar a,
.bww-mappa .leaflet-bar a:first-child,
.bww-mappa .leaflet-bar a:last-child {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	line-height: 1;
	border: 1px solid rgba(53, 76, 4, 0.18);
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.92);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	color: #354c04;
	font-family: "Barlow Condensed", sans-serif;
	font-weight: 400;
	font-size: 19px;
	transition: background 0.2s, color 0.2s;
}
.bww-mappa .leaflet-bar a:hover {
	background: #354c04;
	color: #fff;
}
.bww-mappa .leaflet-bar a.leaflet-disabled {
	opacity: 0.4;
}
@media (hover: hover) {
	.bww-mappa .leaflet-control-container {
		opacity: 0;
		transition: opacity 0.25s;
	}
	.bww-mappa:hover .leaflet-control-container,
	.bww-mappa:focus-within .leaflet-control-container {
		opacity: 1;
	}
}

/* Pin con alone pulsante */
.bww-pin {
	background: none;
	border: 0;
	transition: transform 0.2s ease-out;
	transform-origin: 50% 100%;
}
.bww-pin svg {
	position: relative;
	display: block;
	filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
}
.bww-pin__alone {
	position: absolute;
	left: 50%;
	bottom: -4px;
	width: 16px;
	height: 16px;
	margin-left: -8px;
	border-radius: 50%;
	background: rgba(53, 76, 4, 0.35);
	animation: bww-alone 2.4s ease-out infinite;
}
@keyframes bww-alone {
	0% {
		transform: scale(0.4);
		opacity: 0.9;
	}
	100% {
		transform: scale(2.8);
		opacity: 0;
	}
}
@media (prefers-reduced-motion: reduce) {
	.bww-pin__alone {
		animation: none;
		opacity: 0.3;
	}
}
.bww-pin:hover {
	z-index: 1000 !important;
}
.bww-pin:hover svg {
	transform: translateY(-3px);
	transition: transform 0.2s ease-out;
}

/* Gruppi di cantine vicine */
.bww-cluster {
	background: none;
	border: 0;
}
.bww-cluster span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	border-radius: 50%;
	background: #354c04;
	box-shadow: 0 0 0 5px rgba(53, 76, 4, 0.18);
	color: #fff;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 17px;
	font-weight: 500;
	letter-spacing: 0.05em;
}

/* Scheda del pin */
.bww-popup .leaflet-popup-content-wrapper {
	padding: 0;
	border-radius: 0;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.14);
}
.bww-popup .leaflet-popup-content {
	margin: 0;
	width: 240px !important;
	line-height: 1.4;
}
.bww-popup .leaflet-popup-tip {
	box-shadow: none;
}
.bww-popup a.leaflet-popup-close-button {
	top: 4px;
	right: 4px;
	width: 26px;
	height: 26px;
	font-size: 20px;
	color: #243305;
	background: rgba(255, 255, 255, 0.85);
	border-radius: 50%;
	line-height: 26px;
	text-align: center;
	z-index: 2;
}
.bww-card {
	display: block;
	color: inherit;
	text-decoration: none;
}
.bww-card__foto {
	display: block;
	height: 130px;
	background: #e3e7d8 center / cover no-repeat;
}
.bww-card__testo {
	display: block;
	padding: 16px 18px 18px;
}
.bww-card__voto {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 7px;
	background: #354c04;
	color: rgba(255, 255, 255, 0.8);
	font-family: "Barlow Condensed", sans-serif;
	font-size: 12px;
	line-height: 1.2;
}
.bww-card__voto strong {
	color: #fff;
	font-size: 15px;
	font-weight: 500;
}
.bww-card__nome {
	display: block;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.15;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #243305;
}
.bww-card__localita {
	display: block;
	margin-top: 4px;
	font-family: "Ibarra Real Nova", serif;
	font-style: italic;
	font-size: 15px;
	color: #6b7359;
}
.bww-card__link {
	display: inline-block;
	margin-top: 12px;
	padding-bottom: 3px;
	border-bottom: 1px solid currentColor;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #354c04;
}
.bww-card:hover .bww-card__link {
	color: #243305;
}

/* Pulsante per sbloccare la mappa su touch */
.bww-mappa__attiva {
	position: absolute;
	left: 50%;
	bottom: 18px;
	z-index: 500;
	transform: translateX(-50%);
	padding: 10px 18px;
	border: 1px solid rgba(53, 76, 4, 0.4);
	background: rgba(255, 255, 255, 0.92);
	color: #354c04;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 13px;
	font-weight: 500;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}
.bww-mappa__attiva[hidden] {
	display: none;
}

/* Guida "come funziona la mappa" — shortcode [bww_mappa_guida] */
.bww-guida {
	margin: 0;
}
.bww-guida__passi {
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: none;
}
.bww-guida__passo {
	display: flex;
	gap: 18px;
	margin: 0;
	padding: 13px 0;
	border-top: 1px solid rgba(53, 76, 4, 0.15);
}
.bww-guida__passo:last-child {
	border-bottom: 1px solid rgba(53, 76, 4, 0.15);
}
.bww-guida__numero {
	flex: 0 0 auto;
	min-width: 26px;
	padding-top: 2px;
	font-family: "Ibarra Real Nova", serif;
	font-style: italic;
	font-size: 17px;
	line-height: 1.2;
	color: #6b7359;
}
.bww-guida__testo {
	display: block;
}
.bww-guida__titolo {
	display: block;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 19px;
	font-weight: 500;
	line-height: 1.2;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: #243305;
}
.bww-guida__descrizione {
	display: block;
	margin-top: 3px;
	font-family: "Inter", sans-serif;
	font-size: 15px;
	line-height: 1.6;
	color: #333;
}
.bww-guida__legenda {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px 22px;
	margin-top: 20px;
	font-family: "Inter", sans-serif;
	font-size: 13px;
	color: #555;
}
.bww-guida__simbolo {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}
.bww-guida__simbolo svg {
	display: block;
}
.bww-guida__gruppo {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #354c04;
	box-shadow: 0 0 0 3px rgba(53, 76, 4, 0.18);
	color: #fff;
	font-family: "Barlow Condensed", sans-serif;
	font-size: 12px;
	font-weight: 500;
}
.bww-guida__totale {
	margin-left: auto;
	font-family: "Ibarra Real Nova", serif;
	font-style: italic;
	font-size: 15px;
	color: #6b7359;
}

@media only screen and (max-width: 767px) {
	/* Planisfero: proporzione orizzontale invece di un'altezza fissa */
	.bww-mappa {
		height: auto;
		aspect-ratio: 5 / 4;
	}
	.bww-guida__passo {
		gap: 14px;
		padding: 11px 0;
	}
	.bww-guida__descrizione {
		font-size: 14px;
	}
	.bww-guida__totale {
		margin-left: 0;
		flex-basis: 100%;
	}
}
