/**
 * Grosmac installations map (Leaflet).
 */

.gm-installations-map-section {
	margin: 2.5rem 0;
	padding: 1.5rem 0 0;
	border-top: 1px solid var(--gm-color-border, #d9d9d9);
}

.gm-installations-map-section.is-compact {
	margin: 1.5rem 0 0;
	padding-top: 1rem;
}

.gm-installations-map-section.is-headerless {
	margin: 0;
	padding: 0;
	border-top: 0;
}

.gm-installations-map-section__title {
	margin: 0 0 0.5rem;
	font-size: clamp(1.25rem, 2vw, 1.75rem);
	line-height: 1.15;
	color: var(--gm-color-ink, #161616);
}

.gm-installations-map-section__lead {
	margin: 0 0 0.75rem;
	max-width: 72ch;
	text-wrap: pretty;
	color: var(--gm-color-muted, #555);
}

.gm-installations-map-section__stat {
	margin: 0 0 1rem;
	font-size: 0.95rem;
	color: var(--gm-color-ink, #161616);
}

.gm-installations-map {
	position: relative;
	z-index: 0;
	isolation: isolate;
	width: 100%;
	min-height: var(--gm-map-height, 420px);
	border: 2px solid var(--gm-color-ink, #161616);
	border-radius: 0;
	overflow: hidden;
	background: #f4f4f1;
	box-shadow: 6px 6px 0 rgba(0, 0, 0, 0.06);
}

.gm-installations-map.is-loading::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.5), transparent);
	animation: gm-map-shimmer 1.2s infinite;
	pointer-events: none;
}

@keyframes gm-map-shimmer {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

.gm-installations-map__empty {
	position: absolute;
	inset: 0;
	display: grid;
	place-items: center;
	margin: 0;
	padding: 1rem;
	text-align: center;
	color: var(--gm-color-muted, #555);
	background: rgba(255, 255, 255, 0.85);
	z-index: 500;
}

.gm-installations-marker {
	background: transparent;
	border: none;
}

.gm-installations-marker--near .gm-installations-marker__dot {
	box-shadow: 0 0 0 3px rgba(243, 146, 0, 0.45);
}

.gm-installations-marker--unlinked .gm-installations-marker__dot {
	background: #fff;
	border: 2px dashed var(--gm-color-accent, #f39200);
	box-shadow: none;
}

.gm-installations-marker__dot {
	display: block;
	width: 14px;
	height: 14px;
	border-radius: 50%;
	background: var(--gm-color-accent, #f39200);
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.35);
}

.marker-cluster-small,
.marker-cluster-medium,
.marker-cluster-large {
	background: rgba(243, 146, 0, 0.25);
}

.marker-cluster-small div,
.marker-cluster-medium div,
.marker-cluster-large div {
	background: var(--gm-color-accent, #f39200);
	color: #161616;
	font-weight: 700;
}

.gm-map-popup__place {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.95rem;
}

.gm-map-popup__machine {
	margin: 0 0 0.5rem;
	font-size: 0.85rem;
	color: #444;
}

.gm-map-popup__year {
	display: inline-block;
	margin-bottom: 0.5rem;
	padding: 0.1rem 0.45rem;
	font-size: 0.75rem;
	background: #f0f0ec;
	border-radius: 0;
}

.gm-map-popup__unlinked {
	margin: 0 0 0.5rem;
	font-size: 0.8rem;
	font-style: italic;
	color: #666;
}

.gm-map-popup__cta {
	display: inline-block;
	margin-top: 0.25rem;
	font-weight: 700;
	color: var(--gm-color-ink, #161616);
}

.gm-installations-map-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin: 0.75rem 0 0;
	font-size: 0.85rem;
	color: var(--gm-color-muted, #555);
}

.gm-installations-map-legend__item {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
}

.gm-installations-map-legend__dot {
	width: 12px;
	height: 12px;
	border-radius: 50%;
	background: var(--gm-color-accent, #f39200);
	border: 2px solid #fff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.gm-installations-map-legend__dot--unlinked {
	background: #fff;
	border: 2px dashed var(--gm-color-accent, #f39200);
	box-shadow: none;
}

.gm-installations-map-fallback {
	margin: 0.75rem 0 0;
	padding-left: 1.2rem;
}

.gm-installations-map-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75rem 1.25rem;
	margin: 0 0 1rem;
}

.gm-installations-map-filters__label {
	font-size: 0.9rem;
	font-weight: 600;
	color: var(--gm-color-ink, #161616);
}

.gm-installations-map-filters__select {
	min-width: 12rem;
	padding: 0.35rem 0.5rem;
	border: 1px solid var(--gm-color-border, #d9d9d9);
	border-radius: 0;
}

.gm-installations-map-filters__stat {
	margin: 0;
	font-size: 0.9rem;
	color: var(--gm-color-muted, #555);
}

.gm-map-popup__precision {
	margin: 0.25rem 0 0;
	font-size: 0.8rem;
	color: var(--gm-color-muted, #555);
}

@media (max-width: 767px) {
	.gm-installations-map-section.is-compact .gm-installations-map {
		min-height: 260px;
	}
}

/* Leaflet panes use z-index 400+; keep site header above the map on the installations page. */
.page-worldwide-installations .gm-site-header {
	z-index: 500;
}
