/* MaHe LIVE Lagekarte – Leseransicht */
.mahe-lk {
	--mahe-lk-akzent: #2e9b4f;
	--mahe-lk-schrift: "Merriweather", Georgia, "Times New Roman", serif;
	font-family: var(--mahe-lk-schrift);
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 1.5em 0;
}
.mahe-lk *, .mahe-lk *::before, .mahe-lk *::after { box-sizing: border-box; }

.mahe-lk-karte {
	position: relative;
	container-type: inline-size;
	width: 100%;
	max-width: 100%;
	height: var(--mahe-lk-hoehe, 420px);
	border-radius: 6px;
	overflow: hidden;
	background: #e9ebe4;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .12);
}
.mahe-lk.alignfull .mahe-lk-karte { border-radius: 0; }
@media (prefers-color-scheme: dark) { .mahe-lk-karte { background: #22262a; } }

/* Smartphone: Karte bleibt in der Spalte und nimmt höchstens rund zwei Drittel des Bildschirms ein. */
@media (max-width: 600px) {
	.mahe-lk-karte {
		height: min(var(--mahe-lk-hoehe, 420px), 62vh);
		min-height: 260px;
		border-radius: 4px;
	}
	.mahe-lk-legende-quelle { margin-left: 0; width: 100%; }
}

.mahe-lk-karte .maplibregl-canvas:focus-visible,
.mahe-lk a:focus-visible,
.mahe-lk summary:focus-visible,
.mahe-lk .maplibregl-ctrl button:focus-visible {
	outline: 3px solid var(--mahe-lk-akzent);
	outline-offset: 2px;
}
.mahe-lk .maplibregl-ctrl-group button { width: 34px; height: 34px; }
.mahe-lk-noscript { padding: 1em; margin: 0; }

.mahe-lk-legende {
	display: flex;
	flex-wrap: wrap;
	gap: .35em 1.1em;
	align-items: center;
	margin-top: .55em;
	padding-top: .45em;
	border-top: 3px solid var(--mahe-lk-akzent);
	font-size: .875em;
	line-height: 1.4;
}
.mahe-lk-legende-eintrag { display: inline-flex; align-items: center; gap: .35em; font-weight: 600; }
.mahe-lk-legende-hinweis, .mahe-lk-legende-quelle { opacity: .75; }
.mahe-lk-legende-quelle { margin-left: auto; }

.mahe-lk-liste { margin-top: .5em; font-size: .9375em; }
.mahe-lk-liste summary { cursor: pointer; color: var(--mahe-lk-akzent); font-weight: 600; }
.mahe-lk-liste ul { margin: .5em 0 0 1.2em; padding: 0; }
.mahe-lk-liste li { margin-bottom: .5em; }
.mahe-lk-liste a { color: var(--mahe-lk-akzent); }

.mahe-lk-fehlt, .mahe-lk-leer { font-style: italic; }

.mahe-lk-kartenfehler {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.2em;
	text-align: center;
	font-size: .9375em;
	line-height: 1.45;
	color: #1d1f21;
	background: #f1f2ec;
}

/* ---------- Infokarte ---------- */
.mahe-lk-info {
	position: absolute;
	z-index: 3;
	left: 10px;
	right: 10px;
	bottom: 10px;
	max-height: min(48%, 260px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 14px 16px 16px;
	border-radius: 10px;
	background: #ffffff;
	color: #1d1f21;
	box-shadow: 0 8px 28px rgba(0, 0, 0, .22), 0 1px 3px rgba(0, 0, 0, .12);
	font-family: var(--mahe-lk-schrift);
	font-size: 15px;
	line-height: 1.55;
	text-align: left;
	animation: mahe-lk-info-ein .22s ease-out;
}
.mahe-lk-info[hidden] { display: none; }
.mahe-lk-info:focus { outline: none; }
.mahe-lk-info:focus-visible { outline: 3px solid var(--mahe-lk-akzent); outline-offset: 2px; }

@container (min-width: 620px) {
	.mahe-lk-info {
		top: 12px;
		right: auto;
		bottom: auto;
		left: 12px;
		width: 300px;
		max-height: calc(100% - 24px);
	}
}
@keyframes mahe-lk-info-ein {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) { .mahe-lk-info { animation: none; } }

/* Quellenangabe offen unter der Karte */
.mahe-lk-quelle {
	margin: .4em 0 0;
	font-size: 12px;
	line-height: 1.4;
	text-align: right;
	opacity: .7;
}
.mahe-lk-quelle a { color: inherit; text-decoration: underline; text-underline-offset: 2px; }

/* Nur für Screenreader sichtbar */
.mahe-lk-nur-vorlesen {
	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;
}

.mahe-lk-info-zu {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font: 400 26px/36px Georgia, serif;
	cursor: pointer;
	opacity: .7;
}
.mahe-lk-info-zu:hover { opacity: 1; background: rgba(0, 0, 0, .06); }
.mahe-lk-info-zu:focus-visible { outline: 3px solid var(--mahe-lk-akzent); opacity: 1; }

.mahe-lk-info-kat {
	display: flex;
	align-items: center;
	gap: .45em;
	margin: 0 40px .35em 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .01em;
	opacity: .85;
}
.mahe-lk-info-kat::before {
	content: "";
	flex: none;
	width: .8em;
	height: .8em;
	border-radius: 50%;
	background: var(--mahe-lk-typ, #6c757d);
	box-shadow: 0 0 0 2px #fff, 0 0 0 3px var(--mahe-lk-typ, #6c757d);
}
.mahe-lk-info-titel {
	margin: 0 40px .4em 0;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.3;
	color: inherit;
}
.mahe-lk-info-text { margin: 0 0 .5em; }
.mahe-lk-info-text + .mahe-lk-info-text { padding-top: .5em; border-top: 1px solid rgba(0, 0, 0, .09); }
.mahe-lk-info-klein { margin: .2em 0 0; font-size: 13px; font-style: italic; opacity: .75; }
.mahe-lk-info-link {
	display: inline-block;
	margin-top: .55em;
	font-weight: 700;
	color: var(--mahe-lk-akzent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.ist-dunkel .mahe-lk-info { background: #262a2f; color: #eef0f2; box-shadow: 0 8px 28px rgba(0, 0, 0, .5); }
.ist-dunkel .mahe-lk-info-zu:hover { background: rgba(255, 255, 255, .08); }
.ist-dunkel .mahe-lk-info-kat::before { box-shadow: 0 0 0 2px #262a2f, 0 0 0 3px var(--mahe-lk-typ, #6c757d); }
.ist-dunkel .mahe-lk-info-text + .mahe-lk-info-text { border-top-color: rgba(255, 255, 255, .12); }
.ist-dunkel .mahe-lk-kartenfehler { background: #262a2f; color: #eef0f2; }
