/* Munti map. Colors from theme vars, with fallbacks for other themes. */
.munti-map {
	--mm-ink: var(--munti-ink, #22223B);
	--mm-linen: var(--munti-linen, #F2E9E4);
	--mm-sand: var(--munti-sand, #E8DCD6);
	position: relative;
	display: flex;
	flex-direction: column;
	min-block-size: 280px;
	block-size: 100%;
	background: var(--mm-sand);
	isolation: isolate;
	overflow: hidden;
	border-radius: var(--munti-radius, 2px);
}
.munti-map__canvas {
	position: relative;
	flex: 1;
	min-block-size: 0;
	background: var(--mm-sand);
	font: inherit;
	opacity: 0;
	transition: opacity 0.8s var(--munti-ease, ease);
}
.munti-map.is-ready .munti-map__canvas,
.munti-map:not([data-lat]) .munti-map__canvas { opacity: 1; }
.no-js .munti-map__canvas,
.munti-map__canvas:not(.leaflet-container) { opacity: 1; display: grid; place-items: center; }

/* Brand tint on tiles: warm grey, low contrast, so the map stays in the background. */
.munti-map .leaflet-tile-pane {
	filter: grayscale(1) sepia(0.22) contrast(0.88) brightness(1.04);
}
.munti-map .leaflet-container { background: var(--mm-sand); font-family: inherit; }

.munti-map__fallback {
	color: var(--mm-ink);
	font-size: var(--fs-sm, 0.875rem);
	text-underline-offset: 0.3em;
}

/* Marker: ink dot with a soft pulse + label */
.munti-map__pin { background: none; border: 0; }
.munti-map__dot {
	position: absolute;
	inset: 0;
	border-radius: 50%;
	background: var(--mm-ink);
	box-shadow: 0 0 0 3px var(--mm-linen), 0 2px 10px rgb(34 34 59 / 0.35);
}
.munti-map__dot::after {
	content: "";
	position: absolute;
	inset: calc(-1 * var(--space-4, 0.25rem));
	border-radius: 50%;
	border: 1px solid var(--mm-ink);
	animation: munti-map-pulse 2.4s var(--munti-ease, ease-out) infinite;
}
@keyframes munti-map-pulse {
	from { transform: scale(1); opacity: 0.7; }
	to { transform: scale(3.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.munti-map__dot::after { animation: none; opacity: 0; }
}
.munti-map__tag {
	position: absolute;
	inset-block-end: calc(100% + var(--space-12, 0.75rem));
	inset-inline-start: 50%;
	translate: 50% 0;
	white-space: nowrap;
	padding: 0.35em 0.8em;
	background: var(--mm-ink);
	color: var(--mm-linen);
	font-size: var(--fs-xs, 0.78rem);
	line-height: 1.6;
	direction: rtl;
}
[dir="ltr"] .munti-map__tag { translate: -50% 0; }
.munti-map__tag::after {
	content: "";
	position: absolute;
	inset-block-start: 100%;
	inset-inline-start: 50%;
	translate: 50% 0;
	border: 5px solid transparent;
	border-block-start-color: var(--mm-ink);
}
[dir="ltr"] .munti-map__tag::after { translate: -50% 0; }

/* Zoom control: sharp brand squares instead of Leaflet's round buttons */
.munti-map .leaflet-bar { border: 0; border-radius: 0; box-shadow: none; }
.munti-map .leaflet-bar a {
	inline-size: 36px;
	block-size: 36px;
	line-height: 34px;
	border-radius: 0 !important;
	border: 0;
	background: rgb(var(--munti-linen-rgb, 242 233 228) / 0.92);
	color: var(--mm-ink);
	font: 300 20px/34px inherit;
	backdrop-filter: blur(6px);
}
.munti-map .leaflet-bar a + a { border-block-start: 1px solid rgb(34 34 59 / 0.12); }
.munti-map .leaflet-bar a:hover { background: var(--mm-ink); color: var(--mm-linen); }
.munti-map .leaflet-top.leaflet-left { inset-inline-start: auto; }
.munti-map .leaflet-control-zoom { margin: var(--space-12, 0.75rem); }

.munti-map .leaflet-control-attribution {
	background: rgb(var(--munti-linen-rgb, 242 233 228) / 0.8);
	color: rgb(34 34 59 / 0.7);
	font-size: 10px;
	padding: 0 var(--space-8, 0.5rem);
	direction: ltr;
}
.munti-map .leaflet-control-attribution a { color: inherit; }

/* Routing bar, pinned to the map bottom */
.munti-map__routes {
	position: absolute;
	z-index: 500;
	inset-block-end: var(--space-12, 0.75rem);
	inset-inline-start: var(--space-12, 0.75rem);
	display: flex;
	align-items: stretch;
	margin: 0;
	background: rgb(var(--munti-linen-rgb, 242 233 228) / 0.92);
	backdrop-filter: blur(8px);
	font-size: var(--fs-sm, 0.875rem);
	line-height: 1;
}
.munti-map__routes > * { padding: 0.8em 1em; }
.munti-map__routes-label { color: var(--munti-slate, #4A4E69); }
.munti-map__routes a {
	color: var(--mm-ink);
	text-decoration: none;
	border-inline-start: 1px solid rgb(34 34 59 / 0.12);
	transition: background 0.2s, color 0.2s;
}
.munti-map__routes a:hover,
.munti-map__routes a:focus-visible { background: var(--mm-ink); color: var(--mm-linen); }

@media (max-width: 767px) {
	.munti-map__routes { inset-inline: var(--space-8, 0.5rem); inset-block-end: var(--space-8, 0.5rem); }
	.munti-map__routes > * { flex: 1; text-align: center; padding: 0.85em 0.5em; }
	.munti-map__routes-label { flex: 1.4; }
}
