/*
 * Farben folgen der Website-Palette (Design → Editor → Stile → Farben):
 * Accent 3 = Hauptfarbe für Schrift, Buttons, Links; Accent 2 = Kartenfarbe;
 * Accent 1 = helle Flächen; Contrast = Text. Abstufungen werden per
 * color-mix() daraus abgeleitet, damit eine Palettenänderung überall greift.
 */
:root {
	--tha-akzent: var(--wp--preset--color--accent-3, #404040);
	--tha-karte: var(--wp--preset--color--accent-2, #fbb369);
	--tha-karte-text: var(--wp--preset--color--accent-3, #404040);
	--tha-auf-akzent: #fff;
	--tha-text: var(--wp--preset--color--contrast, #202521);
	--tha-sand: var(--wp--preset--color--accent-1, #fdf7eb);
	--tha-flaeche: color-mix(in srgb, var(--tha-sand) 40%, #fff);
	--tha-akzent-dunkel: color-mix(in srgb, var(--tha-akzent) 80%, #000);
	--tha-akzent-text: color-mix(in srgb, var(--tha-karte) 55%, #000);
	--tha-linie: color-mix(in srgb, var(--tha-text) 12%, var(--tha-sand));
	--tha-linie-innen: color-mix(in srgb, var(--tha-text) 8%, var(--tha-sand));
	--tha-label: color-mix(in srgb, var(--tha-text) 75%, var(--tha-sand));
	--tha-text-leise: color-mix(in srgb, var(--tha-text) 85%, var(--tha-sand));
}

.tha-medien {
	display: grid;
	gap: 24px;
}

.tha-tier-der-woche {
	position: relative;
	display: grid;
	grid-template-columns: minmax(0, 1.05fr) minmax(380px, 0.95fr);
	overflow: hidden;
	box-sizing: border-box;
	width: min(100%, var(--wp--style--global--wide-size, 1200px));
	max-width: calc(100vw - 32px);
	margin: clamp(24px, 4vw, 56px) auto;
	border: 1px solid color-mix(in srgb, var(--tha-akzent) 14%, transparent);
	border-radius: 28px;
	background: var(--tha-flaeche);
	color: var(--tha-text);
	box-shadow: 0 18px 50px color-mix(in srgb, var(--tha-akzent) 8%, transparent);
}

.tha-tier-der-woche,
.tha-tier-der-woche * {
	box-sizing: border-box;
}

.tha-tier-der-woche.alignwide {
	width: min(100%, var(--wp--style--global--wide-size, 1200px)) !important;
	max-width: calc(100vw - 32px) !important;
	margin-inline: auto !important;
}

.tha-tier-der-woche.alignfull {
	width: calc(100vw - 32px) !important;
	max-width: none !important;
	margin-inline: auto !important;
}

.tha-tier-der-woche__bild {
	display: grid;
	place-items: center;
	min-width: 0;
	min-height: var(--tha-highlight-image-min-height, 440px);
	background: color-mix(in srgb, var(--tha-karte) 25%, var(--tha-sand));
	line-height: 0;
}

.tha-tier-der-woche__bild img,
.tha-tier-der-woche__platzhalter {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
	object-position: center var(--tha-highlight-image-y, 50%);
}

.tha-tier-der-woche__platzhalter {
	display: grid;
	place-items: center;
	min-height: var(--tha-highlight-image-min-height, 440px);
	padding: 32px;
	background: linear-gradient(135deg, color-mix(in srgb, var(--tha-karte) 30%, var(--tha-sand)), var(--tha-sand));
	color: var(--tha-akzent);
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
}

.tha-tier-der-woche__inhalt {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-width: 0;
	padding: clamp(36px, 5vw, 72px);
	text-align: left;
}

.tha-tier-der-woche__label {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 0 0 14px;
	color: var(--tha-akzent-text);
	font-size: clamp(0.84rem, 1.1vw, 1rem);
	font-weight: 800;
	letter-spacing: 0.075em;
	line-height: 1.2;
	text-transform: uppercase;
}

.tha-tier-der-woche__label::before,
.tha-tier-der-woche__label::after {
	width: 28px;
	height: 2px;
	background: currentColor;
	content: "";
}

.tha-tier-der-woche h2 {
	margin: 10px 0 18px;
	font-size: clamp(3rem, 6vw, 5rem);
	line-height: 0.95;
}

.tha-tier-der-woche h2 a {
	color: var(--tha-akzent);
	text-decoration: none;
}

.tha-tier-der-woche h2 a:hover,
.tha-tier-der-woche h2 a:focus-visible {
	color: var(--tha-akzent-dunkel);
	text-decoration: none;
}

.tha-tier-der-woche__beschreibung {
	max-width: 36rem;
	margin: 0 0 28px;
	font-size: clamp(1rem, 1.35vw, 1.2rem);
	line-height: 1.55;
}

.tha-tier-der-woche__fakten {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px 24px;
	margin: 0 0 30px;
	padding: 16px 18px;
	border: 1px solid color-mix(in srgb, var(--tha-akzent) 16%, transparent);
	border-radius: 16px;
	background: color-mix(in srgb, var(--tha-karte) 8%, #fff);
}

.tha-tier-der-woche__fakt {
	display: grid;
	gap: 2px;
	box-sizing: border-box;
	min-width: 0;
	padding: 2px 0;
}

.tha-tier-der-woche__fakt:last-child {
	grid-column: 1 / -1;
}

.tha-tier-der-woche__fakt-label {
	color: var(--tha-label);
	font-size: 0.7rem;
	font-weight: 800;
	letter-spacing: 0.04em;
	line-height: 1.25;
	text-transform: uppercase;
}

.tha-tier-der-woche__fakt-text {
	min-width: 0;
	overflow-wrap: anywhere;
	font-weight: 650;
	line-height: 1.3;
}

.tha-tier-der-woche__aktionen {
	display: flex;
	align-items: center;
	gap: 22px;
	flex-wrap: wrap;
}

.tha-tier-der-woche__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 48px;
	padding: 12px 20px;
	border-radius: 999px;
	background: var(--tha-highlight-accent, var(--tha-karte));
	color: var(--tha-text);
	font-weight: 700;
	text-decoration: none;
	transition: filter 0.18s ease, transform 0.18s ease;
}

.tha-tier-der-woche__link:is(:hover, :focus-visible) {
	background: var(--tha-highlight-accent, var(--tha-karte));
	color: var(--tha-text);
	filter: brightness(0.94);
	transform: translateY(-1px);
}

.tha-tier-der-woche__link:focus-visible {
	outline: 3px solid color-mix(in srgb, var(--tha-akzent) 28%, transparent);
	outline-offset: 3px;
}

.tha-tier-der-woche__alle {
	color: var(--tha-akzent);
	font-weight: 700;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 5px;
}

.tha-tier-der-woche__alle:hover,
.tha-tier-der-woche__alle:focus-visible {
	color: var(--tha-akzent-dunkel);
}

/* Auf Desktop und Notebook bleibt das Wochen-Tier kompakt und vollständig erfassbar. */
@media (min-width: 901px) {
	.tha-tier-der-woche {
		height: clamp(410px, 44vh, 460px);
		min-height: 0;
	}

	.tha-tier-der-woche__bild {
		height: 100%;
		min-height: 0;
		overflow: hidden;
	}

	.tha-tier-der-woche__inhalt {
		padding: 20px 30px;
	}

	.tha-tier-der-woche__label {
		margin-bottom: 4px;
	}

	.tha-tier-der-woche h2 {
		margin: 2px 0 8px;
		font-size: clamp(2.5rem, 4vw, 3.35rem);
	}

	.tha-tier-der-woche__beschreibung {
		margin-bottom: 12px;
		font-size: 0.95rem;
		line-height: 1.38;
	}

	.tha-tier-der-woche__fakten {
		gap: 6px 20px;
		margin-bottom: 14px;
		padding: 10px 14px;
	}

	.tha-tier-der-woche__fakt {
		gap: 1px;
		padding: 1px 0;
	}

	.tha-tier-der-woche__fakt-label {
		font-size: 0.62rem;
	}

	.tha-tier-der-woche__link {
		min-height: 42px;
		padding-block: 9px;
	}
}

@media (max-width: 900px) {
	.tha-tier-der-woche {
		grid-template-columns: 1fr;
	}

	.tha-tier-der-woche__bild {
		min-height: min(var(--tha-highlight-image-min-height, 440px), 68vh);
	}

	.tha-tier-der-woche__inhalt {
		padding: clamp(30px, 7vw, 52px);
	}

	/*
	 * Sobald Bild und Text untereinander stehen, wird die Karte sehr hoch.
	 * Der Steckbrief-Kasten entfällt deshalb, der Beschreibungstext bleibt:
	 * der Text weckt Interesse, die Daten stehen vollständig auf der
	 * Steckbriefseite, einen Fingertipp entfernt.
	 */
	.tha-tier-der-woche__fakten {
		display: none;
	}
}

@media (max-width: 560px) {
	.tha-tier-der-woche,
	.tha-tier-der-woche.alignwide,
	.tha-tier-der-woche.alignfull {
		width: calc(100% - 20px) !important;
		max-width: 540px !important;
		margin: 16px auto 28px !important;
		border-radius: 18px;
		grid-template-rows: auto auto;
		align-items: start;
		align-content: start;
	}

	.tha-tier-der-woche__bild {
		display: block;
		align-self: start;
		width: 100%;
		height: clamp(260px, 78vw, 320px);
		min-height: 0 !important;
		max-height: 320px;
		aspect-ratio: auto;
		overflow: hidden;
	}

	.tha-tier-der-woche__bild img,
	.tha-tier-der-woche__platzhalter {
		display: block;
		width: 100%;
		height: 100% !important;
		min-height: 0 !important;
		max-height: none;
		object-fit: cover;
	}

	.tha-tier-der-woche__platzhalter {
		min-height: 0;
	}

	.tha-tier-der-woche__inhalt {
		z-index: 1;
		margin-top: -12px;
		padding: 18px 14px;
		border-radius: 18px 18px 0 0;
		background: var(--tha-flaeche);
		box-shadow: 0 -5px 16px color-mix(in srgb, var(--tha-akzent) 6%, transparent);
		text-align: center;
	}

	.tha-tier-der-woche__label {
		justify-content: center;
		gap: 8px;
		margin-bottom: 6px;
		font-size: 0.66rem;
	}

	.tha-tier-der-woche__label::before,
	.tha-tier-der-woche__label::after {
		width: 14px;
	}

	.tha-tier-der-woche h2 {
		margin: 0 0 4px;
		font-size: clamp(2.35rem, 12vw, 3rem);
		text-align: center;
	}

	.tha-tier-der-woche__beschreibung {
		margin: 0 auto 12px;
		font-size: 0.88rem;
		line-height: 1.4;
		text-align: center;
	}

	.tha-tier-der-woche__beschreibung {
		margin-bottom: 18px;
	}

	.tha-tier-der-woche__aktionen {
		flex-direction: column;
		align-items: stretch;
		gap: 9px;
		width: 100%;
	}

	.tha-tier-der-woche__link {
		width: 100%;
		min-height: 42px;
		padding: 9px 12px;
		font-size: 0.94rem;
	}

	.tha-tier-der-woche__alle {
		align-self: center;
		font-size: 0.9rem;
	}
}

.tha-galerie__hauptbild img {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	object-fit: contain;
	border-radius: 12px;
	background: rgba(32, 37, 33, 0.05);
}

.tha-galerie__auswahl {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(68px, 1fr));
	gap: 8px;
	margin-top: 8px;
}

.tha-galerie__miniatur {
	padding: 0;
	border: 2px solid transparent;
	border-radius: 8px;
	background: transparent;
	cursor: pointer;
}

.tha-galerie__miniatur img {
	display: block;
	width: 100%;
	aspect-ratio: 1;
	object-fit: cover;
	border-radius: 6px;
}

.tha-galerie__miniatur:is(:hover, :focus-visible, .is-active) {
	border-color: var(--tha-karte);
	outline: none;
}

.tha-tier-video h2 {
	margin-top: 0;
}

.tha-tier-video video {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	max-height: 70vh;
	object-fit: contain;
	border-radius: 12px;
	background: #202521;
}

.tha-kontakt {
	margin-top: 32px;
	padding: 24px;
	border-radius: 12px;
	background: #fff;
}

.tha-kontakt h2 {
	margin-top: 0;
}

.tha-kontakt p:last-child {
	margin-bottom: 0;
}

.tha-breadcrumb {
	margin: 0 0 20px;
	color: color-mix(in srgb, var(--tha-text) 70%, var(--tha-sand));
	font-size: 0.9rem;
}

.tha-breadcrumb ol {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	align-items: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tha-breadcrumb li {
	display: inline-flex;
	align-items: center;
	margin: 0;
}

.tha-breadcrumb li:not(:last-child)::after {
	margin-left: 6px;
	color: color-mix(in srgb, var(--tha-text) 45%, var(--tha-sand));
	content: "›";
}

.tha-breadcrumb a {
	color: var(--tha-akzent);
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
}

.tha-breadcrumb a:hover {
	color: var(--tha-akzent-text);
}

.tha-weitere-tiere {
	width: 100%;
	margin: 56px 0 0;
}

.tha-weitere-tiere > h2 {
	margin-bottom: 28px;
	text-align: left;
}

.tha-weitere-tiere__raster,
.tha-tierliste__raster {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
	align-items: start;
}

.tha-tierkarte {
	align-self: start;
	overflow: hidden;
	margin: 0 !important;
	border-radius: 16px;
	background: var(--tha-karte);
	box-shadow: 0 8px 24px color-mix(in srgb, var(--tha-text) 8%, transparent);
	transition: transform 180ms ease, box-shadow 180ms ease;
}

.tha-tierkarte a {
	display: block;
	height: auto;
	margin: 0 !important;
	color: var(--tha-karte-text);
	text-decoration: none;
}

.tha-tierkarte a > * {
	margin-block: 0 !important;
}

.tha-tierkarte__bild {
	overflow: hidden;
	margin: 0 !important;
	aspect-ratio: 4 / 3;
	background: var(--tha-linie);
	line-height: 0;
}

.tha-tierkarte__bild img {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0 !important;
	object-fit: cover;
	object-position: center 25%;
	transition: transform 180ms ease;
}

.tha-tierkarte__inhalt {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	min-height: 0;
	padding: 14px 16px 16px;
}

.tha-tierkarte h3 {
	margin: 0 !important;
	color: inherit;
	font-size: clamp(1.4rem, 2vw, 1.5rem);
	line-height: 1.15;
	text-align: center;
}

/* Geschlecht, Altersgruppe und Größe aus den Steckbriefdaten. */
.tha-tierkarte__meta {
	margin: 0 !important;
	color: var(--tha-karte-text);
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
	text-align: center;
}

.tha-tierkarte:is(:hover, :focus-within) {
	transform: translateY(-4px);
	box-shadow: 0 14px 34px color-mix(in srgb, var(--tha-text) 14%, transparent);
}

.tha-tierkarte a:is(:hover, :focus-visible) .tha-tierkarte__bild img {
	transform: scale(1.025);
}

.tha-tierkarte a:focus-visible {
	outline: 3px solid var(--tha-karte);
	outline-offset: -3px;
}

/* Zwischenschritt für Tablets: drei Karten werden sonst zu schmal. */
@media (max-width: 1000px) {
	.tha-weitere-tiere__raster,
	.tha-tierliste__raster {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 20px;
	}
}

@media (max-width: 760px) {
	.tha-weitere-tiere__raster,
	.tha-tierliste__raster {
		grid-template-columns: 1fr;
		gap: 16px;
	}

}

.tha-steckbrief dl {
	margin: 0;
}

.tha-steckbrief__zeile {
	display: grid;
	grid-template-columns: minmax(160px, 1fr) 2fr;
	gap: 16px;
	padding: 10px 0;
	border-bottom: 1px solid var(--tha-linie);
}

.tha-steckbrief__zeile dt {
	font-weight: 600;
}

.tha-steckbrief__zeile dd {
	margin: 0;
}

.tha-merkmale {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.tha-merkmale li {
	display: inline-block;
	padding: 3px 12px;
	border-radius: 999px;
	background: var(--tha-sand);
	border: 1px solid var(--tha-linie);
	font-size: 0.9em;
	line-height: 1.5;
}

@media (max-width: 600px) {
	.tha-steckbrief__zeile {
		grid-template-columns: 1fr;
		gap: 2px;
	}
}

/* Tierliste (Block) */

.tha-tierliste {
	width: 100%;
}

.tha-tierliste__anzahl {
	margin: 0 0 18px;
	color: var(--tha-text-leise);
	font-size: 1rem;
	font-weight: 500;
}

.tha-tierliste__leer {
	padding: 24px;
	border-radius: 12px;
	background: var(--tha-sand);
	border: 1px solid var(--tha-linie);
}

/* Ausweg aus einer Auswahl, die wenig oder nichts übrig lässt. */
.tha-tierliste__cta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 16px 28px;
	margin-top: 28px;
	padding: 22px 26px;
	border-radius: 16px;
	background: var(--tha-sand);
	border: 1px solid var(--tha-linie);
}

.tha-tierliste__cta-text {
	max-width: 46rem;
	color: var(--tha-text-leise);
	line-height: 1.5;
}

.tha-tierliste__cta-text strong {
	display: block;
	color: var(--tha-akzent);
	font-weight: 600;
}

.tha-tierliste__cta-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 24px;
	border-radius: 8px;
	background: var(--tha-akzent);
	color: var(--tha-sand);
	font-weight: 600;
	text-decoration: none;
	white-space: nowrap;
}

.tha-tierliste__cta-link:is(:hover, :focus-visible) {
	color: var(--tha-sand);
	filter: brightness(0.94);
}

@media (max-width: 600px) {
	.tha-tierliste__cta {
		padding: 18px 16px;
	}

	.tha-tierliste__cta-link {
		width: 100%;
	}
}

.tha-tierliste__seiten {
	margin-top: 32px;
}

.tha-tierliste__seiten ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.tha-tierliste__seiten li > .page-numbers {
	display: inline-block;
	min-width: 40px;
	padding: 8px 12px;
	border-radius: 999px;
	background: var(--tha-sand);
	border: 1px solid var(--tha-linie);
	color: var(--tha-akzent);
	text-align: center;
	text-decoration: none;
}

.tha-tierliste__seiten .page-numbers.current {
	background: var(--tha-akzent);
	border-color: var(--tha-akzent);
	color: var(--tha-auf-akzent);
}

.tha-tierliste__seiten a.page-numbers:is(:hover, :focus-visible) {
	background: var(--tha-karte);
}

.tha-tierliste__jahre ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
}

.tha-tierliste__jahre a {
	display: inline-block;
	padding: 8px 16px;
	border-radius: 999px;
	background: var(--tha-sand);
	border: 1px solid var(--tha-linie);
	color: var(--tha-akzent);
	font-weight: 600;
	text-decoration: none;
}

.tha-tierliste__jahre a[aria-current="page"] {
	background: var(--tha-akzent);
	border-color: var(--tha-akzent);
	color: var(--tha-auf-akzent);
}

/*
 * Farben und Linien der Tierliste an einer Stelle.
 * Die Werte kommen aus den Theme-Farben des Website-Editors; ändert sich dort
 * eine Farbe, folgen Filter und Karten automatisch. Die Werte hinter dem Komma
 * greifen nur, falls das Theme einmal ohne diese Farben läuft.
 */

/* Farben: siehe Variablen am Dateianfang (folgen der Website-Palette). */

/* Besucher-Filter */

.tha-filter {
	display: flex;
	flex-direction: column;
	margin: 0 0 28px;
	padding: 22px 26px 18px;
	border-radius: 16px;
	background: var(--tha-flaeche);
	border: 1px solid var(--tha-linie);
}

.tha-filter__inhalt {
	display: flex;
	flex-direction: column;
	gap: 18px;
}

/*
 * Die Gruppen stehen in gleich breiten Spalten. 480px ist so gewählt, dass auch
 * die langen Beschriftungen ("Mittelgroßer Hund") in eine Zeile passen; dadurch
 * sind alle Gruppen gleich hoch und die Spalten stehen bündig. Schmale Fenster
 * bekommen automatisch eine Spalte.
 */
.tha-filter__gruppen {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 480px), 1fr));
	align-items: start;
	align-content: start;
	gap: 22px 36px;
}

/*
 * Die drei offenen Gruppen sollen in eine Zeile passen. Die ersten beiden
 * nehmen genau ihre Breite, die dritte den Rest - sonst bricht die längste
 * Gruppe um und der Filter wird eine Zeile höher.
 */
@media (min-width: 1000px) {
	.tha-filter__gruppen--primaer {
		grid-template-columns: repeat(2, max-content) minmax(0, 1fr);
	}
}

/*
 * "Filtern": nur auf schmalen Displays sichtbar. Am Schreibtisch steht der
 * Filter immer offen.
 */
.tha-filter__schalter {
	display: none;
}

.tha-filter__panel > summary::-webkit-details-marker {
	display: none;
}

.tha-filter__mehr > summary::-webkit-details-marker {
	display: none;
}

/* Aufklappbereich für die selteneren Merkmale. */
.tha-filter__mehr {
	margin-top: 2px;
	padding-top: 18px;
	border-top: 1px solid var(--tha-linie-innen);
}

.tha-filter__mehr > summary {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 44px;
	color: var(--tha-akzent);
	font-size: 0.94rem;
	font-weight: 600;
	list-style: none;
	cursor: pointer;
}

.tha-filter__mehr > summary:focus-visible {
	outline: 3px solid var(--tha-akzent-text);
	outline-offset: 2px;
}

.tha-filter__mehr-namen {
	color: var(--tha-label);
	font-size: 0.875rem;
	font-weight: 400;
}

/* Winkel, aus zwei Rahmenlinien gezeichnet. */
.tha-filter__mehr > summary::after,
.tha-filter__schalter::after {
	flex: none;
	width: 8px;
	height: 8px;
	border: solid currentColor;
	border-width: 0 2px 2px 0;
	transform: translateY(-2px) rotate(45deg);
	content: "";
}

.tha-filter__mehr[open] > summary::after,
.tha-filter__panel[open] > .tha-filter__schalter::after {
	transform: translateY(2px) rotate(-135deg);
}

.tha-filter__mehr[open] > summary {
	margin-bottom: 16px;
}

.tha-filter__gruppe {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.tha-filter__gruppe legend {
	margin-bottom: 10px;
	padding: 0;
	color: var(--tha-label);
	font-size: 0.75rem;
	font-weight: 800;
	letter-spacing: 0.06em;
	line-height: 1.25;
	text-transform: uppercase;
}

.tha-filter__optionen {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

/* Bedienfläche mindestens 44px hoch, damit sie am Handy sicher zu treffen ist. */
.tha-filter__option {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 0 18px;
	border-radius: 999px;
	background: #fff;
	border: 1px solid var(--tha-linie);
	font-size: 0.94rem;
	font-weight: 500;
	line-height: 1.25;
	cursor: pointer;
	transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease;
}

.tha-filter__option input {
	margin: 0;
	accent-color: var(--tha-akzent);
}

.tha-filter__option:hover {
	border-color: var(--tha-akzent);
}

.tha-filter__option:has(:checked) {
	background: var(--tha-akzent);
	border-color: var(--tha-akzent);
	color: #fff;
	font-weight: 600;
}

.tha-filter__option:has(:focus-visible) {
	outline: 3px solid var(--tha-akzent-text);
	outline-offset: 2px;
}

/*
 * Ohne Kästchen: das Ankreuzfeld wird unsichtbar, bleibt aber für Tastatur und
 * Screenreader vorhanden. Nur für Browser, die :has() können - ältere Browser
 * behalten das sichtbare Kästchen und damit eine bedienbare Anzeige.
 */
@supports selector(:has(*)) {
	.tha-filter__option input {
		position: absolute;
		width: 1px;
		height: 1px;
		padding: 0;
		border: 0;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	/* Haken vor der aktiven Auswahl, aus Rahmenlinien gezeichnet. */
	.tha-filter__option:has(:checked) {
		padding-left: 15px;
	}

	.tha-filter__option:has(:checked)::before {
		flex: none;
		width: 6px;
		height: 11px;
		margin-right: 1px;
		border: solid currentColor;
		border-width: 0 2px 2px 0;
		transform: translateY(-1px) rotate(45deg);
		content: "";
	}

}

.tha-filter__fuss {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	width: 100%;
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--tha-linie-innen);
}

.tha-filter__treffer {
	margin: 0 auto 0 0;
	font-size: 1rem;
}

.tha-filter__submit {
	align-self: flex-start;
	min-height: 48px;
	padding: 12px 24px;
	border: 0;
	border-radius: 8px;
	background: var(--tha-akzent);
	color: var(--tha-sand);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
}

.tha-filter__submit:hover {
	filter: brightness(0.94);
}

/*
 * Am Schreibtisch filtert die Liste sich beim Anklicken selbst, der Knopf
 * entfällt. Auf schmalen Displays bleibt er, weil dort erst der Knopf absendet.
 */
.tha-filter.is-js:not(.is-schmal) .tha-filter__submit {
	display: none;
}

.tha-filter__reset {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--tha-akzent);
	font-size: 0.94rem;
	font-weight: 600;
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 4px;
}

/* Karten-Badges und Platzhalter */

.tha-tierkarte__bild {
	position: relative;
}

.tha-tierkarte__badges {
	position: absolute;
	top: 10px;
	left: 10px;
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	line-height: 1;
}

.tha-tierkarte__badge {
	display: inline-block;
	padding: 6px 11px;
	border-radius: 999px;
	background: var(--tha-sand);
	color: var(--tha-akzent);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.2;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

.tha-tierkarte__badge--notfall {
	background: #c0392b;
	color: #fff;
}

.tha-tierkarte__badge--reserviert {
	background: var(--tha-karte);
	color: var(--tha-akzent);
}

.tha-tierkarte__badge--vermittelt {
	background: var(--tha-akzent);
	color: var(--tha-auf-akzent);
}

.tha-tierkarte__platzhalter {
	display: grid;
	place-items: center;
	width: 100%;
	height: 100%;
	font-size: 3rem;
	line-height: 1;
}

/* Grenze muss zur Abfrage in tierliste.js passen. */
@media (max-width: 600px) {
	.tha-filter {
		padding: 14px 16px 16px;
	}

	/* Hier wird aus dem Filterkasten ein aufklappbarer Bereich. */
	.tha-filter__schalter {
		display: flex;
		align-items: center;
		gap: 10px;
		min-height: 48px;
		color: var(--tha-akzent);
		font-size: 1rem;
		font-weight: 600;
		list-style: none;
		cursor: pointer;
	}

	.tha-filter__schalter:focus-visible {
		outline: 3px solid var(--tha-akzent-text);
		outline-offset: 2px;
	}

	.tha-filter__zaehler {
		display: inline-grid;
		place-items: center;
		min-width: 22px;
		height: 22px;
		padding: 0 6px;
		border-radius: 999px;
		background: var(--tha-akzent-text);
		color: var(--tha-akzent);
		font-size: 0.8rem;
		font-weight: 800;
		line-height: 1;
	}

	.tha-filter__panel[open] > .tha-filter__schalter {
		margin-bottom: 16px;
		padding-bottom: 14px;
		border-bottom: 1px solid var(--tha-linie-innen);
	}

	.tha-filter__fuss {
		margin-top: 14px;
		padding-top: 14px;
	}

	/* Die Aufzählung der Gruppen bräuchte hier eine zweite Zeile. */
	.tha-filter__mehr-namen {
		display: none;
	}

	.tha-filter__mehr > summary {
		gap: 8px;
	}

	.tha-filter__mehr-text {
		margin-right: auto;
	}

	.tha-filter__submit {
		align-self: stretch;
		width: 100%;
	}
}
