.epl-map-wrap {
	--epl-blue: #003b71;
	--epl-yellow: #ffed00;
	--epl-green: #5b8f22;
	--epl-radius: 12px;
	--epl-border-width: 0px;
	--epl-border-color: #d8dadd;
	--epl-map-height: 420px;
	--epl-map-height-mobile: 360px;
	width: min(100%, 1320px);
	margin: 0 auto;
	box-sizing: border-box;
	font-family: inherit;
	color: #34383d;
}

.epl-map-wrap *,
.epl-map-wrap *::before,
.epl-map-wrap *::after {
	box-sizing: border-box;
}

.epl-sr-only {
	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;
}

/* Neuer Regional-Hero */
.epl-regional-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.1fr) minmax(360px, .9fr);
	min-height: 290px;
	margin: 0 0 22px;
	overflow: hidden;
	border: 1px solid #e8eaec;
	border-radius: 22px;
	background: linear-gradient(100deg, #fff 0%, #fff 54%, #f6f4ed 100%);
}

.epl-regional-hero-copy {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: clamp(32px, 5vw, 66px);
	padding-right: clamp(28px, 4vw, 54px);
	position: relative;
	z-index: 1;
}

.epl-kicker {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px !important;
	color: var(--epl-blue) !important;
	font-size: 12px !important;
	font-weight: 800 !important;
	letter-spacing: .11em !important;
	line-height: 1.3 !important;
	text-transform: uppercase !important;
}

.epl-kicker > span {
	width: 42px;
	height: 3px;
	border-radius: 999px;
	background: var(--epl-yellow);
}

.epl-regional-hero h2,
.epl-departments-intro h2 {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--epl-department-anthracite) !important;
	font-family: inherit !important;
	font-style: normal !important;
	font-weight: 850 !important;
	letter-spacing: -.035em !important;
	text-transform: none !important;
	text-decoration: none !important;
}

.epl-regional-hero h2 {
	max-width: 760px;
	font-size: clamp(34px, 4.1vw, 58px) !important;
	line-height: .98 !important;
}

.epl-regional-hero-text {
	max-width: 680px;
	margin: 18px 0 0 !important;
	color: #60666d !important;
	font-size: clamp(15px, 1.35vw, 18px) !important;
	line-height: 1.55 !important;
}

.epl-regional-hero-media,
.epl-department-image {
	position: relative;
	overflow: hidden;
	background: #eef0e8;
}

.epl-regional-hero-media::after {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 18%;
	background: linear-gradient(90deg, #fff, rgba(255,255,255,0));
	pointer-events: none;
}

.epl-regional-hero-media img,
.epl-department-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.epl-ai-badge {
	position: absolute;
	right: 12px;
	bottom: 12px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 31px;
	height: 31px;
	border: 2px solid rgba(255,255,255,.92);
	border-radius: 50%;
	background: rgba(0, 59, 113, .90);
	box-shadow: 0 2px 8px rgba(0,0,0,.16);
	color: #fff;
	font-family: Arial, sans-serif;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .04em;
	line-height: 1;
	z-index: 3;
}

/* Filterzeile – Style-Editor bleibt wirksam */
.epl-map-filters {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: var(--epl-filter-justify, flex-start);
	gap: 0;
	margin: 0;
	padding: 18px 8px;
	border: 0;
	background: transparent;
}

.epl-map-wrap .epl-map-filters .epl-filter-text {
	display: inline-block !important;
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: var(--epl-filter-padding-y, 0px) var(--epl-filter-padding-x, 0px) !important;
	border: var(--epl-filter-border-width, 0px) solid var(--epl-filter-border-color, var(--epl-blue)) !important;
	border-radius: var(--epl-filter-radius, 0px) !important;
	background: var(--epl-filter-bg, transparent) !important;
	box-shadow: none !important;
	text-shadow: none !important;
	color: var(--epl-filter-text-color, var(--epl-blue)) !important;
	font-family: inherit !important;
	font-size: var(--epl-filter-font-size, 13px) !important;
	font-weight: var(--epl-filter-font-weight, 600) !important;
	line-height: 1.35 !important;
	letter-spacing: var(--epl-filter-letter-spacing, .10em) !important;
	text-transform: var(--epl-filter-text-transform, uppercase) !important;
	text-decoration: none !important;
	white-space: nowrap !important;
	cursor: pointer !important;
	transform: none !important;
	filter: none !important;
	transition: color .14s ease, background-color .14s ease, border-color .14s ease !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}

.epl-map-wrap .epl-map-filters .epl-filter-text:hover,
.epl-map-wrap .epl-map-filters .epl-filter-text:focus-visible,
.epl-map-wrap .epl-map-filters .epl-filter-text.is-active {
	color: var(--epl-filter-state-text-color, var(--epl-yellow)) !important;
	background: var(--epl-filter-state-bg, transparent) !important;
	border-color: var(--epl-filter-state-border-color, var(--epl-blue)) !important;
	box-shadow: none !important;
	text-shadow: none !important;
}

.epl-map-wrap .epl-map-filters .epl-filter-text:focus-visible {
	outline: 2px solid currentColor !important;
	outline-offset: 3px !important;
}

.epl-filter-separator {
	display: inline-block;
	margin: 0 var(--epl-filter-gap, 10px);
	color: var(--epl-filter-text-color, var(--epl-blue));
	opacity: .48;
	font-size: var(--epl-filter-font-size, 13px);
	font-weight: 400;
	line-height: 1.35;
	user-select: none;
}

/* Karte + Infospalte */
.epl-map-layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(250px, 310px);
	overflow: hidden;
	border: 1px solid #e4e7e9;
	border-radius: max(12px, var(--epl-radius));
	background: #fff;
	isolation: isolate;
}

.epl-no-map-info .epl-map-layout {
	grid-template-columns: minmax(0, 1fr);
}

.epl-map-has-shadow .epl-map-layout {
	box-shadow: 0 16px 44px rgba(0, 35, 67, .10);
}

.epl-map-stage {
	min-width: 0;
	padding: 0;
	background: #e9e9e9;
}

.epl-map {
	width: 100%;
	height: var(--epl-map-height);
	min-height: 180px;
	box-sizing: border-box;
	border: var(--epl-border-width) solid var(--epl-border-color);
	border-radius: 0;
	overflow: hidden;
	background: #e9e9e9;
	position: relative;
	z-index: 0;
	isolation: isolate;
	contain: paint;
}

.epl-map-wrap .leaflet-container { z-index: 0 !important; }
.epl-map-filter-soft .leaflet-tile-pane { filter: saturate(.82) brightness(1.03) contrast(.94); }
.epl-map-filter-grayscale .leaflet-tile-pane { filter: grayscale(1) contrast(.94) brightness(1.04); }
.epl-map-filter-contrast .leaflet-tile-pane { filter: saturate(.88) contrast(1.17); }
.epl-map-filter-vivid .leaflet-tile-pane { filter: saturate(1.28) contrast(1.04); }
.epl-map .leaflet-control-zoom a { color: var(--epl-blue); }
.epl-map .leaflet-control-attribution { font-size: 10px; }

.epl-map-info {
	display: flex;
	flex-direction: column;
	padding: clamp(24px, 2.7vw, 38px) clamp(22px, 2.4vw, 32px);
	border-left: 1px solid #e5e8ea;
	background: linear-gradient(180deg, #fff 0%, #fbfcfd 100%);
}

.epl-map-info-copy h3 {
	margin: 0 !important;
	color: var(--epl-blue) !important;
	font-family: inherit !important;
	font-size: clamp(21px, 2vw, 27px) !important;
	font-weight: 800 !important;
	letter-spacing: -.02em !important;
	line-height: 1.1 !important;
}

.epl-yellow-rule {
	display: block;
	width: 46px;
	height: 4px;
	margin: 14px 0 16px;
	border-radius: 999px;
	background: var(--epl-yellow);
}

.epl-map-info-copy p {
	margin: 0 !important;
	color: #646b72 !important;
	font-size: 14px !important;
	line-height: 1.55 !important;
}

.epl-map-legend {
	display: grid;
	gap: 12px;
	margin: 22px 0;
	padding: 20px 0;
	border-top: 1px solid #dfe4e7;
	border-bottom: 1px solid #dfe4e7;
}

.epl-map-legend-item {
	display: flex;
	align-items: center;
	gap: 12px;
	color: #41474d;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
}

.epl-legend-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 38px;
	width: 38px;
	height: 38px;
	border-radius: 50%;
}

.epl-legend-icon svg { width: 23px; height: 23px; }
.epl-legend-supplier { background: var(--epl-blue); color: #fff; }
.epl-legend-market { background: var(--epl-yellow); color: var(--epl-blue); }

.epl-map-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	margin-top: auto;
}

.epl-map-stats > div {
	min-width: 0;
	padding: 0 8px;
	border-right: 1px solid #e0e4e6;
	text-align: center;
}
.epl-map-stats > div:first-child { padding-left: 0; }
.epl-map-stats > div:last-child { padding-right: 0; border-right: 0; }
.epl-map-stats strong {
	display: block;
	color: var(--epl-blue);
	font-size: 24px;
	font-weight: 850;
	line-height: 1;
}
.epl-map-stats span {
	display: block;
	margin-top: 6px;
	color: #6d747a;
	font-size: 9px;
	line-height: 1.2;
}

/* Leaflet Popups */
.epl-map .leaflet-popup-content-wrapper,
.epl-map .leaflet-popup-tip { background: #fff; color: #17202a; }
.epl-map .leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: 0 12px 28px rgba(0, 35, 67, .18); }
.epl-map .leaflet-popup-content { margin: 15px 17px; }
.epl-popup-name { display: block; margin: 0 0 6px; color: var(--epl-blue); font-size: 15px; font-weight: 800; line-height: 1.25; }
.epl-popup-line { font-size: 13px; line-height: 1.45; }
.epl-popup-line a { color: var(--epl-blue); text-decoration: underline; text-underline-offset: 2px; }
.epl-popup-note { margin-top: 8px; padding-top: 8px; border-top: 1px solid #e6e8ea; font-size: 12px; line-height: 1.45; color: #56606a; white-space: pre-line; }
.epl-popup-type { display: inline-block; margin: 0 0 5px; padding: 3px 7px; border-radius: 999px; background: var(--epl-yellow); color: var(--epl-blue); font-size: 9px; font-weight: 800; letter-spacing: .06em; line-height: 1.2; text-transform: uppercase; }
.epl-popup-type-market { background: var(--epl-green); color: #fff; }

/* Partner-/Abteilungskarten */
.epl-departments {
	margin-top: clamp(62px, 7vw, 96px);
	padding: clamp(38px, 5vw, 64px) clamp(14px, 2vw, 26px) clamp(42px, 5vw, 66px);
	border-radius: 22px;
	background:
		radial-gradient(circle at 93% 10%, rgba(0, 80, 164, .045), transparent 26%),
		linear-gradient(180deg, #f8fafb 0%, #f4f7f8 100%);
}

.epl-departments-intro {
	max-width: 820px;
	margin: 0 0 30px;
}

.epl-departments-intro h2 {
	font-size: clamp(34px, 4.4vw, 54px) !important;
	line-height: 1 !important;
}

.epl-departments-intro > p:last-child {
	max-width: 720px;
	margin: 12px 0 0 !important;
	color: #666d73 !important;
	font-size: 15px !important;
	line-height: 1.5 !important;
}

.epl-departments-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 18px;
	align-items: stretch;
}

.epl-department-card {
	min-width: 0;
	height: 100%;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	border: 1px solid #e2e6e9;
	border-radius: 14px;
	background: var(--epl-department-surface);
	box-shadow: 0 8px 22px rgba(0, 35, 67, .055);
	transition: box-shadow .18s ease, border-color .18s ease;
}

.epl-department-card.is-expanded {
	grid-column: 1 / -1;
	display: grid;
	grid-template-columns: minmax(230px, 300px) minmax(0, 1fr);
	height: auto;
}

.epl-department-card.is-expanded .epl-department-image {
	height: 100%;
	min-height: 280px;
}

.epl-department-image {
	height: 118px;
}

.epl-department-card-body {
	padding: 18px 18px 20px;
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	min-width: 0;
}

.epl-department-heading { margin: 0 0 11px; }

.epl-department-headline {
	margin: 0 !important;
	padding: 0 !important;
	color: var(--epl-department-anthracite) !important;
	font-family: inherit !important;
	font-size: clamp(20px, 1.65vw, 25px) !important;
	font-style: normal !important;
	font-weight: 850 !important;
	letter-spacing: -.025em !important;
	line-height: 1.05 !important;
	text-transform: none !important;
	text-decoration: none !important;
}

.epl-department-subheadline {
	margin: 4px 0 0 !important;
	padding: 0 !important;
	color: var(--epl-department-blue) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-style: normal !important;
	font-weight: 750 !important;
	letter-spacing: -.01em !important;
	line-height: 1.2 !important;
	text-transform: none !important;
}

.epl-department-supplier-list {
	list-style: none !important;
	margin: 0 !important;
	padding: 0 !important;
	min-width: 0;
}

.epl-department-card.is-collapsed .epl-department-supplier.is-extra {
	display: none !important;
}

.epl-department-card.is-expanded .epl-department-supplier-list {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 28px;
}

.epl-department-card.is-expanded .epl-department-supplier.is-extra {
	display: flex !important;
}

.epl-department-supplier {
	position: relative;
	display: flex !important;
	align-items: flex-start;
	gap: 9px;
	min-width: 0;
	margin: 0 !important;
	padding: 7px 0 8px !important;
	border: 0 !important;
	border-bottom: 1px dotted var(--epl-department-border) !important;
	background: transparent !important;
	box-shadow: none !important;
}

.epl-department-supplier::before {
	content: "✓";
	flex: 0 0 auto;
	width: 14px;
	margin-top: 2px;
	color: var(--epl-department-blue);
	font-family: Arial, sans-serif;
	font-size: 13px;
	font-weight: 900;
	line-height: 1;
	text-align: center;
}

.epl-department-supplier-name {
	display: block;
	min-width: 0;
	color: #50565c !important;
	font-family: inherit !important;
	font-size: 13px !important;
	font-style: normal !important;
	font-weight: 450 !important;
	line-height: 1.35 !important;
	text-decoration: none !important;
}

.epl-department-more {
	appearance: none;
	align-self: flex-start;
	margin: 13px 0 0 !important;
	padding: 0 0 3px !important;
	border: 0 !important;
	border-bottom: 1px solid currentColor !important;
	border-radius: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	color: var(--epl-department-blue) !important;
	font: inherit !important;
	font-size: 11px !important;
	font-weight: 800 !important;
	letter-spacing: .045em !important;
	line-height: 1.25 !important;
	text-transform: uppercase !important;
	cursor: pointer;
}

.epl-department-more:hover,
.epl-department-more:focus-visible {
	color: #002f5e !important;
	outline: none;
}

.epl-department-empty {
	margin: 0;
	padding: 8px 0 9px;
	border-bottom: 1px dotted var(--epl-department-border);
	color: #70777d;
	font-size: 13px;
	line-height: 1.45;
}

@media (max-width: 1120px) {
	.epl-departments-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.epl-department-card.is-expanded .epl-department-supplier-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.epl-map-layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

@media (max-width: 880px) {
	.epl-regional-hero { grid-template-columns: 1fr; }
	.epl-regional-hero-media { min-height: 230px; order: -1; }
	.epl-regional-hero-media::after { display: none; }
	.epl-regional-hero-copy { padding: 30px; }
	.epl-map-layout { grid-template-columns: minmax(0, 1fr); }
	.epl-map-info { border-left: 0; border-top: 1px solid #e5e8ea; }
	.epl-map-stats { margin-top: 6px; }
}

@media (max-width: 640px) {
	.epl-map-wrap { width: 100%; }
	.epl-regional-hero { border-radius: 15px; }
	.epl-regional-hero-media { min-height: 185px; }
	.epl-regional-hero-copy { padding: 25px 22px 28px; }
	.epl-regional-hero h2 { font-size: clamp(31px, 10vw, 42px) !important; }
	.epl-kicker { font-size: 10px !important; }
	.epl-kicker > span { width: 28px; }
	.epl-map { height: var(--epl-map-height-mobile); }
	.epl-map-layout { border-radius: 12px; }

	.epl-map-filters {
		width: 100%;
		max-width: 100%;
		overflow: visible !important;
		overflow-x: visible !important;
		flex-wrap: wrap !important;
		row-gap: 10px;
		scrollbar-width: none;
		scroll-snap-type: none !important;
		-webkit-overflow-scrolling: auto;
	}
	.epl-map-filters::-webkit-scrollbar { display: none; }
	.epl-map-wrap .epl-map-filters .epl-filter-text,
	.epl-map-wrap .epl-map-filters .epl-filter-separator { flex: 0 0 auto !important; max-width: 100%; }

	.epl-map-info { padding: 24px 22px; }
	.epl-departments { margin-top: 46px; padding: 32px 12px 36px; border-radius: 16px; }
	.epl-departments-grid { grid-template-columns: minmax(0, 1fr); gap: 14px; }
	.epl-department-card.is-expanded { grid-column: auto; grid-template-columns: minmax(0, 1fr); }
	.epl-department-card.is-expanded .epl-department-image { height: 145px; min-height: 0; }
	.epl-department-card.is-expanded .epl-department-supplier-list { grid-template-columns: minmax(0, 1fr); }
	.epl-department-image { height: 145px; }
	.epl-department-card-body { padding: 18px 17px 20px; }
}

@media (max-width: 430px) {
	.epl-map-filters {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		justify-items: var(--epl-filter-justify, flex-start);
		column-gap: 0;
		row-gap: 8px;
	}
	.epl-map-wrap .epl-map-filters .epl-filter-text { width: max-content; max-width: 100%; white-space: normal !important; text-align: inherit; }
	.epl-map-filters .epl-filter-separator { display: none !important; }
	.epl-map-stats strong { font-size: 21px; }
	.epl-map-stats span { font-size: 8px; }
}

/* 1.6.2 – kompakte Live-Ansicht nach dem zweiten Layout-Entwurf */
.epl-map-info .epl-map-filters {
	justify-content: flex-start;
	gap: 8px;
	margin: 10px 0 0;
	padding: 0;
}

.epl-map-filter-panel {
	margin-top: 20px;
	padding-top: 18px;
	border-top: 1px solid #dfe4e7;
}

.epl-map-filter-title {
	display: block;
	margin-bottom: 10px;
	color: var(--epl-blue);
	font-size: 14px;
	font-weight: 800;
	line-height: 1.2;
}

.epl-map-info .epl-filter-separator {
	margin-left: 2px;
	margin-right: 2px;
}

.epl-map-legend {
	margin-bottom: 0;
	padding-bottom: 0;
	border-bottom: 0;
}

.epl-legend-marker {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 44px;
	width: 44px;
	height: 48px;
}

.epl-legend-marker img {
	display: block;
	max-width: 42px;
	max-height: 46px;
	width: auto;
	height: auto;
	object-fit: contain;
}

/* Nur wenn in der Mediathek kein Standardmarker gewählt wurde. */
.epl-legend-marker-fallback {
	position: relative;
}

.epl-legend-marker-fallback::before {
	content: "";
	display: block;
	width: 28px;
	height: 36px;
	border: 2px solid #fff;
	border-radius: 50% 50% 50% 0;
	background: var(--epl-blue);
	box-shadow: 0 2px 7px rgba(0, 35, 67, .18);
	transform: rotate(-45deg);
}

.epl-legend-marker-fallback i {
	position: absolute;
	left: 50%;
	top: 15px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: #fff;
	transform: translate(-50%, -50%);
}

.epl-legend-marker-market.epl-legend-marker-fallback::before {
	background: var(--epl-yellow);
	border-color: var(--epl-blue);
}

.epl-legend-marker-market.epl-legend-marker-fallback i {
	background: var(--epl-blue);
}

/* Die Abteilungen schließen direkt an die Kartenfläche an. */
.epl-departments {
	margin-top: 26px;
	padding: 0;
	border-radius: 0;
	background: transparent;
}

.epl-departments-grid {
	gap: 16px;
}

.epl-department-card {
	border-radius: 13px;
	box-shadow: 0 7px 20px rgba(0, 35, 67, .065);
}

.epl-department-image {
	height: 132px;
	border-bottom: 4px solid var(--epl-yellow);
}

.epl-department-card-body {
	padding: 17px 18px 19px;
}

.epl-department-headline {
	color: var(--epl-blue) !important;
	font-size: clamp(20px, 1.55vw, 24px) !important;
}

.epl-department-heading::after {
	content: "";
	display: block;
	width: 38px;
	height: 3px;
	margin-top: 9px;
	border-radius: 999px;
	background: var(--epl-yellow);
}

.epl-department-subheadline {
	font-size: 12px !important;
}

.epl-department-supplier {
	padding-top: 8px !important;
	padding-bottom: 8px !important;
}

.epl-department-more {
	margin-top: 14px !important;
	border-bottom: 0 !important;
	font-size: 12px !important;
	letter-spacing: 0 !important;
	text-transform: none !important;
}

.epl-department-more::before {
	content: "+";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	margin-right: 7px;
	border-radius: 50%;
	background: var(--epl-blue);
	color: #fff;
	font-size: 14px;
	font-weight: 800;
	line-height: 1;
	vertical-align: -2px;
}

.epl-department-card.is-expanded .epl-department-more::before {
	content: "−";
}

@media (max-width: 880px) {
	.epl-map-info .epl-map-filters {
		justify-content: flex-start;
	}
}

@media (max-width: 640px) {
	.epl-departments {
		margin-top: 18px;
		padding: 0;
		border-radius: 0;
	}
	.epl-department-image {
		height: 170px;
	}
}


/* 1.6.3 – Layout-Korrekturen */
.epl-map-layout {
	align-items: stretch;
}

.epl-map-stage {
	display: flex;
	align-items: stretch;
	min-height: var(--epl-map-height);
}

.epl-map {
	flex: 1 1 auto;
	height: auto;
	min-height: var(--epl-map-height);
}

.epl-department-card {
	align-self: stretch;
}

.epl-department-image {
	height: 180px;
	border-bottom: 0;
	background: #eef0e8;
}

.epl-department-image img,
.epl-department-dialog-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
}

.epl-department-dialog[hidden] {
	display: none !important;
}

.epl-department-dialog {
	position: fixed;
	inset: 0;
	z-index: 10000;
}

.epl-department-dialog-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(12, 22, 33, .58);
}

.epl-department-dialog-panel {
	position: relative;
	z-index: 1;
	width: min(1040px, calc(100vw - 32px));
	max-height: calc(100vh - 40px);
	margin: 20px auto;
	overflow: auto;
	border-radius: 18px;
	background: #fff;
	box-shadow: 0 20px 54px rgba(0, 35, 67, .28);
}

.epl-department-dialog-image {
	position: relative;
	height: 240px;
	overflow: hidden;
	border-radius: 18px 18px 0 0;
	background: #eef0e8;
}

.epl-department-dialog-body {
	padding: 24px 26px 28px;
}

.epl-department-dialog-close {
	position: absolute;
	right: 14px;
	top: 14px;
	z-index: 2;
	width: 38px;
	height: 38px;
	border: 0;
	border-radius: 50%;
	background: rgba(255,255,255,.94);
	color: var(--epl-blue);
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	box-shadow: 0 3px 12px rgba(0,0,0,.12);
}

.epl-department-dialog-list {
	list-style: none;
	margin: 18px 0 0 !important;
	padding: 0 !important;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	column-gap: 28px;
}

body.epl-dialog-open {
	overflow: hidden;
}

@media (max-width: 1120px) {
	.epl-department-dialog-list {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 880px) {
	.epl-map-stage {
		min-height: var(--epl-map-height-mobile);
	}
	.epl-map {
		min-height: var(--epl-map-height-mobile);
	}
	.epl-department-image {
		height: 168px;
	}
	.epl-department-dialog-image {
		height: 200px;
	}
}

@media (max-width: 640px) {
	.epl-department-image {
		height: 160px;
	}
	.epl-department-dialog-panel {
		width: min(100vw - 20px, 1040px);
		max-height: calc(100vh - 20px);
		margin: 10px auto;
	}
	.epl-department-dialog-body {
		padding: 20px 18px 22px;
	}
	.epl-department-dialog-list {
		grid-template-columns: minmax(0, 1fr);
		column-gap: 0;
	}
}


/* 1.6.5 – AI-Hinweis und zentrierte Lieferanten-Dialoge */
.epl-ai-badge {
	width: 31px;
	min-width: 31px;
	max-width: 31px;
	height: 31px;
	padding: 0;
	gap: 0;
	overflow: hidden;
	white-space: nowrap;
	cursor: help;
	transition: max-width .18s ease, width .18s ease, padding .18s ease, border-radius .18s ease, gap .18s ease;
}

.epl-ai-badge-short {
	flex: 0 0 27px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 27px;
	height: 27px;
}

.epl-ai-badge-long {
	display: inline-block;
	max-width: 0;
	opacity: 0;
	overflow: hidden;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: .02em;
	line-height: 1;
	transition: max-width .18s ease, opacity .14s ease;
}

.epl-ai-badge:hover,
.epl-ai-badge:focus-visible {
	width: 112px;
	max-width: 112px;
	padding: 0 8px 0 1px;
	gap: 3px;
	border-radius: 999px;
	outline: none;
}

.epl-ai-badge:hover .epl-ai-badge-long,
.epl-ai-badge:focus-visible .epl-ai-badge-long {
	max-width: 72px;
	opacity: 1;
}

.epl-department-dialog {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.epl-department-dialog[hidden] {
	display: none !important;
}

.epl-department-dialog-panel {
	width: min(1040px, calc(100vw - 40px));
	max-height: calc(100vh - 40px);
	margin: 0;
}

@media (max-width: 640px) {
	.epl-department-dialog {
		padding: 10px;
	}
	.epl-department-dialog-panel {
		width: min(100%, 1040px);
		max-height: calc(100vh - 20px);
		margin: 0;
	}
}


/* 1.6.7 – Dialog-X als blauer Kreis mit weißem X */
.epl-department-dialog-close,
.epl-department-dialog-close:hover,
.epl-department-dialog-close:focus,
.epl-department-dialog-close:focus-visible,
.epl-department-dialog-close:active {
	-webkit-appearance: none !important;
	appearance: none !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	width: 40px !important;
	height: 40px !important;
	min-width: 40px !important;
	min-height: 40px !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	outline: 0 !important;
	background: var(--epl-blue) !important;
	background-image: none !important;
	box-shadow: 0 4px 14px rgba(0, 59, 113, .24) !important;
	filter: none !important;
	transform: none !important;
	color: #ffffff !important;
	font-family: Arial, sans-serif !important;
	font-size: 28px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	text-decoration: none !important;
	text-shadow: none !important;
	cursor: pointer !important;
}

.epl-department-dialog-close:hover,
.epl-department-dialog-close:focus,
.epl-department-dialog-close:focus-visible {
	background: #002f5e !important;
	box-shadow: 0 6px 16px rgba(0, 47, 94, .28) !important;
}

.epl-department-dialog-close::before,
.epl-department-dialog-close::after {
	content: none !important;
	display: none !important;
}


/* 1.6.8 – Mobile Neuordnung: Filter direkt unter der Karte */
@media (max-width: 880px) {
	.epl-map-layout {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		width: 100%;
		max-width: 100%;
		overflow: hidden;
	}

	.epl-map-stage,
	.epl-map-info,
	.epl-map-info-copy,
	.epl-map-legend,
	.epl-map-filter-panel {
		min-width: 0;
		max-width: 100%;
	}

	.epl-map-info {
		display: flex;
		flex-direction: column;
		padding: 0;
		border-left: 0;
		border-top: 0;
		background: #fff;
	}

	/* Auf Mobilgeräten steht die Auswahl unmittelbar nach der Karte. */
	.epl-map-filter-panel {
		order: -10;
		margin: 0;
		padding: 14px 18px 15px;
		border-top: 1px solid #e5e8ea;
		border-bottom: 1px solid #e5e8ea;
		background: #fff;
	}

	.epl-map-filter-title {
		margin: 0 0 9px;
		font-size: 12px;
	}

	.epl-map-info .epl-map-filters {
		display: flex;
		width: 100%;
		max-width: 100%;
		margin: 0;
		padding: 0;
		flex-wrap: wrap !important;
		justify-content: flex-start !important;
		align-items: center;
		gap: 8px 0;
		overflow: visible !important;
	}

	.epl-map-info .epl-map-filters .epl-filter-text {
		max-width: 100%;
		white-space: normal !important;
	}

	.epl-map-info-copy {
		order: 0;
		padding: 22px 20px 0;
	}

	.epl-map-legend {
		order: 1;
		margin: 18px 20px 22px;
		padding: 18px 0 0;
		border-top: 1px solid #dfe4e7;
		border-bottom: 0;
	}

	.epl-map-stage {
		width: 100%;
		overflow: hidden;
	}

	.epl-map {
		width: 100%;
		max-width: 100%;
	}

	.epl-departments {
		width: 100%;
		max-width: 100%;
	}

	.epl-department-card,
	.epl-department-card-body,
	.epl-department-supplier-list {
		min-width: 0;
		max-width: 100%;
	}
}

@media (max-width: 520px) {
	.epl-map-filter-panel {
		padding: 13px 15px 14px;
	}

	.epl-map-info .epl-map-filters {
		display: grid;
		grid-template-columns: minmax(0, 1fr);
		align-items: stretch;
		justify-items: start;
		row-gap: 7px;
	}

	.epl-map-info .epl-filter-separator {
		display: none !important;
	}

	.epl-map-info .epl-map-filters .epl-filter-text {
		width: max-content;
		max-width: 100%;
	}

	.epl-map-info-copy {
		padding: 20px 16px 0;
	}

	.epl-map-legend {
		margin: 16px 16px 20px;
	}
}


/* 1.6.9 – Smartphone-Erkennung, horizontale Begrenzung und stabiler Dialog */
html.epl-map-page,
html.epl-map-page body {
	max-width: 100%;
	overflow-x: hidden;
}

@supports (overflow: clip) {
	html.epl-map-page,
	html.epl-map-page body {
		overflow-x: clip;
	}
}

.epl-map-wrap {
	width: 100%;
	max-width: 100%;
	min-width: 0;
	overflow-x: hidden;
}

@supports (overflow: clip) {
	.epl-map-wrap {
		overflow-x: clip;
	}
}

.epl-map-layout,
.epl-map-stage,
.epl-map,
.epl-map-info,
.epl-map-info-copy,
.epl-map-legend,
.epl-map-filter-panel,
.epl-map-filters,
.epl-departments,
.epl-departments-grid,
.epl-department-card,
.epl-department-card-body,
.epl-department-supplier-list {
	min-width: 0;
	max-width: 100%;
}

.epl-map-layout,
.epl-map-stage,
.epl-map {
	overflow-x: hidden;
}

.epl-map .leaflet-container {
	width: 100% !important;
	max-width: 100% !important;
	overflow: hidden !important;
}

.epl-mobile-filter-panel {
	display: none !important;
}

/* JS erkennt echte Smartphone-/Touch-Ansichten und setzt diese Klasse. */
.epl-map-wrap.epl-is-smartphone .epl-map-layout {
	display: grid !important;
	grid-template-columns: minmax(0, 1fr) !important;
	width: 100% !important;
	max-width: 100% !important;
}

.epl-map-wrap.epl-is-smartphone .epl-map-stage {
	order: 0 !important;
	grid-column: 1 !important;
}

.epl-map-wrap.epl-is-smartphone .epl-mobile-filter-panel {
	display: block !important;
	order: 1 !important;
	grid-column: 1 !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 14px 18px 15px !important;
	border-top: 1px solid #e5e8ea !important;
	border-bottom: 1px solid #e5e8ea !important;
	background: #fff !important;
}

.epl-map-wrap.epl-is-smartphone .epl-map-info {
	order: 2 !important;
	grid-column: 1 !important;
	width: 100% !important;
	max-width: 100% !important;
}

.epl-map-wrap.epl-is-smartphone .epl-map-info > .epl-map-filter-panel {
	display: none !important;
}

.epl-map-wrap.epl-is-smartphone .epl-mobile-filter-panel .epl-map-filters {
	display: flex !important;
	flex-wrap: wrap !important;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	justify-content: flex-start !important;
	align-items: center !important;
	gap: 8px 0 !important;
	overflow: hidden !important;
}

.epl-map-wrap.epl-is-smartphone .epl-mobile-filter-panel .epl-filter-text {
	max-width: 100% !important;
	white-space: normal !important;
	overflow-wrap: anywhere;
}

.epl-department-dialog {
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
	overflow: hidden !important;
}

.epl-department-dialog-panel {
	box-sizing: border-box !important;
	width: calc(100% - 40px) !important;
	max-width: 1040px !important;
	min-width: 0 !important;
	margin: 0 auto !important;
	overflow-x: hidden !important;
}

body.epl-dialog-open {
	overflow: hidden !important;
}

@media (max-width: 520px) {
	.epl-map-wrap.epl-is-smartphone .epl-mobile-filter-panel {
		padding: 13px 15px 14px !important;
	}

	.epl-map-wrap.epl-is-smartphone .epl-mobile-filter-panel .epl-map-filters {
		display: grid !important;
		grid-template-columns: minmax(0, 1fr) !important;
		justify-items: start !important;
		row-gap: 7px !important;
	}

	.epl-map-wrap.epl-is-smartphone .epl-mobile-filter-panel .epl-filter-separator {
		display: none !important;
	}

	.epl-map-wrap.epl-is-smartphone .epl-mobile-filter-panel .epl-filter-text {
		width: auto !important;
		max-width: 100% !important;
	}

	.epl-department-dialog {
		padding: 10px !important;
	}

	.epl-department-dialog-panel {
		width: 100% !important;
		max-width: 100% !important;
		max-height: calc(100dvh - 20px) !important;
	}
}


/* 1.6.10 – fünf Abteilungskarten auf Desktop */
.epl-departments-grid {
	grid-template-columns: repeat(5, minmax(0, 1fr));
	gap: 14px;
}

@media (max-width: 1180px) {
	.epl-departments-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.epl-departments-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.epl-departments-grid {
		grid-template-columns: minmax(0, 1fr);
	}
}
