/*
 * DE Locations Map – Design über CSS-Variablen anpassbar.
 * Überschreiben per Shortcode-Attribut (z. B. land="#2d6a4f") oder im Theme-CSS:
 *   .delm-map { --delm-land: #2d6a4f; --delm-marker: #e63946; }
 */
.delm-map {
	--delm-bg: #263640;
	--delm-land: #00d084;
	--delm-land-2: #008f5d;
	--delm-land-hover: #19e09a;
	--delm-stroke: rgba(255, 255, 255, .35);
	--delm-stroke-width: 0.6;
	--delm-marker: #ff7a59;
	--delm-marker-hover: #ff9a80;
	--delm-marker-stroke: #ffffff;
	--delm-cluster: #ff7a59;
	--delm-cluster-text: #ffffff;
	--delm-btn-bg: #00d084;
	--delm-btn-color: #ffffff;
	--delm-radius: 6px;

	position: relative;
	width: 100%;
	aspect-ratio: 0.74;
	max-height: 90vh;
	overflow: hidden;
	background: var(--delm-bg);
	border-radius: var(--delm-radius);
	user-select: none;
	-webkit-user-select: none;
	touch-action: pan-y;
}
.delm-map.delm-zoomed { touch-action: none; }
.delm-map.delm-dragging { cursor: grabbing; }

.delm-svg {
	display: block;
	width: 100%;
	height: 100%;
}

/* Fläche */
.delm-stop-a { stop-color: var(--delm-land); }
.delm-stop-b { stop-color: var(--delm-land-2); }
.delm-state {
	stroke: var(--delm-stroke);
	stroke-width: var(--delm-stroke-width);
	stroke-linejoin: round;
	vector-effect: non-scaling-stroke;
	transition: fill .15s ease;
}
.delm-map.delm-zoomed .delm-state { cursor: grab; }
.delm-state:hover { fill: var(--delm-land-hover); }

/* Marker (Größe in Pixel, unabhängig vom Zoom) */
.delm-marker { cursor: pointer; outline: none; }
.delm-marker circle {
	fill: var(--delm-marker);
	stroke: var(--delm-marker-stroke);
	stroke-width: 2;
	transition: fill .15s ease;
}
.delm-marker:hover circle,
.delm-marker:focus-visible circle { fill: var(--delm-marker-hover); }
.delm-marker:focus-visible circle { stroke-width: 3; }
.delm-cl circle { fill: var(--delm-cluster); stroke-width: 3; }
.delm-cl:hover circle,
.delm-cl:focus-visible circle { fill: var(--delm-marker-hover); }
.delm-cl text {
	fill: var(--delm-cluster-text);
	font: 700 13px/1 system-ui, -apple-system, "Segoe UI", sans-serif;
	pointer-events: none;
}

/* Steuerung */
.delm-controls {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: flex;
	flex-direction: column;
	gap: 4px;
	z-index: 3;
}
.delm-btn {
	width: 32px;
	height: 32px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--delm-btn-bg);
	color: var(--delm-btn-color);
	border: 0;
	border-radius: 4px;
	font: 400 20px/1 system-ui, sans-serif;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .3);
}
.delm-btn:hover { filter: brightness(1.1); }
.delm-btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Tooltip */
.delm-tooltip {
	position: absolute;
	z-index: 4;
	padding: 6px 10px;
	background: #fff;
	color: #1d2327;
	border-radius: 4px;
	font: 400 13px/1.35 system-ui, -apple-system, "Segoe UI", sans-serif;
	box-shadow: 0 2px 8px rgba(0, 0, 0, .3);
	pointer-events: none;
	white-space: nowrap;
}

/* Popup */
.delm-popup-wrap {
	position: absolute;
	z-index: 5;
	display: none;
	width: 280px;
	max-width: calc(100% - 12px);
	max-height: calc(100% - 12px);
	overflow: auto;
	background: #fff;
	color: #1d2327;
	border-radius: 6px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
	font: 400 14px/1.45 system-ui, -apple-system, "Segoe UI", sans-serif;
	user-select: text;
	-webkit-user-select: text;
}
.delm-close {
	position: absolute;
	top: 4px;
	right: 6px;
	width: 26px;
	height: 26px;
	padding: 0;
	border: 0;
	background: rgba(255, 255, 255, .85);
	color: #1d2327;
	border-radius: 50%;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
}
.delm-popup { padding: 14px; }
.delm-popup img { display: block; width: calc(100% + 28px); max-width: none; height: auto; margin: -14px -14px 10px; border-radius: 6px 6px 0 0; }
.delm-popup h3 { margin: 0 24px 6px 0; font-size: 16px; line-height: 1.3; color: inherit; }
.delm-popup p { margin: 0 0 8px; }
.delm-popup .delm-text > :last-child { margin-bottom: 0; }
.delm-popup a.delm-more {
	display: inline-block;
	margin-top: 8px;
	padding: 6px 12px;
	background: var(--delm-btn-bg);
	color: var(--delm-btn-color) !important;
	text-decoration: none;
	border-radius: 3px;
	font-size: 13px;
}
.delm-list { margin: 0; padding: 0; list-style: none; }
.delm-list li { padding: 5px 0; border-top: 1px solid #e5e7e9; }
.delm-list li:first-child { border-top: 0; }
.delm-list span { color: #6b7780; font-size: 12px; }

/* Kein-JS-Fallback */
.delm-fallback { margin: 8px 0 0; }

/* Backend-Picker */
.delm-picker { max-width: 520px; max-height: none; aspect-ratio: 0.74; }
