/**
 * des-formblock – Skalabewertung und Matrix.
 *
 * Die Akzentfarbe kommt aus dem Theme, wenn es eine hat: --uk-primary ist in
 * den designheit-Projekten gesetzt, der Wert dahinter greift sonst.
 */
.fb-scale,
.fb-matrix {
	--fb-accent: var(--uk-primary, #8f2b4b);
	/* Aus der Schriftfarbe gemischt, nicht aus einer festen Grauvariante: das
	   Formular steht auch in Abschnitten mit hellgrauem oder farbigem Grund,
	   wo eine feste Linie entweder verschwindet oder zu hart sitzt. */
	--fb-linie: color-mix(in srgb, currentColor 15%, transparent);
	/* --form-flaeche kommt aus dem Theme und wandert dort mit dem Grund des
	   Abschnitts. So tragen Stufen und Matrix denselben Grund wie die
	   Eingabefelder daneben; ohne Theme bleibt es bei Weiss. */
	--fb-flaeche: var(--form-flaeche, var(--uk-white, #fff));
	--fb-leer: color-mix(in srgb, currentColor 35%, transparent);
}

/* =Skala: Sterne
   Reihenfolge im Markup ist umgekehrt, row-reverse dreht sie fuer das Auge
   zurueck. Damit erreicht der Geschwister-Selektor alle kleineren Sterne.
-----------------------------------------------------------------------------*/
.fb-scale--sterne {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
	gap: 4px;
}
.fb-scale__radio {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
	border: 0;
}
.fb-scale__stern {
	color: var(--fb-leer);
	font-size: 1.9rem;
	line-height: 1.2;
	cursor: pointer;
	opacity: .35;
	transition: color .2s ease-in-out, opacity .2s ease-in-out;
}
.fb-scale--sterne:hover .fb-scale__stern,
.fb-scale__radio:checked ~ .fb-scale__stern {
	color: var(--fb-accent);
	opacity: 1;
}
/* Beim Ueberfahren zaehlt nur bis zum Stern unter dem Zeiger */
.fb-scale--sterne .fb-scale__stern:hover ~ .fb-scale__stern {
	color: var(--fb-leer);
	opacity: .35;
}
.fb-scale--sterne:hover .fb-scale__stern:hover,
.fb-scale--sterne:hover .fb-scale__stern:hover ~ .fb-scale__radio ~ .fb-scale__stern {
	color: var(--fb-accent);
	opacity: 1;
}
/* Sichtbarer Fokus, obwohl das Feld selbst ausgeblendet ist */
.fb-scale__radio:focus-visible + .fb-scale__stern {
	outline: 2px solid var(--fb-accent);
	outline-offset: 2px;
}

/* =Skala: Zahlen und Worte
-----------------------------------------------------------------------------*/
.fb-scale--zahlen,
.fb-scale--worte {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
}
.fb-scale__stufen {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 8px;
}
.fb-scale__stufe {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 2.6em;
	padding: 6px 12px;
	/* Helle Fläche mit Rand: so hebt sich die Stufe sowohl auf weissem als
	   auch auf hellgrauem Abschnittsgrund ab. */
	background-color: var(--fb-flaeche);
	border: 1px solid var(--fb-linie);
	border-radius: var(--uk-radius, 2px);
	cursor: pointer;
	line-height: 1.2;
	transition: background-color .2s ease-in-out, color .2s ease-in-out;
}
.fb-scale__stufe:hover {
	border-color: var(--fb-accent);
}
.fb-scale__stufe:has(.fb-scale__radio:checked) {
	background-color: var(--fb-accent);
	border-color: var(--fb-accent);
	color: #fff;
}
.fb-scale__stufe:has(.fb-scale__radio:focus-visible) {
	outline: 2px solid var(--fb-accent);
	outline-offset: 2px;
}
.fb-scale__ende {
	font-size: .85em;
	opacity: .75;
}
/* Ab Tablet stehen die Beschriftungen links und rechts der Stufen. Die Reihe
   darf dafuer nicht umbrechen – sonst rutscht die rechte Beschriftung in die
   naechste Zeile. Umbrochen wird stattdessen innerhalb der Stufen. */
@media (min-width: 640px) {
	.fb-scale--zahlen {
		flex-wrap: nowrap;
	}
	.fb-scale--zahlen .fb-scale__stufen {
		flex: 1 1 auto;
		min-width: 0;
	}
	.fb-scale--zahlen .fb-scale__ende {
		flex: 0 1 auto;
	}
}
.fb-scale--fehler .fb-scale__stufe,
.fb-scale--fehler .fb-scale__stern {
	box-shadow: 0 0 0 1px #f0506e;
}

/* =Matrix
-----------------------------------------------------------------------------*/
.fb-matrix {
	/* Viele Spalten passen nicht immer – dann schiebt sich die Tabelle seitlich */
	overflow-x: auto;
}
.fb-matrix__tabelle {
	width: 100%;
	border-collapse: collapse;
}
.fb-matrix__tabelle th,
.fb-matrix__tabelle td {
	padding: 8px 10px;
	text-align: center;
	vertical-align: middle;
	border-bottom: 1px solid var(--fb-linie);
}
.fb-matrix__tabelle thead th {
	font-size: .85em;
	font-weight: 600;
	line-height: 1.25;
	vertical-align: bottom;
}
/* Mit dem Tabellen-Vorsatz, sonst gewinnt die Grundregel fuer th/td darueber */
.fb-matrix__tabelle .fb-matrix__zeile {
	text-align: left;
	font-weight: 400;
}
.fb-matrix__tabelle tbody tr:hover {
	background-color: color-mix(in srgb, currentColor 6%, transparent);
}
.fb-matrix__wahl {
	display: block;
	cursor: pointer;
}
.fb-matrix__mobil-text {
	display: none;
}
.fb-matrix--fehler .fb-matrix__tabelle {
	box-shadow: 0 0 0 1px #f0506e;
}

/* Schmale Schirme: die Tabelle bricht in Bloecke auf. Der Spaltentitel steht
   dann an der Zelle selbst, sonst waere nicht mehr zu erkennen, was angekreuzt
   wird. */
@media (max-width: 640px) {
	.fb-matrix__tabelle,
	.fb-matrix__tabelle tbody,
	.fb-matrix__tabelle tr,
	.fb-matrix__tabelle td {
		display: block;
		width: 100%;
	}
	.fb-matrix__tabelle thead {
		display: none;
	}
	.fb-matrix__tabelle tr {
		margin-bottom: 20px;
	}
	.fb-matrix__tabelle .fb-matrix__zeile {
		display: block;
		padding-left: 0;
		font-weight: 600;
		border-bottom: 1px solid var(--fb-linie);
	}
	.fb-matrix__tabelle .fb-matrix__zelle {
		padding: 6px 0;
		text-align: left;
		border-bottom: 0;
	}
	.fb-matrix__mobil-text {
		display: inline;
		margin-left: 6px;
	}
	.fb-matrix__tabelle tbody tr:hover {
		background-color: transparent;
	}
}

/* Seitenauswahl: Karten zum Anwählen */
.des-pick__item {
	position: relative;
}
.des-pick__input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}
.des-pick__label {
	display: block;
	height: 100%;
	cursor: pointer;
	outline: 2px solid transparent;
	outline-offset: -2px;
	transition: outline-color .15s ease;
}
.des-pick__label:hover {
	outline-color: rgba(0, 0, 0, .2);
}
.des-pick__input:checked + .des-pick__label {
	outline-color: var(--fb-accent, currentColor);
}
.des-pick__input:focus-visible + .des-pick__label {
	outline-color: var(--fb-accent, currentColor);
	outline-style: dashed;
}
.des-pick__thumb {
	display: block;
	aspect-ratio: 4 / 3;
	overflow: hidden;
}
.des-pick__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.des-pick__title {
	display: block;
	padding: 8px 0;
	font-weight: 600;
}
/* Häkchen oben links, nur bei Auswahl */
.des-pick__check {
	position: absolute;
	top: 8px;
	left: 8px;
	display: none;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: rgba(255, 255, 255, 1);
	background: var(--fb-accent, rgba(0, 0, 0, 1));
}
.des-pick__input:checked + .des-pick__label .des-pick__check {
	display: inline-flex;
}
/* Link zur Seite oben rechts */
.des-pick__more {
	position: absolute;
	top: 8px;
	right: 8px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: rgba(0, 0, 0, 1);
	background: rgba(255, 255, 255, .9);
}
.des-pick__more:hover {
	color: rgba(0, 0, 0, 1);
	background: rgba(255, 255, 255, 1);
}

/* Summe (Preis pro Tag, Gesamtpreis) */
.des-summe__box {
	padding: 12px 16px;
	background: color-mix(in srgb, currentColor 6%, transparent);
}
.des-summe__row {
	display: flex;
	justify-content: space-between;
	gap: 16px;
}
.des-summe__row strong {
	white-space: nowrap;
}
.des-summe__row[hidden] {
	display: none;
}
.des-summe__row--total {
	margin-top: 4px;
	padding-top: 4px;
	border-top: 1px solid var(--fb-linie);
}
