/* GB Store Map - stili base. I colori arrivano dalle variabili impostate nel back end. */

.asm-map-wrap {
	position: relative;
	width: 100%;
}

.asm-map {
	width: 100%;
	min-height: 200px;
	z-index: 0; /* evita che la mappa copra header sticky / menu di Salient */
	background: #e9eef2;
}

/* Salient/temi applicano max-width alle img: Leaflet ha bisogno dei tile a dimensione piena */
.asm-map img {
	max-width: none !important;
	max-height: none !important;
	box-shadow: none !important;
	border-radius: 0 !important;
}

/* Barra sopra la mappa */
.asm-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	padding: 10px 14px;
	background: var(--asm-bar-bg, #f4f4f4);
	color: var(--asm-bar-color, #1d1d1b);
	font-size: 14px;
	line-height: 1.4;
}
.asm-bar__count {
	font-weight: 600;
}
.asm-bar__link,
.asm-bar__link:visited {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 3px;
}
.asm-bar__link:hover,
.asm-bar__link:focus {
	text-decoration-thickness: 2px;
}

/* Pallino */
.asm-map .asm-pin-icon {
	background: none;
	border: 0;
	outline: none;
}
.asm-map .asm-pin {
	display: block;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--asm-dot, #e30613);
	border: 2px solid var(--asm-dot-border, #fff);
	box-shadow: 0 1px 3px rgba(0, 0, 0, .35);
	cursor: pointer;
	transition: transform .15s ease;
}
.asm-map .asm-pin-icon:hover .asm-pin,
.asm-map .asm-pin-icon:focus .asm-pin {
	transform: scale(1.35);
}
.asm-map .asm-pin-icon:focus-visible .asm-pin {
	outline: 2px solid var(--asm-dot, #e30613);
	outline-offset: 3px;
}
/* Posizione approssimata (centro città/CAP) */
.asm-map .asm-pin-icon--approx .asm-pin {
	opacity: .75;
	border-style: dashed;
}

/* Cluster: pallino grande con il numero di negozi */
.asm-map .asm-cluster-icon {
	background: none;
	border: 0;
}
.asm-map .asm-cluster {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	border-radius: 50%;
	background: var(--asm-cluster, #e30613);
	color: var(--asm-cluster-text, #fff);
	font-weight: 700;
	font-size: 13px;
	line-height: 1;
	box-shadow: 0 0 0 5px rgba(0, 0, 0, .12), 0 2px 6px rgba(0, 0, 0, .3); /* fallback browser datati */
	box-shadow: 0 0 0 5px color-mix(in srgb, var(--asm-cluster, #e30613) 30%, transparent), 0 2px 6px rgba(0, 0, 0, .3);
	cursor: pointer;
	transition: transform .15s ease;
}
.asm-map .asm-cluster--md { font-size: 14px; }
.asm-map .asm-cluster--lg { font-size: 15px; }
.asm-map .asm-cluster-icon:hover .asm-cluster {
	transform: scale(1.08);
}

/* Tooltip */
.asm-map .leaflet-tooltip.asm-tooltip {
	background: var(--asm-tip-bg, #1d1d1b);
	color: var(--asm-tip-color, #fff);
	border: var(--asm-tip-border, none);
	border-radius: var(--asm-tip-radius, 6px);
	box-shadow: var(--asm-tip-shadow, none);
	padding: 8px 12px;
	font-size: 13px;
	line-height: 1.4;
	white-space: nowrap;
}

.asm-map .leaflet-tooltip-top.asm-tooltip::before {
	border-top-color: var(--asm-tip-bg, #1d1d1b);
}
.asm-map .leaflet-tooltip-bottom.asm-tooltip::before {
	border-bottom-color: var(--asm-tip-bg, #1d1d1b);
}
.asm-map .leaflet-tooltip-left.asm-tooltip::before {
	border-left-color: var(--asm-tip-bg, #1d1d1b);
}
.asm-map .leaflet-tooltip-right.asm-tooltip::before {
	border-right-color: var(--asm-tip-bg, #1d1d1b);
}

.asm-tip__name {
	display: block;
	font-weight: 700;
	margin-bottom: 2px;
	color: inherit;
}

.asm-tip__region,
.asm-tip__country,
.asm-tip__extra {
	opacity: .85;
	font-size: 12px;
}

.asm-tip__approx {
	margin-top: 4px;
	font-size: 11px;
	font-style: italic;
	opacity: .75;
}

/* Elenco completo [GB_store_list] */
.asm-store-directory__group {
	margin-bottom: 28px;
}
.asm-store-directory__count {
	font-weight: 400;
	opacity: .6;
}
.asm-store-directory__list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 12px 24px;
}
.asm-store-directory__item {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 0;
	border-top: 1px solid rgba(0, 0, 0, .1);
}
.asm-store-directory__extra {
	font-size: .9em;
	opacity: .8;
}

/* Elenco testuale sotto la mappa */
.asm-store-list {
	margin: 16px 0 0;
	padding-left: 18px;
}

.asm-sr-only {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

@media (max-width: 690px) {
	.asm-map .leaflet-tooltip.asm-tooltip {
		white-space: normal;
		max-width: 240px;
	}
}
