/* HH Ladesäulen-Karte */
.hhlk {
	--hhlk-free: #16a34a;
	--hhlk-occupied: #f59e0b;
	--hhlk-out: #dc2626;
	--hhlk-unknown: #9ca3af;
	--hhlk-nolive: #64748b;
	--hhlk-border: rgba(0, 0, 0, .12);
	margin: 1.5em 0;
	font-size: 15px;
	line-height: 1.45;
}
.hhlk-title { margin: 0 0 .5em; }

.hhlk-bar {
	display: flex;
	flex-wrap: wrap;
	gap: .5em 1em;
	align-items: center;
	justify-content: space-between;
	margin-bottom: .5em;
}
.hhlk-summary strong { color: var(--hhlk-free); font-size: 1.1em; }
.hhlk-onlyfree { cursor: pointer; white-space: nowrap; }
.hhlk-onlyfree input { margin-right: .3em; }

.hhlk-map {
	width: 100%;
	border: 1px solid var(--hhlk-border);
	border-radius: 8px;
	z-index: 0; /* hält Leaflet unter Sticky-Headern */
}

/* Marker */
.hhlk-pin-wrap { background: none; border: 0; }
.hhlk-pin {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 38px;
	height: 26px;
	padding: 0 6px;
	box-sizing: border-box;
	border-radius: 13px;
	border: 2px solid #fff;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .35);
	color: #fff;
	font: 700 12px/1 system-ui, sans-serif;
}
.hhlk-pin.hhlk-free { background: var(--hhlk-free); }
.hhlk-pin.hhlk-occupied { background: var(--hhlk-occupied); }
.hhlk-pin.hhlk-out { background: var(--hhlk-out); }
.hhlk-pin.hhlk-unknown { background: var(--hhlk-unknown); }
/* Andere Betreiber ohne Live-Status: heller Marker mit Rand, klar unterscheidbar
   von "unbekannt" (grau gefüllt). Zahl = Anzahl Ladepunkte. */
.hhlk-pin.hhlk-nolive {
	min-width: 30px;
	height: 22px;
	border-radius: 11px;
	background: #fff;
	color: var(--hhlk-nolive);
	border: 2px solid var(--hhlk-nolive);
	font-size: 11px;
}

/* Punkte */
.hhlk-dot {
	display: inline-block;
	flex: none;
	width: 10px;
	height: 10px;
	border-radius: 50%;
	margin-right: .45em;
	vertical-align: middle;
}
.hhlk-dot.hhlk-free { background: var(--hhlk-free); }
.hhlk-dot.hhlk-occupied { background: var(--hhlk-occupied); }
.hhlk-dot.hhlk-out { background: var(--hhlk-out); }
.hhlk-dot.hhlk-unknown { background: var(--hhlk-unknown); }
.hhlk-dot.hhlk-nolive { background: #fff; border: 2px solid var(--hhlk-nolive); box-sizing: border-box; }

/* Legende */
.hhlk-legend {
	display: flex;
	flex-wrap: wrap;
	gap: .3em 1.2em;
	list-style: none;
	margin: .5em 0 0;
	padding: 0;
	font-size: .85em;
	opacity: .85;
}
.hhlk-legend li { margin: 0; }

/* Popup */
.hhlk-popup { font-size: 13px; min-width: 210px; }
.hhlk-popup-addr { font-weight: 700; font-size: 14px; margin-bottom: 2px; }
.hhlk-popup-op { opacity: .8; }
.hhlk-popup-sum { margin: 6px 0 4px; font-weight: 600; }
.hhlk-points { list-style: none; margin: 0 0 8px; padding: 0; }
.hhlk-points li { display: flex; align-items: flex-start; margin: 4px 0; }
.hhlk-points .hhlk-dot { margin-top: 4px; }
.hhlk-points small { opacity: .75; }
.hhlk-route { font-weight: 600; }
.hhlk-popup-note { font-size: 12px; opacity: .8; margin-bottom: 4px; }
.hhlk-popup-loc { font-size: 12px; opacity: .8; font-style: italic; margin-bottom: 4px; }
.hhlk-popup-src { font-size: 11px; opacity: .65; margin: -4px 0 6px; }

/* Liste */
.hhlk-list { margin-top: 1em; }
.hhlk-stations { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hhlk-border); }
.hhlk-station { margin: 0; padding: .5em 0; border-bottom: 1px solid var(--hhlk-border); }
.hhlk-station-head {
	all: unset;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	width: 100%;
	cursor: pointer;
	gap: .2em;
}
.hhlk-station-head:focus-visible { outline: 2px solid #2563eb; outline-offset: 2px; border-radius: 4px; }
.hhlk-station-addr { flex: 1; font-weight: 600; }
.hhlk-station-free { white-space: nowrap; font-variant-numeric: tabular-nums; }
.hhlk-station-meta { font-size: .85em; opacity: .75; padding-left: calc(10px + .65em); }
.hhlk-empty { opacity: .8; }

.hhlk-source { font-size: .78em; opacity: .7; margin-top: .8em; }
.hhlk-error { color: var(--hhlk-out, #dc2626); }

/* Popup-Grundgestaltung absichern – manche Themes überschreiben
   Hintergründe von Leaflet-Elementen (z. B. per *-wrapper-Selektoren). */
.hhlk .leaflet-popup.hhlk-leaflet-popup .leaflet-popup-content-wrapper,
.hhlk .leaflet-popup.hhlk-leaflet-popup .leaflet-popup-tip {
	background: #fff !important;
	color: #1f2937 !important;
	box-shadow: 0 3px 14px rgba(0, 0, 0, .3) !important;
}
.hhlk .leaflet-popup.hhlk-leaflet-popup .leaflet-popup-content-wrapper {
	border-radius: 10px !important;
	padding: 1px !important;
}
.hhlk .leaflet-popup.hhlk-leaflet-popup .leaflet-popup-content {
	margin: 12px 16px 12px 14px;
}
.hhlk .leaflet-popup.hhlk-leaflet-popup a.leaflet-popup-close-button {
	color: #6b7280 !important;
	background: transparent !important;
}

/* Themes mit globalem "* { max-width: 100% }" (z. B. FlatNews) lassen das
   Leaflet-Popup auf 0 px Breite zusammenfallen – der Inhalt ragt dann ohne
   Hintergrund heraus. Innerhalb der Karte die Breitenbegrenzung aufheben. */
.hhlk .leaflet-container,
.hhlk .leaflet-container * {
	max-width: none;
}
