/**
 * Salty Wizard – Frontend
 *
 * Anpassen über CSS-Variablen (im Backend unter „Design“ oder per eigenem CSS),
 * z. B.:
 *
 *   .sw-wizard { --sw-primary: #ff6600; --sw-radius: 4px; }
 *
 * Verfügbare Variablen:
 *   --sw-primary, --sw-primary-text, --sw-bg, --sw-text, --sw-border,
 *   --sw-choice-bg, --sw-choice-selected-bg, --sw-input-bg, --sw-error,
 *   --sw-font, --sw-font-size, --sw-radius, --sw-max-width, --sw-padding,
 *   --sw-gap, --sw-tile-min
 *
 * Nicht gesetzte Variablen fallen auf das Theme (bzw. neutrale Werte) zurück.
 *
 * Automatisches Design (.sw-wizard--auto): wizard.js liest Button-, Link- und
 * Eingabefeld-Stile des Themes aus und setzt sie als --sw-auto-* am Wizard.
 * Manuell gesetzte --sw-* Variablen haben immer Vorrang.
 */

.sw-wizard {
	--_primary: var(--sw-primary, var(--sw-auto-primary, #2563eb));
	--_on-primary: var(--sw-primary-text, var(--sw-auto-primary-text, #fff));
	--_border: var(--sw-border, var(--sw-auto-border, rgba(127, 127, 127, 0.35)));
	--_choice-bg: var(--sw-choice-bg, transparent);
	--_selected-bg: var(--sw-choice-selected-bg, color-mix(in srgb, var(--_primary) 10%, transparent));
	--_input-bg: var(--sw-input-bg, var(--sw-auto-input-bg, transparent));
	--_surface: var(--sw-bg, var(--sw-auto-surface, #fff));
	--_error: var(--sw-error, #d93025);
	--_radius: var(--sw-radius, var(--sw-auto-radius, 12px));
	--_btn-radius: var(--sw-radius, var(--sw-auto-btn-radius, var(--_radius)));
	--_input-radius: var(--sw-radius, var(--sw-auto-input-radius, calc(var(--_radius) * 0.66)));
	--_gap: var(--sw-gap, 12px);
	--_tile-min: var(--sw-tile-min, 150px);
	--_focus: color-mix(in srgb, var(--_primary) 45%, transparent);

	container: sw-wizard / inline-size;
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin-inline: auto;
	padding: var(--sw-padding, 0);
	background: var(--sw-bg, transparent);
	color: var(--sw-text, currentColor);
	font-family: var(--sw-font, inherit);
	font-size: var(--sw-font-size, inherit);
	line-height: 1.5;
	border-radius: var(--_radius);
	/* Platz für Sticky-Header beim automatischen Scrollen. */
	scroll-margin-top: var(--sw-scroll-offset, 100px);
}

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

/* Themes überschreiben [hidden] gelegentlich – hier ist es verbindlich. */
.sw-wizard [hidden] {
	display: none !important;
}

/* Fallback-Kette für die Akzentfarbe, falls die Erkennung nichts findet:
   Block-Themes, Elementor, Astra, Kadence, Blocksy. */
.sw-wizard--auto {
	--_primary: var(--sw-primary, var(--sw-auto-primary, var(--wp--preset--color--primary, var(--wp--preset--color--accent, var(--e-global-color-accent, var(--e-global-color-primary, var(--ast-global-color-0, var(--global-palette1, var(--theme-palette-color-1, #2563eb))))))))));
}

/* Bis das Theme ausgelesen ist kurz ausblenden – spätestens nach 1,5 s sichtbar, auch ohne JS. */
.sw-wizard--auto:not(.is-styled) {
	opacity: 0;
	animation: sw-reveal 0s 1.5s forwards;
}

.sw-wizard--auto.is-styled {
	transition: opacity 0.2s ease;
}

@keyframes sw-reveal {
	to { opacity: 1; }
}

/* ---------------------------------------------------------------- Breite */

.sw-wizard--w-content {
	max-width: var(--wp--style--global--content-size, 100%);
}

.sw-wizard--w-wide {
	max-width: var(--wp--style--global--wide-size, 100%);
}

.sw-wizard--w-full {
	max-width: none;
}

.sw-wizard--w-custom {
	max-width: var(--sw-max-width, 760px);
}

/* Volle Bildschirmbreite: bricht aus der Inhaltsspalte aus, Inhalt bleibt in Inhaltsbreite. */
.sw-wizard.sw-wizard--w-screen {
	width: auto;
	max-width: none;
	margin-inline: calc(50% - 50vw + var(--sw-scrollbar, 0px) / 2);
	padding-inline: max(var(--sw-padding, 20px), calc((100vw - var(--sw-scrollbar, 0px) - var(--wp--style--global--content-size, 800px)) / 2));
	border-radius: 0;
}

.sw-wizard--shadow {
	padding: var(--sw-padding, clamp(20px, 4vw, 40px));
	background: var(--_surface);
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* ---------------------------------------------------------------- Header */

.sw-wizard__header {
	margin-bottom: 1.5em;
}

/* Unten über den Buttons: Abstand zur Frage, Buttons rücken näher heran. */
.sw-wizard__header--above_nav {
	margin: 2em 0 0;
}

.sw-wizard__header--above_nav + .sw-nav {
	margin-top: 1.25em;
}

/* Ganz unten unter den Buttons. */
.sw-wizard__header--bottom {
	margin: 1.5em 0 0;
}

.sw-steps-indicator {
	margin-bottom: 0.5em;
	font-size: 0.875em;
	opacity: 0.75;
}

.sw-steps-indicator:empty {
	display: none;
}

.sw-progress {
	height: 6px;
	overflow: hidden;
	background: var(--_border);
	border-radius: 999px;
}

.sw-progress__bar {
	width: 0;
	height: 100%;
	background: var(--_primary);
	border-radius: inherit;
	transition: width 0.4s ease;
}

/* ----------------------------------------------------------------- Steps */

.sw-step__fieldset {
	min-width: 0;
	margin: 0;
	padding: 0;
	border: 0;
}

.sw-step__title,
.sw-result__title {
	margin: 0 0 0.5em;
	font-size: clamp(1.25em, 1em + 1.2vw, 1.75em);
	line-height: 1.25;
}

.sw-step__title:focus,
.sw-result__title:focus {
	outline: none;
}

.sw-required {
	color: var(--_error);
}

.sw-step__desc {
	margin-bottom: 1em;
	opacity: 0.85;
}

.sw-step__desc > :first-child {
	margin-top: 0;
}

.sw-step__desc > :last-child {
	margin-bottom: 0;
}

.sw-step__content {
	margin-top: 1.25em;
}

.sw-step__error {
	margin-top: 0.75em;
	color: var(--_error);
	font-size: 0.9em;
	font-weight: 600;
}

/* --------------------------------------------------------------- Choices */

.sw-choices {
	display: grid;
	gap: var(--_gap);
}

.sw-choices--buttons {
	grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
}

.sw-choices--tiles {
	grid-template-columns: repeat(auto-fill, minmax(min(var(--_tile-min), 100%), 1fr));
}

@container sw-wizard (min-width: 600px) {
	.sw-choices--tiles[style*="--sw-cols"] {
		grid-template-columns: repeat(var(--sw-cols), minmax(0, 1fr));
	}
}

.sw-choice {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.sw-choice__input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.sw-choice__body {
	position: relative;
	display: flex;
	align-items: center;
	gap: 0.75em;
	height: 100%;
	min-height: 48px;
	padding: 0.85em 1.1em;
	background: var(--_choice-bg);
	border: 2px solid var(--_border);
	border-radius: var(--_radius);
	transition: border-color 0.15s ease, background-color 0.15s ease, transform 0.15s ease;
}

.sw-choice:hover .sw-choice__body {
	border-color: color-mix(in srgb, var(--_primary) 55%, var(--_border));
}

.sw-choice__input:checked + .sw-choice__body {
	background: var(--_selected-bg);
	border-color: var(--_primary);
}

.sw-choice__input:focus-visible + .sw-choice__body {
	outline: 3px solid var(--_focus);
	outline-offset: 2px;
}

.sw-choice__input:disabled + .sw-choice__body {
	cursor: not-allowed;
	opacity: 0.5;
}

.sw-choice__text {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	gap: 0.15em;
	min-width: 0;
}

.sw-choice__label {
	font-weight: 600;
}

.sw-choice__desc {
	font-size: 0.875em;
	opacity: 0.75;
}

.sw-choice__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	font-size: 1.5em;
	line-height: 1;
}

.sw-choice__icon img {
	width: 1.5em;
	height: 1.5em;
	object-fit: contain;
}

/* Lucide-Icons: Farbe = Akzentfarbe (anpassbar über --sw-icon-color), Strichstärke über --sw-icon-stroke. */
.sw-choice__icon--svg {
	color: var(--sw-icon-color, var(--_primary));
}

.sw-icon {
	display: block;
	width: 1em;
	height: 1em;
	stroke-width: var(--sw-icon-stroke, 1.75);
}

.sw-choice__icon .dashicons {
	width: 1em;
	height: 1em;
	font-size: 1em;
}

.sw-choice__media {
	flex: 0 0 auto;
}

.sw-choice__media img {
	display: block;
	width: 48px;
	height: 48px;
	object-fit: cover;
	border-radius: calc(var(--_radius) * 0.5);
}

/* Auswahl-Indikator: Kreis (Einfachauswahl) bzw. Quadrat (Mehrfachauswahl). */
.sw-choice__check {
	position: relative;
	flex: 0 0 auto;
	width: 1.25em;
	height: 1.25em;
	margin-left: auto;
	border: 2px solid var(--_border);
	border-radius: 50%;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.sw-step--multi .sw-choice__check {
	border-radius: 4px;
}

.sw-choice__input:checked + .sw-choice__body .sw-choice__check {
	background: var(--_primary);
	border-color: var(--_primary);
}

.sw-choice__input:checked + .sw-choice__body .sw-choice__check::after {
	content: "";
	position: absolute;
	top: 45%;
	left: 50%;
	width: 0.3em;
	height: 0.6em;
	border: solid var(--_on-primary);
	border-width: 0 2px 2px 0;
	transform: translate(-50%, -50%) rotate(45deg);
}

/* Kacheln */
.sw-choices--tiles .sw-choice__body {
	flex-direction: column;
	justify-content: flex-start;
	padding: 1.25em 1em;
	text-align: center;
}

.sw-choices--tiles .sw-choice__text {
	align-items: center;
	justify-content: center;
}

.sw-choices--tiles .sw-choice__icon {
	font-size: 2.25em;
	margin-top: 0.15em;
}

.sw-choices--tiles .sw-choice__media {
	align-self: stretch;
}

.sw-choices--tiles .sw-choice__media img {
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
}

.sw-choices--tiles .sw-choice--has-media .sw-choice__body {
	padding-top: 0.75em;
}

.sw-choices--tiles .sw-choice__check {
	position: absolute;
	top: 0.6em;
	right: 0.6em;
	background: var(--sw-bg, var(--_choice-bg));
}

/* ---------------------------------------------------------------- Slider */

.sw-slider {
	padding: 0.5em 0;
}

.sw-slider__value {
	display: block;
	margin-bottom: 0.75em;
	font-size: 1.75em;
	font-weight: 700;
	text-align: center;
	font-variant-numeric: tabular-nums;
}

.sw-slider__input {
	--_fill: 50%;
	width: 100%;
	height: 28px;
	margin: 0;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	accent-color: var(--_primary);
}

.sw-slider__input:focus {
	outline: none;
}

.sw-slider__input::-webkit-slider-runnable-track {
	height: 6px;
	background: linear-gradient(to right, var(--_primary) var(--_fill), var(--_border) var(--_fill));
	border-radius: 999px;
}

.sw-slider__input::-moz-range-track {
	height: 6px;
	background: var(--_border);
	border-radius: 999px;
}

.sw-slider__input::-moz-range-progress {
	height: 6px;
	background: var(--_primary);
	border-radius: 999px;
}

.sw-slider__input::-webkit-slider-thumb {
	width: 24px;
	height: 24px;
	margin-top: -9px;
	background: var(--_primary);
	border: 3px solid var(--_surface);
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
	-webkit-appearance: none;
	appearance: none;
}

.sw-slider__input::-moz-range-thumb {
	width: 18px;
	height: 18px;
	background: var(--_primary);
	border: 3px solid var(--_surface);
	border-radius: 50%;
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
}

.sw-slider__input:focus-visible::-webkit-slider-thumb {
	box-shadow: 0 0 0 4px var(--_focus);
}

.sw-slider__input:focus-visible::-moz-range-thumb {
	box-shadow: 0 0 0 4px var(--_focus);
}

.sw-slider__scale {
	display: flex;
	justify-content: space-between;
	margin-top: 0.35em;
	font-size: 0.85em;
	opacity: 0.7;
}

/* ---------------------------------------------------------------- Upload */

.sw-upload__zone {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 0.35em;
	padding: 2em 1em;
	text-align: center;
	border: 2px dashed var(--_border);
	border-radius: var(--_radius);
	transition: border-color 0.15s ease, background-color 0.15s ease;
}

.sw-upload__zone:hover,
.sw-upload__zone.is-dragover {
	background: var(--_selected-bg);
	border-color: var(--_primary);
}

.sw-upload__zone:focus-within {
	outline: 3px solid var(--_focus);
	outline-offset: 2px;
}

.sw-upload__input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	cursor: pointer;
}

.sw-upload__icon {
	width: 2.25em;
	height: 2.25em;
	background: var(--_primary);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4'/%3E%3Cpolyline points='17 8 12 3 7 8'/%3E%3Cline x1='12' y1='3' x2='12' y2='15'/%3E%3C/svg%3E") center / contain no-repeat;
}

.sw-upload__text {
	font-weight: 600;
}

.sw-upload__hint {
	font-size: 0.85em;
	opacity: 0.7;
}

.sw-upload__list {
	display: grid;
	gap: 0.5em;
	margin: 0.75em 0 0;
	padding: 0;
	list-style: none;
}

.sw-upload__list:empty {
	display: none;
}

.sw-upload__file {
	display: flex;
	align-items: center;
	gap: 0.75em;
	padding: 0.5em 0.75em;
	border: 1px solid var(--_border);
	border-radius: var(--_input-radius);
}

.sw-upload__name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.sw-upload__size {
	font-size: 0.85em;
	opacity: 0.7;
}

.sw-upload__remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2em;
	height: 2em;
	padding: 0;
	color: inherit;
	font-size: 1.1em;
	line-height: 1;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

.sw-upload__remove:hover {
	color: var(--_error);
}

/* ---------------------------------------------------------------- Inputs */

.sw-input {
	display: block;
	width: 100%;
	max-width: 100%;
	min-height: 48px;
	margin: 0;
	padding: 0.7em 1em;
	color: inherit;
	font: inherit;
	background: var(--_input-bg);
	border: var(--sw-auto-input-border-width, 1px) solid var(--sw-border, var(--sw-auto-input-border, var(--_border)));
	border-radius: var(--_input-radius);
	box-shadow: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

textarea.sw-input {
	min-height: 120px;
	resize: vertical;
}

.sw-input:focus {
	border-color: var(--_primary);
	outline: none;
	box-shadow: 0 0 0 3px var(--_focus);
}

.sw-input[aria-invalid="true"] {
	border-color: var(--_error);
}

.sw-date {
	max-width: 280px;
}

/* ---------------------------------------------------------------- Buttons */

.sw-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	min-height: 48px;
	margin: 0;
	padding: 0.75em 1.6em;
	font: inherit;
	font-family: var(--sw-font, var(--sw-auto-btn-font, inherit));
	font-weight: var(--sw-auto-btn-weight, 600);
	letter-spacing: var(--sw-auto-btn-spacing, normal);
	line-height: 1.2;
	text-decoration: none;
	text-transform: var(--sw-auto-btn-transform, none);
	border: 2px solid transparent;
	border-radius: var(--_btn-radius);
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease, filter 0.15s ease, opacity 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.sw-btn:focus-visible {
	outline: 3px solid var(--_focus);
	outline-offset: 2px;
}

.sw-btn--primary,
.sw-btn--primary:visited {
	color: var(--_on-primary);
	background: var(--_primary);
	border-color: var(--_primary);
}

.sw-btn--primary:hover,
.sw-btn--primary:focus {
	color: var(--_on-primary);
	filter: brightness(0.92);
}

.sw-btn--secondary {
	color: inherit;
	background: transparent;
	border-color: var(--_border);
}

.sw-btn--secondary:hover,
.sw-btn--secondary:focus {
	color: inherit;
	background: transparent;
	border-color: var(--_primary);
}

.sw-btn:disabled,
.sw-btn[aria-disabled="true"] {
	cursor: not-allowed;
	opacity: 0.6;
}

/* ------------------------------------------------------------ Navigation */

.sw-nav {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: var(--_gap);
	margin-top: 2em;
}

.sw-nav__next,
.sw-nav__restart {
	margin-left: auto;
}

@container sw-wizard (max-width: 480px) {
	.sw-nav .sw-btn {
		flex: 1 1 0;
		padding-inline: 1em;
	}
}

/* --------------------------------------------------------------- Results */

.sw-result__media img {
	display: block;
	width: 100%;
	height: auto;
	margin-bottom: 1.25em;
	border-radius: var(--_radius);
}

.sw-result__content > :first-child {
	margin-top: 0;
}

.sw-result__actions {
	margin: 1.5em 0 0;
}

.sw-result__embed,
.sw-form {
	margin-top: 1.75em;
}

.sw-result__success {
	margin-top: 1.5em;
	padding: 1em 1.25em;
	background: var(--_selected-bg);
	border-left: 4px solid var(--_primary);
	border-radius: calc(var(--_radius) * 0.5);
}

.sw-result__success > :first-child {
	margin-top: 0;
}

.sw-result__success > :last-child {
	margin-bottom: 0;
}

/* ------------------------------------------------------------------ Form */

.sw-form__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1em var(--_gap);
}

.sw-form__field--full,
.sw-form__field--privacy {
	grid-column: 1 / -1;
}

@container sw-wizard (max-width: 520px) {
	.sw-form__grid {
		grid-template-columns: minmax(0, 1fr);
	}
}

.sw-form__label {
	display: block;
	margin-bottom: 0.35em;
	font-size: 0.95em;
	font-weight: 600;
}

.sw-form__field--privacy {
	margin-top: 1.25em;
	font-size: 0.9em;
}

.sw-checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.6em;
	cursor: pointer;
}

.sw-checkbox input {
	flex: 0 0 auto;
	width: 1.15em;
	height: 1.15em;
	margin: 0.2em 0 0;
	accent-color: var(--_primary);
}

.sw-form__message {
	margin-top: 1em;
	color: var(--_error);
	font-weight: 600;
}

.sw-form__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	margin-top: 1.5em;
}

@container sw-wizard (max-width: 480px) {
	.sw-form__actions .sw-btn,
	.sw-result__button {
		width: 100%;
	}
}

/* Übersicht vor dem Absenden */
.sw-review__title {
	margin: 0 0 1em;
}

.sw-review__group + .sw-review__group {
	margin-top: 1.25em;
}

.sw-review__subtitle {
	margin: 0 0 0.5em;
	font-weight: 600;
}

.sw-review__rows {
	display: grid;
	grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
	margin: 0;
	border-top: 1px solid var(--_border);
}

.sw-review__rows dt,
.sw-review__rows dd {
	margin: 0;
	padding: 0.6em 0;
	border-bottom: 1px solid var(--_border);
}

.sw-review__rows dt {
	padding-right: 1em;
	opacity: 0.75;
}

.sw-review__rows dd {
	white-space: pre-line;
	overflow-wrap: anywhere;
}

@container sw-wizard (max-width: 480px) {
	.sw-review__rows {
		grid-template-columns: minmax(0, 1fr);
	}

	.sw-review__rows dt {
		padding-bottom: 0;
		border-bottom: 0;
	}

	.sw-review__rows dd {
		padding-top: 0.15em;
	}
}

.sw-form.is-sending .sw-form__submit::after {
	content: "";
	width: 1em;
	height: 1em;
	border: 2px solid currentColor;
	border-right-color: transparent;
	border-radius: 50%;
	animation: sw-spin 0.7s linear infinite;
}

/* Honeypot */
.sw-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.sw-notice {
	padding: 0.75em 1em;
	border: 1px dashed var(--_border, rgba(127, 127, 127, 0.5));
	border-radius: 8px;
}

/* -------------------------------------------------------- Wizard-Titel */

.sw-wizard__title {
	margin: 0 0 1em;
	font-size: clamp(1.5em, 1.1em + 1.6vw, 2.25em);
	line-height: 1.2;
}

/* Eingaben bleiben immer linksbündig lesbar – auch bei mittiger Ausrichtung. */
.sw-input,
.sw-upload__list {
	text-align: start;
}

/* ------------------------------------------------------ Ausrichtung: Mittig */

.sw-wizard--align-center {
	text-align: center;
}

/* Antworten als zentrierte Reihen statt linksbündigem Raster. */
.sw-wizard--align-center .sw-choices {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
}

.sw-wizard--align-center .sw-choices--tiles .sw-choice {
	flex: 0 1 var(--_tile-min);
}

.sw-wizard--align-center .sw-choices--buttons .sw-choice {
	flex: 0 1 300px;
}

@container sw-wizard (min-width: 600px) {
	.sw-wizard--align-center .sw-choices--tiles .sw-choice {
		flex-basis: calc(var(--_tile-min) * 1.25);
	}

	/* Feste Spaltenzahl: gleich breite Kacheln, letzte Reihe mittig. */
	.sw-wizard--align-center .sw-choices--tiles[style*="--sw-cols"] .sw-choice {
		flex-basis: calc((100% - (var(--sw-cols) - 1) * var(--_gap)) / var(--sw-cols));
	}
}

@container sw-wizard (max-width: 480px) {
	.sw-wizard--align-center .sw-choices--buttons .sw-choice {
		flex-basis: 100%;
	}
}

/* Buttons: Text mittig, Auswahl-Indikator rechts außen. */
.sw-wizard--align-center .sw-choices--buttons .sw-choice__body {
	justify-content: center;
	padding-inline: 2.75em;
}

.sw-wizard--align-center .sw-choices--buttons .sw-choice__text {
	flex: 0 1 auto;
	align-items: center;
}

.sw-wizard--align-center .sw-choices--buttons .sw-choice__check {
	position: absolute;
	top: 50%;
	right: 1em;
	margin: 0;
	transform: translateY(-50%);
}

.sw-wizard--align-center .sw-date {
	margin-inline: auto;
}

.sw-wizard--align-center .sw-nav {
	justify-content: center;
}

.sw-wizard--align-center .sw-nav__next,
.sw-wizard--align-center .sw-nav__restart {
	margin-left: 0;
}

/* Formular: Block mittig, Felder linksbündig, Absende-Button mittig. */
.sw-wizard--align-center .sw-form {
	max-width: 640px;
	margin-inline: auto;
	text-align: start;
}

.sw-wizard--align-center .sw-form__actions {
	justify-content: center;
}

.sw-wizard--align-center .sw-form__message {
	text-align: center;
}

.sw-wizard--align-center .sw-result__success {
	border-left: 0;
	border-top: 4px solid var(--_primary);
}

/* ------------------------------------------------------------ Animationen */

.sw-anim-fade .is-entering {
	animation: sw-fade 0.35s ease both;
}

.sw-anim-slide .is-entering {
	animation: sw-slide-in 0.35s ease both;
}

.sw-anim-slide .is-entering.is-back {
	animation-name: sw-slide-back;
}

@keyframes sw-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes sw-slide-in {
	from { opacity: 0; transform: translateX(32px); }
	to { opacity: 1; transform: none; }
}

@keyframes sw-slide-back {
	from { opacity: 0; transform: translateX(-32px); }
	to { opacity: 1; transform: none; }
}

@keyframes sw-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.sw-wizard *,
	.sw-wizard *::before,
	.sw-wizard *::after {
		animation-duration: 0.01ms !important;
		transition-duration: 0.01ms !important;
	}
}
