/**
 * Grüne vor Ort – Thüringen-Karte
 * Farben nach dem grünen Corporate Design: Klee #008939, Tanne #005437, Sonne #FFF17A, Grashalm #8ABD24, Sand #F5F1E9.
 */

.gmth {
	--gmth-primary: #008939;
	--gmth-dark: #005437;
	--gmth-accent: #fff17a;
	--gmth-light: #8abd24;
	--gmth-sand: #f5f1e9;
	--gmth-text: #212529;
	--gmth-muted: #59656b;
	--gmth-line: #fff;
	--gmth-font-heading: "GrueneType Neue", "GrueneType", "PT Sans", system-ui, sans-serif;

	/* Flächenfarben: statische Werte für ältere Browser, unten per color-mix() aus den Hauptfarben. */
	--gmth-fill-0: #dcebbd;
	--gmth-fill-1: #c7e5d3;
	--gmth-fill-2: #c5de92;
	--gmth-fill-3: #9ed2b4;
	--gmth-fill-4: #afd26a;
	--gmth-fill-5: #7ac298;
	--gmth-fill-empty: #e4e7e5;
	--gmth-tint: #e1f0e6;

	position: relative;
	max-width: 1000px;
	margin-inline: auto;
	color: var(--gmth-text);
	container: gmth / inline-size;
}

@supports (color: color-mix(in srgb, red 50%, white)) {
	.gmth {
		--gmth-fill-0: color-mix(in srgb, var(--gmth-light) 30%, #fff);
		--gmth-fill-1: color-mix(in srgb, var(--gmth-primary) 22%, #fff);
		--gmth-fill-2: color-mix(in srgb, var(--gmth-light) 50%, #fff);
		--gmth-fill-3: color-mix(in srgb, var(--gmth-primary) 38%, #fff);
		--gmth-fill-4: color-mix(in srgb, var(--gmth-light) 68%, #fff);
		--gmth-fill-5: color-mix(in srgb, var(--gmth-primary) 52%, #fff);
		--gmth-tint: color-mix(in srgb, var(--gmth-primary) 12%, #fff);
	}
}

.gmth *,
.gmth *::before,
.gmth *::after {
	box-sizing: border-box;
}

.gmth-c0 { --gmth-region-fill: var(--gmth-fill-0); }
.gmth-c1 { --gmth-region-fill: var(--gmth-fill-1); }
.gmth-c2 { --gmth-region-fill: var(--gmth-fill-2); }
.gmth-c3 { --gmth-region-fill: var(--gmth-fill-3); }
.gmth-c4 { --gmth-region-fill: var(--gmth-fill-4); }
.gmth-c5 { --gmth-region-fill: var(--gmth-fill-5); }

/* ------------------------------------------------------------------ Karte */

.gmth__map {
	position: relative;
}

.gmth__svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
	-webkit-tap-highlight-color: transparent;
	-webkit-user-select: none;
	user-select: none;
	touch-action: manipulation;
}

.gmth-verband {
	cursor: pointer;
	outline: none;
}

.gmth-region {
	fill: var(--gmth-region-fill, var(--gmth-fill-0));
	stroke: var(--gmth-region-fill, var(--gmth-fill-0));
	stroke-width: 0.8;
	fill-rule: evenodd;
	transition: fill 0.15s ease, stroke 0.15s ease;
}

.gmth-region--empty {
	--gmth-region-fill: var(--gmth-fill-empty);
}

.gmth-verband.is-hover,
.gmth-verband.is-focus,
.gmth-verband:focus-visible {
	--gmth-region-fill: var(--gmth-primary);
}

.gmth-verband.is-active {
	--gmth-region-fill: var(--gmth-dark);
}

@media (hover: hover) {
	.gmth-verband:hover {
		--gmth-region-fill: var(--gmth-primary);
	}
}

.gmth-border {
	fill: none;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
}

/* Grenze zwischen zwei Verbänden */
.gmth-border--inter {
	stroke: var(--gmth-line);
	stroke-width: 2.4;
}

/* Landkreisgrenze innerhalb eines Regionalverbands: dezent gestrichelt */
.gmth-border--intra {
	stroke: var(--gmth-line);
	stroke-width: 1.6;
	stroke-dasharray: 2 6;
	stroke-dashoffset: 1;
}

/* Landesgrenze */
.gmth-border--outer {
	stroke: var(--gmth-dark);
	stroke-width: 2.6;
}

.gmth-outline {
	fill: none;
	stroke: var(--gmth-dark);
	stroke-width: 4;
	stroke-linecap: round;
	stroke-linejoin: round;
	pointer-events: none;
	visibility: hidden;
}

.gmth-outline.is-hover,
.gmth-outline.is-focus {
	visibility: visible;
}

.gmth-outline.is-active {
	visibility: visible;
	stroke: var(--gmth-accent);
	stroke-width: 5;
}

/* Beschriftungen */
.gmth__labels {
	pointer-events: none;
}

.gmth-label {
	fill: var(--gmth-dark);
	font-family: inherit;
	font-weight: 700;
	text-anchor: middle;
	letter-spacing: 0.01em;
	paint-order: stroke;
	stroke: rgba(255, 255, 255, 0.55);
	stroke-width: 3px;
	stroke-linejoin: round;
	transition: fill 0.15s ease;
}

.gmth-label--long {
	font-size: 14.5px;
}

.gmth-label--long.gmth-label--city {
	font-size: 13px;
}

.gmth-label--short {
	display: none;
	font-size: 17px;
	letter-spacing: 0.04em;
}

.gmth-label--empty {
	fill: #7b858a;
}

.gmth-label.is-hover,
.gmth-label.is-focus,
.gmth-label.is-active {
	fill: #fff;
	stroke: transparent;
}

.gmth--labels-kfz .gmth-label--long {
	display: none;
}

.gmth--labels-kfz .gmth-label--short {
	display: inline;
}

/* Mittlere Breite (z. B. schmale Inhaltsspalte): Schrift etwas größer, damit sie lesbar bleibt. */
@container gmth (max-width: 780px) {
	.gmth-label--long {
		font-size: 17px;
	}

	.gmth-label--long.gmth-label--city {
		font-size: 15px;
	}

	.gmth-label--short {
		font-size: 20px;
	}

	.gmth-border--inter {
		stroke-width: 2.8;
	}

	.gmth-border--intra {
		stroke-width: 2;
		stroke-dasharray: 2 7;
	}

	.gmth-border--outer {
		stroke-width: 3;
	}

	.gmth-outline {
		stroke-width: 5;
	}

	.gmth-outline.is-active {
		stroke-width: 6;
	}
}

/* Smartphone: Kfz-Kennzeichen statt langer Namen, kräftigere Linien. */
@container gmth (max-width: 560px) {
	.gmth--labels-auto .gmth-label--long {
		display: none;
	}

	.gmth--labels-auto .gmth-label--short,
	.gmth--labels-kfz .gmth-label--short {
		display: inline;
		font-size: 28px;
	}

	.gmth-label--short.gmth-label--city {
		font-size: 23px;
	}

	.gmth-label {
		stroke-width: 4px;
	}

	.gmth-border--inter {
		stroke-width: 3.6;
	}

	.gmth-border--intra {
		stroke-width: 2.8;
		stroke-dasharray: 3 9;
	}

	.gmth-border--outer {
		stroke-width: 3.8;
	}

	.gmth-outline {
		stroke-width: 6.5;
	}

	.gmth-outline.is-active {
		stroke-width: 7.5;
	}
}

/* Tooltip (nur mit Maus) */
.gmth__tooltip {
	position: absolute;
	top: 0;
	left: 0;
	z-index: 5;
	max-width: 280px;
	padding: 8px 12px 9px;
	border-radius: 6px;
	background: var(--gmth-dark);
	box-shadow: 0 8px 24px rgba(0, 40, 26, 0.25);
	color: #fff;
	font-size: 15px;
	line-height: 1.3;
	pointer-events: none;
	will-change: transform;
}

.gmth__tooltip[hidden] {
	display: none;
}

.gmth__tooltip-region {
	display: block;
	font-size: 13px;
	opacity: 0.85;
}

.gmth__tooltip-name {
	display: block;
	font-weight: 700;
}

.gmth__tooltip-hint {
	display: block;
	margin-top: 3px;
	color: var(--gmth-accent);
	font-size: 12px;
}

/* ------------------------------------------------- Legende, Liste, Quelle */

.gmth__legend {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px 28px;
	margin: 14px 0 0;
	color: var(--gmth-muted);
	font-size: 0.875rem;
	line-height: 1.35;
}

.gmth .gmth__hint {
	margin: 0;
	color: var(--gmth-dark);
	font-weight: 700;
}

.gmth__hint-touch {
	display: none;
}

@media (hover: none) {
	.gmth__hint-pointer {
		display: none;
	}

	.gmth__hint-touch {
		display: inline;
	}
}

.gmth .gmth-legend {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gmth .gmth-legend__item {
	display: flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 0;
}

.gmth .gmth-legend__item::before {
	content: none;
}

.gmth-legend__sample {
	flex: none;
	width: 44px;
	height: 20px;
	border-radius: 3px;
}

.gmth-legend__fill {
	fill: var(--gmth-region-fill);
}

.gmth-legend .gmth-border--inter {
	stroke-width: 2.5;
}

.gmth-legend .gmth-border--intra {
	stroke-width: 2;
	stroke-dasharray: 1 5;
	stroke-dashoffset: 0;
}

.gmth__list {
	margin-top: 24px;
}

.gmth .gmth__list-title {
	margin: 0 0 12px;
	color: var(--gmth-dark);
	font-family: var(--gmth-font-heading);
	font-size: 1.35rem;
	font-weight: 500;
	line-height: 1.2;
	text-transform: none;
}

.gmth .gmth-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gmth .gmth-chips > li {
	margin: 0;
	padding: 0;
}

.gmth .gmth-chips > li::before {
	content: none;
}

.gmth .gmth-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	width: auto;
	min-height: 40px;
	margin: 0;
	padding: 6px 14px 6px 10px;
	border: 1px solid rgba(0, 84, 55, 0.22);
	border-radius: 999px;
	background: #fff;
	box-shadow: none;
	color: var(--gmth-dark);
	font: inherit;
	font-size: 0.95rem;
	line-height: 1.2;
	letter-spacing: normal;
	text-align: left;
	text-transform: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.gmth .gmth-chip:hover,
.gmth .gmth-chip.is-hover {
	border-color: var(--gmth-primary);
	background: var(--gmth-primary);
	color: #fff;
}

.gmth .gmth-chip.is-active {
	border-color: var(--gmth-dark);
	background: var(--gmth-dark);
	color: #fff;
}

.gmth .gmth-chip:focus-visible {
	outline: 3px solid var(--gmth-dark);
	outline-offset: 2px;
}

.gmth-chip__swatch {
	flex: none;
	width: 14px;
	height: 14px;
	margin-right: 2px;
	border-radius: 50%;
	background: var(--gmth-region-fill);
	box-shadow: inset 0 0 0 1px rgba(0, 84, 55, 0.25);
}

.gmth-chip:hover .gmth-chip__swatch,
.gmth-chip.is-hover .gmth-chip__swatch {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.6);
}

.gmth-chip__type {
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.05em;
}

.gmth .gmth__source {
	margin: 12px 0 0;
	color: var(--gmth-muted);
	font-size: 0.75rem;
	text-align: right;
}

.gmth .gmth__source a {
	color: inherit;
	text-decoration: none;
}

.gmth .gmth__source a:hover {
	text-decoration: underline;
}

/* ------------------------------------------------------------------ Popup */

.gmth-dialog {
	position: fixed;
	width: min(560px, calc(100vw - 32px));
	max-width: none;
	max-height: min(88vh, 900px);
	max-height: min(88dvh, 900px);
	margin: auto;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 24px 64px rgba(0, 35, 22, 0.35);
	color: var(--gmth-text);
	font-size: 1rem;
	line-height: 1.5;
	text-align: left;
}

.gmth-dialog[open] {
	display: flex;
	flex-direction: column;
	animation: gmth-pop 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.gmth-dialog::backdrop {
	background: rgba(0, 38, 25, 0.55);
	-webkit-backdrop-filter: blur(2px);
	backdrop-filter: blur(2px);
}

.gmth-dialog[open]::backdrop {
	animation: gmth-fade 0.22s ease-out;
}

.gmth-dialog__surface {
	flex: 1 1 auto;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	-webkit-overflow-scrolling: touch;
}

.gmth .gmth-dialog__close {
	position: absolute;
	top: 12px;
	right: 12px;
	z-index: 2;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--gmth-dark);
	box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
	color: #fff;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.gmth .gmth-dialog__close:hover {
	background: var(--gmth-primary);
}

.gmth .gmth-dialog__close:focus-visible {
	outline: 3px solid var(--gmth-accent);
	outline-offset: 2px;
}

.gmth-dialog__close .gmth-icon {
	width: 24px;
	height: 24px;
}

@keyframes gmth-pop {
	from {
		opacity: 0;
		transform: translateY(12px) scale(0.98);
	}

	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes gmth-fade {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes gmth-sheet {
	from {
		transform: translateY(100%);
	}

	to {
		transform: none;
	}
}

/* Popup-Inhalt */
.gmth-card {
	margin: 0;
}

.gmth-card__header {
	position: relative;
	padding: 28px 72px 24px 28px;
	background: var(--gmth-dark);
	color: #fff;
}

.gmth-card__header::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 28px;
	width: 64px;
	height: 4px;
	background: var(--gmth-accent);
}

.gmth .gmth-card__type {
	margin: 0 0 6px;
	color: var(--gmth-accent);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.09em;
	line-height: 1.2;
	text-transform: uppercase;
}

.gmth .gmth-card__title {
	margin: 0;
	padding: 0;
	color: #fff;
	font-family: var(--gmth-font-heading);
	font-size: clamp(1.6rem, 6vw, 2.15rem);
	font-weight: 500;
	line-height: 1.08;
	letter-spacing: normal;
	text-transform: none;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.gmth .gmth-card__area {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 12px 0 0;
	color: rgba(255, 255, 255, 0.9);
	font-size: 0.95rem;
	line-height: 1.4;
}

.gmth-card__area .gmth-icon {
	flex: none;
	width: 18px;
	height: 18px;
	margin-top: 1px;
}

.gmth-card__body {
	padding: 22px 28px 6px;
}

.gmth .gmth-card__list {
	display: grid;
	gap: 16px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gmth .gmth-card__item {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr);
	align-items: start;
	gap: 14px;
	margin: 0;
	padding: 0;
}

.gmth .gmth-card__item::before {
	content: none;
}

.gmth .gmth-card__icon {
	width: 40px;
	height: 40px;
	padding: 9px;
	border-radius: 50%;
	background: var(--gmth-tint);
	color: var(--gmth-primary);
}

.gmth-card__text {
	min-width: 0;
	padding-top: 1px;
	overflow-wrap: anywhere;
}

.gmth-card__label {
	display: block;
	color: var(--gmth-muted);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	line-height: 1.5;
	text-transform: uppercase;
}

.gmth-card__item--office .gmth-card__label {
	color: var(--gmth-dark);
	font-size: 1rem;
	letter-spacing: normal;
	line-height: 1.4;
	text-transform: none;
}

.gmth-card__value {
	display: block;
}

.gmth .gmth-card__address {
	margin: 0;
	font-style: normal;
	line-height: 1.45;
}

.gmth-card__extra {
	display: block;
	margin-top: 2px;
}

.gmth .gmth-card a {
	color: var(--gmth-primary);
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.gmth .gmth-card a:hover {
	color: var(--gmth-dark);
}

.gmth .gmth-card a:focus-visible {
	outline: 3px solid var(--gmth-primary);
	outline-offset: 2px;
	border-radius: 2px;
}

.gmth .gmth-card .gmth-card__sublink {
	display: inline-block;
	margin-top: 4px;
	font-size: 0.875rem;
	font-weight: 400;
}

.gmth .gmth-card__subtitle {
	margin: 24px 0 10px;
	padding: 0;
	color: var(--gmth-muted);
	font-family: inherit;
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.07em;
	line-height: 1.5;
	text-transform: uppercase;
}

.gmth .gmth-socials {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.gmth .gmth-socials > li {
	margin: 0;
	padding: 0;
}

.gmth .gmth-socials > li::before {
	content: none;
}

.gmth .gmth-card a.gmth-social {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 40px;
	padding: 7px 14px 7px 11px;
	border: 1.5px solid var(--gmth-primary);
	border-radius: 999px;
	background: #fff;
	color: var(--gmth-dark);
	font-size: 0.9rem;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.gmth .gmth-card a.gmth-social:hover {
	background: var(--gmth-primary);
	color: #fff;
}

.gmth-social .gmth-icon {
	flex: none;
	width: 18px;
	height: 18px;
}

.gmth-card__info,
.gmth-card__empty {
	margin-top: 22px;
	padding: 14px 18px;
	border-radius: 8px;
	background: var(--gmth-sand);
}

.gmth-card__info > :first-child,
.gmth-card__empty > :first-child {
	margin-top: 0;
}

.gmth-card__info > :last-child,
.gmth-card__empty > :last-child {
	margin-bottom: 0;
}

.gmth-card__footer {
	padding: 18px 28px 26px;
}

.gmth .gmth-card a.gmth-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 11px 20px;
	border-radius: 3px;
	background: var(--gmth-primary);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1.2;
	text-decoration: none;
	text-transform: uppercase;
	transition: background-color 0.15s ease;
}

.gmth .gmth-card a.gmth-button:hover {
	background: var(--gmth-dark);
	color: #fff;
}

.gmth-button .gmth-icon {
	width: 18px;
	height: 18px;
}

.gmth-icon {
	display: inline-block;
	vertical-align: middle;
}

.gmth-sr {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: -1px !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip: rect(0 0 0 0) !important;
	clip-path: inset(50%) !important;
	border: 0 !important;
	white-space: nowrap !important;
}

/* Smartphone: Popup als Bottom-Sheet */
@media (max-width: 600px) {
	.gmth-dialog {
		width: 100%;
		max-width: 100%;
		max-height: 90vh;
		max-height: 90dvh;
		margin: auto 0 0;
		border-radius: 18px 18px 0 0;
	}

	.gmth-dialog[open] {
		animation: gmth-sheet 0.28s cubic-bezier(0.2, 0.8, 0.2, 1);
	}

	.gmth-card__header {
		padding: 30px 70px 22px 20px;
	}

	.gmth-card__header::before {
		content: "";
		position: absolute;
		top: 9px;
		left: 50%;
		width: 44px;
		height: 5px;
		margin-left: -22px;
		border-radius: 3px;
		background: rgba(255, 255, 255, 0.35);
	}

	.gmth-card__header::after {
		left: 20px;
	}

	.gmth .gmth-dialog__close {
		top: 16px;
		right: 14px;
	}

	.gmth-card__body {
		padding: 20px 20px 4px;
	}

	.gmth-card__footer {
		padding: 16px 20px calc(22px + env(safe-area-inset-bottom, 0px));
	}

	.gmth .gmth-card a.gmth-button {
		width: 100%;
	}

	html.gmth-lock {
		overflow: hidden;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gmth-dialog[open],
	.gmth-dialog[open]::backdrop {
		animation: none;
	}

	.gmth-region,
	.gmth-label,
	.gmth-chip,
	.gmth-social,
	.gmth-button {
		transition: none;
	}
}

@media print {
	.gmth__list,
	.gmth__legend,
	.gmth-dialog {
		display: none;
	}
}
