/* Rhenus Standorte */

.rhst {
	--rhst-accent: var(--e-global-color-accent, #ffcc01);
	--rhst-ink: #1d1d1f;
	--rhst-muted: #86868b;
	--rhst-line: rgba(0, 0, 0, 0.12);
	display: flex;
	gap: 24px;
	height: var(--rhst-height, 680px);
	font-family: inherit;
}

/* Panel: Controls + Liste */
.rhst__panel {
	flex: 0 0 380px;
	display: flex;
	flex-direction: column;
	min-height: 0;
}

.rhst__controls {
	display: flex;
	gap: 10px;
	margin-bottom: 12px;
}
.rhst__search {
	position: relative;
	flex: 1 1 auto;
	display: flex;
	align-items: center;
}
.rhst__search svg {
	position: absolute;
	left: 14px;
	width: 17px;
	height: 17px;
	color: var(--rhst-muted);
	pointer-events: none;
}
.rhst__search-input {
	width: 100%;
	height: 44px;
	padding: 0 14px 0 40px;
	border: 1px solid var(--rhst-line);
	border-radius: 999px;
	font-size: 15px;
	background: #fff;
	appearance: none;
}
.rhst__search-input::-webkit-search-cancel-button { -webkit-appearance: none; }
.rhst__search-input:focus {
	outline: none;
	border-color: var(--rhst-accent);
	box-shadow: 0 0 0 3px rgba(255, 204, 1, 0.18);
}

/* Eigenes Land-Dropdown (theme-unabhaengig) */
.rhst__land {
	position: relative;
	flex: 0 1 auto;
	min-width: 150px;
	max-width: 210px;
}
.rhst__land-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	height: 44px;
	margin: 0 !important;
	padding: 0 12px 0 14px !important;
	border: 1px solid var(--rhst-line) !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #333 !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	text-align: left;
	cursor: pointer;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.rhst__land.is-open .rhst__land-btn,
.rhst__land-btn:focus-visible {
	outline: none;
	border-color: var(--rhst-accent) !important;
	box-shadow: 0 0 0 3px rgba(255, 204, 1, 0.18);
}
.rhst__land-current {
	flex: 1 1 auto;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-width: 0;
	overflow: hidden;
	white-space: nowrap;
	text-overflow: ellipsis;
}
.rhst__land-current span {
	overflow: hidden;
	text-overflow: ellipsis;
}
.rhst__land-chev {
	flex: 0 0 auto;
	width: 14px;
	height: 14px;
	color: #555;
	transition: transform 0.18s ease;
}
.rhst__land.is-open .rhst__land-chev { transform: rotate(180deg); }

.rhst__land-menu {
	position: absolute;
	z-index: 50;
	top: calc(100% + 6px);
	right: 0;
	left: auto;
	min-width: 240px;
	max-width: min(340px, calc(100vw - 24px));
	max-height: 320px;
	overflow-y: auto;
	padding: 6px;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 14px;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
	scrollbar-width: thin;
}
.rhst__land-menu[hidden] { display: none; }
.rhst__land-opt {
	display: flex;
	align-items: center;
	gap: 10px;
	width: 100%;
	margin: 0 !important;
	padding: 9px 10px !important;
	border: 0 !important;
	border-radius: 9px !important;
	background: transparent !important;
	color: var(--rhst-ink) !important;
	font-family: inherit !important;
	font-size: 14px !important;
	font-weight: 400 !important;
	line-height: 1.25 !important;
	text-align: left;
	cursor: pointer;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
}
.rhst__land-opt:hover { background: rgba(0, 0, 0, 0.05) !important; }
.rhst__land-opt.is-selected {
	background: rgba(255, 204, 1, 0.16) !important;
	font-weight: 600 !important;
}
.rhst__land-opt-name { flex: 1 1 auto; }
.rhst__land-opt-count {
	flex: 0 0 auto;
	min-width: 22px;
	padding: 1px 7px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	color: var(--rhst-muted);
	font-size: 11.5px;
	font-weight: 600;
	text-align: center;
}

/* Flaggen (flag-icons) als kleine Chips */
.rhst-flag {
	flex: 0 0 auto;
	width: 21px;
	height: 15px;
	border-radius: 2px;
	background-size: cover !important;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.08);
}

.rhst__bar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 8px;
	min-height: 28px;
}
.rhst__count {
	font-size: 13px;
	color: var(--rhst-muted);
}
.rhst__reset {
	display: inline-flex !important;
	align-items: center;
	gap: 6px;
	flex: 0 0 auto;
	margin: 0 !important;
	padding: 5px 12px 5px 10px !important;
	min-height: 0 !important;
	border: 1px solid var(--rhst-line) !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: var(--rhst-ink) !important;
	font-family: inherit !important;
	font-size: 12.5px !important;
	font-weight: 500 !important;
	line-height: 1.2 !important;
	cursor: pointer;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	transition: background 0.15s, border-color 0.15s;
}
.rhst__reset:hover {
	background: rgba(255, 204, 1, 0.14) !important;
	border-color: var(--rhst-accent) !important;
}
.rhst__reset svg {
	width: 14px;
	height: 14px;
	flex: 0 0 auto;
}
.rhst__reset[hidden] { display: none !important; }

/* Liste */
.rhst__list {
	flex: 1 1 auto;
	overflow-y: auto;
	min-height: 0;
	padding-right: 6px;
	scrollbar-width: thin;
}

/* Gruppen nach Land */
.rhst__group[hidden] { display: none; }
.rhst__group-head {
	position: sticky;
	top: 0;
	z-index: 2;
	display: flex;
	align-items: center;
	gap: 9px;
	padding: 8px 14px;
	margin-top: 2px;
	margin-bottom: 8px;
	background: rgba(255, 255, 255, 0.92);
	backdrop-filter: saturate(180%) blur(8px);
	-webkit-backdrop-filter: saturate(180%) blur(8px);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	cursor: pointer;
	transition: background 0.15s;
}
.rhst__group-head:hover { background: rgba(255, 204, 1, 0.14); }
.rhst__group-head:focus-visible {
	outline: none;
	background: rgba(255, 204, 1, 0.18);
}
.rhst__group-name {
	flex: 1 1 auto;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #333;
}
.rhst__group-count {
	flex: 0 0 auto;
	min-width: 20px;
	padding: 1px 7px;
	border-radius: 999px;
	background: rgba(0, 0, 0, 0.06);
	color: var(--rhst-muted);
	font-size: 11px;
	font-weight: 600;
	text-align: center;
}

.rhst__item {
	position: relative;
	padding: 13px 14px;
	border-radius: 0.7rem;
	cursor: pointer;
	transition: background 0.15s;
}
.rhst__item[hidden] { display: none; }
.rhst__item:not(:last-of-type)::after {
	content: '';
	position: absolute;
	left: 14px;
	right: 14px;
	bottom: 0;
	height: 1px;
	background: rgba(0, 0, 0, 0.07);
}
.rhst__item:hover,
.rhst__item.is-hover { background: rgba(0, 0, 0, 0.035); }
.rhst__item:hover::after,
.rhst__item.is-hover::after,
.rhst__item.is-active::after { opacity: 0; }
.rhst__item.is-active {
	background: rgba(255, 204, 1, 0.12);
	box-shadow: inset 0 0 0 1px rgba(255, 204, 1, 0.5);
}
.rhst__item-title {
	margin: 0 0 5px;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.3;
	color: var(--rhst-ink);
}
.rhst__item-adr {
	font-style: normal;
	font-size: 0.875rem;
	line-height: 1.45;
	color: var(--rhst-muted);
}
.rhst__item-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 14px;
	margin-top: 8px;
	font-size: 0.85rem;
}
.rhst__item-links a {
	color: var(--rhst-ink);
	text-decoration: none;
	border-bottom: 1px solid var(--rhst-accent);
}
.rhst__item-links a:hover { color: #000; }
.rhst__empty { color: var(--rhst-muted); padding: 16px 4px; }

/* Karte */
.rhst__map {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 0;
	border-radius: 0.7rem;
	overflow: hidden;
	background: #eee;
}

/* Marker-Reset (gegen Theme-Button-Styles mit !important) */
.rhst .rhst-pin,
.rhst .rhst-cluster {
	box-sizing: border-box !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	min-width: 0 !important;
	min-height: 0 !important;
	font-family: inherit !important;
	line-height: 1 !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	cursor: pointer;
	will-change: transform;
}

/* Marker: Einzelstandort (klarer Punkt mit weißem Ring) */
.rhst .rhst-pin {
	width: 15px !important;
	height: 15px !important;
	border-radius: 50% !important;
	background: var(--rhst-accent) !important;
	box-shadow: 0 0 0 2.5px #fff, 0 1px 4px rgba(0, 0, 0, 0.35) !important;
	transition: transform 0.12s ease;
}
.rhst .rhst-pin:hover,
.rhst .rhst-pin.is-hover {
	transform: scale(1.45);
	box-shadow: 0 0 0 2.5px #fff, 0 2px 7px rgba(0, 0, 0, 0.4) !important;
	z-index: 3;
}

/* Marker: Cluster (runder Kreis, dezenter Ring statt Glow) */
.rhst .rhst-cluster {
	display: flex !important;
	align-items: center;
	justify-content: center;
	width: 34px !important;
	height: 34px !important;
	border-radius: 50% !important;
	background: var(--rhst-accent) !important;
	color: #1a1a1a !important;
	font-size: 13px !important;
	font-weight: 700 !important;
	box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.6), 0 2px 7px rgba(0, 0, 0, 0.22) !important;
	transition: transform 0.12s ease;
}
.rhst .rhst-cluster:hover {
	transform: scale(1.08);
	z-index: 3;
}

/* Popup */
.rhst .maplibregl-popup-content,
.maplibregl-popup-content {
	border-radius: 0.7rem;
	padding: 18px 40px 18px 20px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.16);
	font-family: inherit;
}
.rhst-pop__land {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	margin-bottom: 8px;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	color: #555;
}
.rhst-pop__title {
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--rhst-ink, #1d1d1f);
	line-height: 1.25;
	margin-bottom: 8px;
}
.rhst-pop__adr {
	font-size: 0.875rem;
	line-height: 1.5;
	color: #86868b;
	margin-bottom: 10px;
}
.rhst-pop__links { font-size: 0.875rem; line-height: 1.7; }
.rhst-pop__links span { font-weight: 600; color: #1d1d1f; }
.rhst-pop__links a { color: #1d1d1f; text-decoration: none; border-bottom: 1px solid #ffcc01; }
.rhst .maplibregl-popup-close-button,
.maplibregl-popup-close-button {
	position: absolute !important;
	top: 6px !important;
	right: 6px !important;
	width: 28px !important;
	height: 28px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 50% !important;
	background: transparent !important;
	color: #86868b !important;
	font-size: 18px !important;
	line-height: 28px !important;
	text-align: center !important;
	box-shadow: none !important;
	-webkit-appearance: none !important;
	appearance: none !important;
	transition: background 0.15s, color 0.15s !important;
}
.rhst .maplibregl-popup-close-button:hover,
.maplibregl-popup-close-button:hover {
	background: rgba(0, 0, 0, 0.06) !important;
	color: #1d1d1f !important;
}

/* Mobile */
@media (max-width: 900px) {
	.rhst {
		flex-direction: column;
		height: auto;
	}
	.rhst__map {
		order: -1;
		height: 500px;
		flex: 0 0 auto;
	}
	.rhst__panel {
		flex: 1 1 auto;
	}
	.rhst__list {
		max-height: 460px;
	}
	.rhst__land { max-width: 46%; }
	.rhst__land-menu {
		min-width: min(280px, calc(100vw - 24px));
		max-width: calc(100vw - 24px);
	}
	/* Popup nie hoeher als der Platz ober-/unterhalb des zentrierten Markers (Karte 500 -> ~250 je Seite): deckeln + intern scrollen. Damit kein Clipping, egal wohin MapLibre klappt. */
	.rhst .maplibregl-popup-content {
		max-height: 220px;
		overflow-y: auto;
		padding: 16px 38px 16px 18px;
	}
}
