/**
 * Standort-Karte: Marker, Legende, Routenplaner
 */

.rm-location-map {
	--rm-map-parking: #0057a8;
	--rm-map-parking-dark: #003d75;
	--rm-map-free: #1b7a3d;
	max-width: 980px;
	margin: 0 auto 1.5rem;
}

.rm-location-map__canvas {
	height: 420px;
	width: 100%;
	border: 1px solid var(--rm-gray-200, #e5e4e2);
	border-radius: var(--rm-radius, 16px);
	box-shadow: var(--rm-shadow, 0 4px 24px rgba(0, 0, 0, 0.06));
	z-index: 0;
	overflow: hidden;
	/* Verhindert grauen Blitz beim Zoomen (Leaflet-Default #ddd / Parent durchscheinend) */
	background: #f2efe9;
	isolation: isolate;
}

.rm-location-map__canvas .leaflet-container {
	height: 100%;
	width: 100%;
	border-radius: var(--rm-radius, 16px);
	background: #f2efe9 !important;
}

.rm-location-map__meta {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	margin-top: 0.85rem;
}

.rm-location-map__steps {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.15rem;
	margin: 0;
	padding: 0.55rem 0.7rem;
	list-style: none;
	background: #fff;
	border: 1px solid var(--rm-gray-100, #f0efed);
	border-radius: var(--rm-radius-sm, 12px);
}

.rm-location-map__steps > li:not(.rm-location-map__step-sep) {
	display: inline-flex;
	align-items: center;
	gap: 0.35rem;
	flex: 0 1 auto;
	min-width: 0;
	padding: 0.15rem 0.35rem;
	font-size: 0.88rem;
	font-weight: 550;
	color: var(--rm-gray-900, #1a1a1a);
	line-height: 1.25;
}

.rm-location-map__step-sep {
	flex: 0 0 auto;
	width: 0.85rem;
	height: 1px;
	margin: 0 0.15rem;
	background: var(--rm-gray-200, #e5e4e2);
	align-self: center;
	list-style: none;
}

.rm-location-map__step-num {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	border-radius: 50%;
	background: var(--rm-primary, #30653c);
	color: #fff;
	font-size: 0.7rem;
	font-weight: 700;
	display: grid;
	place-items: center;
}

.rm-location-map__note {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.35rem 0.45rem;
	margin: 0;
	padding: 0.45rem 0.7rem;
	font-size: 0.88rem;
	line-height: 1.35;
	color: var(--rm-gray-700, #444);
	background: var(--rm-gray-50, #f8f8f6);
	border: 1px solid var(--rm-gray-100, #f0efed);
	border-radius: 10px;
}

.rm-location-map__note-sep {
	color: var(--rm-gray-200, #ccc);
}

.rm-location-map__hydrant {
	color: #7c2d12;
	font-weight: 650;
}

.rm-location-map__free-badge {
	display: inline-block;
	margin: 0;
	padding: 0.1rem 0.4rem;
	border-radius: 999px;
	background: var(--rm-map-free);
	color: #fff;
	font-size: 0.68rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	vertical-align: middle;
	line-height: 1.3;
}

.rm-location-map__routes {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem 1.1rem;
	margin-top: 1.25rem;
	padding: 0.85rem 1rem;
	background: var(--rm-gray-50, #f8f8f6);
	border: 1px solid var(--rm-gray-200, #e5e4e2);
	border-radius: var(--rm-radius-sm, 12px);
}

.rm-location-map__routes-main {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.55rem;
	flex: 1 1 16rem;
	min-width: 0;
}

.rm-location-map__routes-title {
	margin: 0;
	font-size: 1.05rem;
	font-weight: 650;
	color: var(--rm-gray-900, #1a1a1a);
	display: flex;
	align-items: center;
	gap: 0.45rem;
}

.rm-location-map__routes-title svg {
	flex-shrink: 0;
	color: var(--rm-secondary, #024287);
}

.rm-location-map__dest {
	display: flex;
	flex-wrap: wrap;
	gap: 0.45rem;
	margin: 0;
}

.rm-location-map__dest-btn {
	appearance: none;
	border: 1px solid var(--rm-gray-200, #e5e4e2);
	background: #fff;
	color: var(--rm-gray-700, #444443);
	border-radius: 999px;
	padding: 0.4rem 0.9rem;
	font: inherit;
	font-size: 0.9rem;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.rm-location-map__dest-btn:hover,
.rm-location-map__dest-btn:focus-visible {
	border-color: color-mix(in srgb, var(--rm-primary, #30653c) 45%, #e5e4e2);
	outline: 2px solid color-mix(in srgb, var(--rm-primary, #30653c) 35%, transparent);
	outline-offset: 2px;
}

.rm-location-map__dest-btn.is-active {
	background: var(--rm-primary, #30653c);
	border-color: var(--rm-primary, #30653c);
	color: #fff;
}

.rm-location-map__dest-btn--parking.is-active {
	background: var(--rm-map-parking);
	border-color: var(--rm-map-parking);
}

.rm-location-map__providers {
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.rm-location-map__qr {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.3rem;
	flex: 0 0 auto;
	align-self: flex-start;
	margin: 0;
	padding: 0.35rem 0.45rem 0.45rem;
	background: #fff;
	border: 1px solid var(--rm-gray-200, #e5e4e2);
	border-radius: var(--rm-radius-sm, 12px);
	text-decoration: none;
	color: var(--rm-gray-900, #1a1a1a);
	font-size: 0.72rem;
	font-weight: 650;
	line-height: 1.15;
	text-align: center;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.rm-location-map__qr:hover,
.rm-location-map__qr:focus-visible {
	border-color: color-mix(in srgb, var(--rm-secondary, #024287) 40%, #e5e4e2);
	box-shadow: 0 4px 14px rgba(2, 66, 135, 0.12);
	color: var(--rm-secondary, #024287);
	text-decoration: none;
}

.rm-location-map__qr img {
	display: block;
	width: 96px;
	height: 96px;
	border-radius: 6px;
}

.rm-location-map__provider {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	padding: 0.55rem 0.95rem;
	border-radius: var(--rm-radius-sm, 12px);
	background: #fff;
	border: 1px solid var(--rm-gray-200, #e5e4e2);
	color: var(--rm-gray-900, #1a1a1a);
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 550;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.rm-location-map__provider:hover,
.rm-location-map__provider:focus-visible {
	border-color: color-mix(in srgb, var(--rm-secondary, #024287) 40%, #e5e4e2);
	box-shadow: 0 4px 14px rgba(2, 66, 135, 0.12);
	text-decoration: none;
	color: var(--rm-secondary, #024287);
}

.rm-location-map__provider svg {
	width: 1.15rem;
	height: 1.15rem;
	flex-shrink: 0;
}

/* Custom map markers */
.rm-map-marker {
	background: transparent;
	border: 0;
}

.rm-map-marker__stack {
	position: relative;
	display: inline-block;
}

.rm-map-marker__label {
	position: absolute;
	left: calc(100% + 4px);
	top: 50%;
	transform: translateY(-70%);
	white-space: nowrap;
	padding: 0.12rem 0.4rem;
	border-radius: 4px;
	font-size: 0.68rem;
	font-weight: 750;
	letter-spacing: 0.01em;
	line-height: 1.2;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.18);
	pointer-events: none;
}

.rm-map-marker__label--office {
	background: #fff;
	color: var(--rm-primary, #30653c);
	border: 1px solid color-mix(in srgb, var(--rm-primary, #30653c) 35%, #e5e4e2);
}

.rm-map-marker__label--parking {
	top: 30%;
	background: #fff;
	color: var(--rm-map-parking-dark);
	border: 1px solid color-mix(in srgb, var(--rm-map-parking) 35%, #e5e4e2);
}

.rm-map-walk-label {
	background: transparent;
	border: 0;
}

.rm-map-walk-label span {
	display: inline-block;
	padding: 0.15rem 0.4rem;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.92);
	border: 1px solid color-mix(in srgb, var(--rm-secondary, #024287) 30%, #e5e4e2);
	color: var(--rm-secondary, #024287);
	font-size: 0.68rem;
	font-weight: 700;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}

.rm-map-marker__pin {
	position: relative;
	width: 36px;
	height: 36px;
	border-radius: 50% 50% 50% 0;
	transform: rotate(-45deg);
	display: grid;
	place-items: center;
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.28);
}

.rm-map-marker__pin--office {
	background: var(--rm-primary, #30653c);
}

.rm-map-marker__pin svg {
	transform: rotate(45deg);
	display: block;
}

.rm-map-marker__parking-face svg {
	display: block;
}

.rm-map-marker__parking {
	position: relative;
	width: 44px;
	height: 52px;
	filter: drop-shadow(0 3px 8px rgba(0, 61, 117, 0.35));
}

.rm-map-marker__parking-face {
	width: 40px;
	height: 40px;
	border-radius: 0.45rem;
	background: var(--rm-map-parking);
	border: 2px solid #fff;
	display: grid;
	place-items: center;
	color: #fff;
}

.rm-map-marker__parking-tag {
	position: absolute;
	left: 50%;
	bottom: 0;
	transform: translateX(-50%);
	white-space: nowrap;
	padding: 0.1rem 0.4rem;
	border-radius: 999px;
	background: var(--rm-map-free);
	color: #fff;
	font-size: 0.62rem;
	font-weight: 800;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	border: 1px solid #fff;
	line-height: 1.2;
}

.rm-location-map .rm-leaflet-popup--side .leaflet-popup-tip-container {
	left: 0;
	margin-left: -10px;
	width: 20px;
	height: 20px;
}

.rm-location-map .rm-leaflet-popup--side .leaflet-popup-tip {
	margin: 0;
	width: 12px;
	height: 12px;
}

.rm-location-map .rm-leaflet-popup .leaflet-popup-content-wrapper {
	padding: 0;
	border-radius: 8px;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.14);
}

.rm-location-map .rm-leaflet-popup .leaflet-popup-content {
	margin: 0.45rem 0.55rem 0.5rem;
	line-height: 1.25;
	font-size: 0.78rem;
}

.rm-location-map .rm-leaflet-popup .leaflet-popup-close-button {
	top: 2px;
	right: 4px;
	width: 18px;
	height: 18px;
	font-size: 16px;
	line-height: 16px;
}

.rm-map-popup {
	min-width: 0;
	max-width: 180px;
	font-size: 0.78rem;
	line-height: 1.25;
}

.rm-map-popup strong {
	display: block;
	margin-bottom: 0.1rem;
	font-size: 0.82rem;
	color: var(--rm-gray-900, #1a1a1a);
}

.rm-map-popup p {
	margin: 0.12rem 0 0;
}

.rm-map-popup__address {
	color: var(--rm-gray-700, #444);
}

.rm-map-popup__meta {
	font-weight: 600;
	font-size: 0.74rem;
}

.rm-map-popup__meta a {
	color: var(--rm-secondary, #024287);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.rm-map-popup__warning-inline {
	color: #7c2d12;
	font-weight: 700;
}

.rm-map-popup--parking strong {
	color: var(--rm-map-parking-dark);
}

.leaflet-container a {
	color: var(--rm-secondary, #024287);
}

/* Theme-Regeln (.section-split img, a11y) dürfen Leaflet-Tiles nicht zerstören */
.rm-location-map .leaflet-container img.leaflet-tile,
.rm-location-map .leaflet-tile-pane img,
.section-split .rm-location-map .leaflet-container img.leaflet-tile,
.wp-site-blocks .section-split .rm-location-map .leaflet-container img.leaflet-tile {
	display: block !important;
	width: auto !important;
	height: auto !important;
	max-width: none !important;
	max-height: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	object-fit: unset !important;
	padding: 0 !important;
}

@media (max-width: 600px) {
	.rm-location-map__canvas {
		height: 340px;
	}

	.rm-location-map__step-sep {
		display: none;
	}

	.rm-location-map__steps > li:not(.rm-location-map__step-sep) {
		flex: 1 1 100%;
		padding: 0.25rem 0.15rem;
	}

	.rm-location-map__routes {
		flex-direction: row;
	}

	.rm-location-map__qr img {
		width: 80px;
		height: 80px;
	}
}
