/* Fortschritt im Eignungsformular (inc/form-progress.php). Claude Design «00 Fortschritt Fragebogen»:
   vier Phasen mit Kreis und Linien, erledigt = Navy mit Haken, aktuell = Navy mit Zahl und Ring, kommend = weiss mit Zahl.
   Ergänzt (04.11.2026): Die Linie zur nächsten Phase füllt sich mit jeder beantworteten Frage der aktuellen Phase.
   Werte wie lx-circle--brand / --card / --num, lx-line, lx-tone-* im Muster. Mobil (unter 760 px Fensterbreite) nur die
   Beschriftung des aktuellen Schritts sichtbar, die übrigen bleiben für Screenreader lesbar. */

/* Eingebaute FF-Anzeige «Step x of 20» ausblenden (stand bisher im Inline-CSS von Snippet 58) */
.fluentform .ff-step-header.ff-step-header--progress {
	display: none;
}

/* width: 100%, weil die Leiste in einer Flex-Spalte (Legacy-Layout) liegt und mit margin auto sonst schrumpft */
.lx-fq {
	box-sizing: border-box;
	width: 100%;
	max-width: var(--lx-measure);
	margin-inline: auto;
	padding: var(--lx-space-xl) 20px var(--lx-space-lg);
	font-family: var(--font-text);
}

.lx-fq .lx-fq__list {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	margin: 0;
}

.lx-fq .lx-fq__item {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--lx-space-sm);
}

.lx-fq .lx-fq__track {
	display: flex;
	align-items: center;
	width: 100%;
}

/* Linie grau, Navy-Füllung per ::after. --lx-fq-fill (0 bis 1) setzt das Script pro Linienhälfte nach dem Stand
   innerhalb der aktuellen Phase; die Klassenregeln unten sind nur der Stand ohne Script. */
.lx-fq .lx-fq__line {
	position: relative;
	flex: 1;
	height: var(--lx-border-width-strong);
	background: var(--lx-border);
}

.lx-fq .lx-fq__line::after {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--lx-color-brand);
	transform: scaleX(var(--lx-fq-fill, 0));
	transform-origin: left center;
	transition: transform var(--lx-duration-fast) var(--lx-ease-standard);
}

.lx-fq .lx-fq__item--done .lx-fq__line,
.lx-fq .lx-fq__item--current .lx-fq__line--before {
	--lx-fq-fill: 1;
}

.lx-fq .lx-fq__item:first-child .lx-fq__line--before,
.lx-fq .lx-fq__item:last-child .lx-fq__line--after {
	background: transparent;
}

.lx-fq .lx-fq__item:first-child .lx-fq__line--before::after,
.lx-fq .lx-fq__item:last-child .lx-fq__line--after::after {
	display: none;
}

/* Kreis: kommend */
.lx-fq .lx-fq__circle {
	border: var(--lx-border-width) solid var(--lx-border);
	background: var(--lx-surface-card);
	color: var(--lx-color-text-muted);
	font-size: var(--lx-text-title);
	font-weight: var(--lx-weight-semibold);
	font-variant-numeric: tabular-nums;
}

.lx-fq .lx-fq__check {
	display: none;
}

/* Kreis: erledigt und aktuell */
.lx-fq .lx-fq__item--done .lx-fq__circle,
.lx-fq .lx-fq__item--current .lx-fq__circle {
	border-color: var(--lx-color-brand);
	background: var(--lx-color-brand);
	color: var(--lx-color-on-brand);
}

.lx-fq .lx-fq__item--done .lx-fq__check {
	display: block;
}

.lx-fq .lx-fq__item--done .lx-fq__num {
	display: none;
}

.lx-fq .lx-fq__item--current .lx-fq__circle {
	box-shadow: 0 0 0 var(--lx-border-width-ring) var(--lx-surface-accent);
}

/* Beschriftung */
.lx-fq .lx-fq__label {
	font-size: var(--lx-text-small);
	line-height: var(--lx-leading-snug);
	text-align: center;
	color: var(--lx-color-text-muted);
	hyphens: manual;
}

.lx-fq .lx-fq__item--done .lx-fq__label {
	color: var(--lx-color-text);
}

.lx-fq .lx-fq__item--current .lx-fq__label {
	font-weight: var(--lx-weight-semibold);
	color: var(--lx-color-brand);
}

.lx-fq .lx-fq__done-note {
	display: none;
}

.lx-fq .lx-fq__item--done .lx-fq__done-note {
	display: inline;
}

@container (max-width: 759px) {
	/* Mobil weniger Abstand zum Formular darunter (12 statt 16) */
	.lx-fq {
		padding-bottom: var(--lx-space-md);
	}

	.lx-fq .lx-fq__label {
		font-size: var(--lx-text-caption);
	}

	.lx-fq .lx-fq__item:not(.lx-fq__item--current) .lx-fq__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0, 0, 0, 0);
		white-space: nowrap;
	}

	.lx-fq .lx-fq__item--current .lx-fq__label {
		white-space: nowrap;
	}
}

/* ---------- Auswertung («Spinner») nach der letzten Frage (inc/form-progress.php, leanwell_form_analyse_html) ----------
   Optik und Bewegung aus dem Design-System, Komponente «Auswertung» (components.css Abschnitt 20, lx-analysis). Hier nur
   das Layout, das im Muster der Seitenrahmen trägt: unter der Leiste vertikal mittig mit Abstand oben/unten wie im Muster
   (Seite mit 4xl), und verborgen, solange keine Auswertung läuft (lx-analysis setzt display: flex). */
.lx-analysis[hidden] {
	display: none;
}

.lx-fq + .lx-analysis {
	justify-content: center;
	min-height: 60vh;
	min-height: 60svh;
	padding-block: var(--lx-space-xl) var(--lx-space-4xl);
}
