/* CB Registrierungs-Assistent – Registrierung Schritt für Schritt (C) 2026 Designsektor, GNU/GPL version 2 */

.mlxReg {
	--mlxr-brand: var(--mlx-accent, #4e2a56);
	--mlxr-brand-soft: #f1e9f3;
	--mlxr-dark: var(--mlx-primary, #2f5353);
	--mlxr-text: var(--mlx-text, #2c2e36);
	--mlxr-muted: var(--mlx-muted, #626875);
	--mlxr-line: #dfe3e7;
	--mlxr-fill: #f3f5f6;
	--mlxr-radius: 14px;
}

/* Bis das Skript fertig ist, kein Aufflackern des alten Formulars; ohne Skript erscheint es nach kurzer Zeit */
.mlxReg-pending .cbRegistration:not(.mlxReg--ready) form.cb_form {
	opacity: 0;
	animation: mlxRegShow 0s 2.5s forwards;
}

@keyframes mlxRegShow {
	to { opacity: 1; }
}

.mlxReg--ready form.cb_form {
	max-width: 640px;
	color: var(--mlxr-text);
}

/* ---------- CB-Schritte (Reiter) aus, alle Bereiche durchgehend ---------- */

.mlxReg--ready .cbTabsNav,
.mlxReg--ready .cbTabsStepByStepNav,
.mlxReg--ready .cbRegistrationButtons {
	display: none !important;
}

.mlxReg--ready .cbTabsContent > .tab-pane {
	display: block !important;
	opacity: 1 !important;
}

.mlxReg--ready .cb_tab_content,
.mlxReg--ready .cbTabsContent,
.mlxReg--ready .tab-pane {
	padding: 0;
	border: 0;
	background: none;
}

/* Nur der aktuelle Schritt ist sichtbar */
.mlxReg--ready [id^="cbfr_"]:not(.mlxReg__row--current) {
	display: none !important;
}

/* ---------- Fortschritt ---------- */

.mlxReg__progress {
	height: 6px;
	margin: 0 0 2rem;
	border-radius: 3px;
	overflow: hidden;
	background: var(--mlxr-fill);
}

.mlxReg__progressFill {
	display: block;
	width: 0;
	height: 100%;
	border-radius: inherit;
	background: var(--mlxr-brand);
	transition: width .3s ease;
}

.mlxReg__finishTitle {
	display: none;
	margin: 0 0 1.25rem;
	color: var(--mlxr-dark);
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
}

.mlxReg--finish .mlxReg__finishTitle {
	display: block;
}

.mlxReg__finishTitle:focus,
.mlxReg__row--current > label:focus {
	outline: none;
}

/* ---------- Zeilen: Frage oben, Antwort darunter ---------- */

.mlxReg--ready .mlxReg__row--current {
	display: block;
	margin: 0 0 1.25rem;
	animation: mlxRegIn .25s ease;
}

@keyframes mlxRegIn {
	from { opacity: 0; transform: translateY(8px); }
}

.mlxReg--ready .mlxReg__row--current > label,
.mlxReg--ready .mlxReg__row--current > .cb_field {
	flex: none;
	width: 100%;
	max-width: 100%;
	padding: 0;
}

.mlxReg--ready .mlxReg__row--current > label {
	margin: 0 0 .4rem;
	color: var(--mlxr-text);
	font-weight: 600;
}

/* Erste Zeile eines Schritts: die Frage als Überschrift */
.mlxReg--ready .mlxReg__row--lead > label {
	margin: 0 0 .5rem;
	color: var(--mlxr-dark);
	font-size: clamp(1.5rem, 1.2rem + 1.2vw, 2rem);
	font-weight: 700;
	line-height: 1.2;
}

/* Frage bleibt dunkel, auch wenn CB das Feld als fehlerhaft markiert */
.mlxReg--ready .mlxReg__row--lead.cbValidationError > label,
.mlxReg--ready .mlxReg__row--lead > label.is-invalid,
.mlxReg--ready .mlxReg__row--lead > label.text-danger {
	color: var(--mlxr-dark) !important;
}

/* Erklärtext von CB unter der Frage */
.mlxReg--ready .mlxReg__row--current .form-control-plaintext {
	padding: 0;
	color: var(--mlxr-muted);
}

.mlxReg--ready .mlxReg__row--current .form-control:not(.mlxReg__select) {
	min-height: 52px;
	padding: .75rem 1rem;
	border: 1px solid var(--mlxr-line);
	border-radius: 12px;
	color: var(--mlxr-text);
	font-size: 1.0625rem;
	background-color: #fff;
}

.mlxReg--ready .mlxReg__row--current input.form-control {
	width: 100%;
	margin-top: .75rem;
}

.mlxReg--ready .mlxReg__row--current .form-control:focus {
	border-color: var(--mlxr-brand);
	box-shadow: 0 0 0 3px rgba(78, 42, 86, .15);
	outline: none;
}

/* Passwort mit „Zeigen“ */
.mlxReg--ready .cbPasswordUnmask {
	display: flex !important;
	width: 100% !important;
	margin-top: .75rem;
}

.mlxReg--ready .cbPasswordUnmask input.form-control {
	margin-top: 0;
	border-radius: 12px 0 0 12px;
}

.mlxReg--ready .cbPasswordUnmask .btn {
	height: 100%;
	padding: 0 1rem;
	border-radius: 0 12px 12px 0 !important;
}

/* Geburtstag: Tag, Monat, Jahr nebeneinander */
.mlxReg--ready .combodate {
	display: flex;
	gap: .5rem;
	margin-top: .75rem;
	font-size: 0; /* Trennpunkte zwischen den Listen */
}

.mlxReg--ready .combodate select.form-control {
	flex: 1 1 0;
	width: auto !important;
	min-width: 0;
}

/* Bildfeld */
.mlxReg--ready .cbft_image select.form-control {
	margin-top: .75rem;
}

.mlxReg--ready .cbImageFieldUpload {
	font-size: .875rem;
}

/* Fehlermeldungen von CB */
.mlxReg--ready .mlxReg__row--current .invalid-feedback,
.mlxReg--ready .mlxReg__row--current label.error,
.mlxReg--ready .mlxReg__row--current .cbValidationMessage {
	display: block;
	margin-top: .5rem;
	color: #b3261e;
	font-size: .9375rem;
}

/* ---------- Schaltflächen zum Antippen ---------- */

.mlxReg--ready .mlxReg__select {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
}

.mlxReg__tiles {
	display: none;
}

.mlxReg--ready .mlxReg__tiles {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: .75rem;
	margin-top: 1.25rem;
}

.mlxReg__tile {
	position: relative;
	display: flex;
	align-items: center;
	min-height: 64px;
	padding: .875rem 3rem .875rem 1.125rem;
	border: 2px solid var(--mlxr-line);
	border-radius: var(--mlxr-radius);
	color: var(--mlxr-text);
	font: inherit;
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
	text-align: left;
	background: #fff;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, transform .1s ease;
	-webkit-tap-highlight-color: transparent;
}

/* Kreis rechts, wird beim Antippen zum Haken */
.mlxReg__tile::after {
	position: absolute;
	top: 50%;
	right: 1rem;
	width: 22px;
	height: 22px;
	margin-top: -11px;
	border: 2px solid var(--mlxr-line);
	border-radius: 50%;
	content: "";
	transition: inherit;
}

.mlxReg__row--multi .mlxReg__tile::after {
	border-radius: 6px;
}

.mlxReg__tile:hover {
	border-color: #c7b5cc;
}

.mlxReg__tile:active {
	transform: scale(.98);
}

.mlxReg__tile:focus-visible {
	outline: 3px solid rgba(78, 42, 86, .35);
	outline-offset: 2px;
}

.mlxReg__tile[aria-pressed="true"] {
	border-color: var(--mlxr-brand);
	color: var(--mlxr-brand);
	background: var(--mlxr-brand-soft);
}

.mlxReg__tile[aria-pressed="true"]::after {
	border-color: var(--mlxr-brand);
	background: var(--mlxr-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9.5 16.2 5.3 12l-1.4 1.4 5.6 5.6L20.1 8.4 18.7 7z'/%3E%3C/svg%3E") center / 16px no-repeat;
}

/* Viele Antworten (Instrumente, Musikrichtungen): kompakte Etiketten */
.mlxReg--ready .mlxReg__tiles--chips {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
}

.mlxReg__tiles--chips .mlxReg__tile {
	min-height: 44px;
	padding: .5rem 1rem;
	border-radius: 999px;
	font-size: .9375rem;
}

.mlxReg__tiles--chips .mlxReg__tile::after {
	display: none;
}

/* ---------- Zustimmungen und Captcha ---------- */

.mlxReg--finish .cbft_terms > label {
	display: none !important;
}

.mlxReg--finish .cbft_terms .form-check {
	display: flex;
	align-items: flex-start;
	gap: .625rem;
	margin: 0;
	font-size: 1rem;
	color: var(--mlxr-text);
}

.mlxReg--finish .cbft_terms .form-check-input {
	flex: none;
	width: 22px;
	height: 22px;
	margin: 0;
	accent-color: var(--mlxr-brand);
}

.mlxReg--finish .cbft_terms.mlxReg__row--current {
	margin-bottom: .75rem;
}

.mlxReg--finish [class*="captcha"].mlxReg__row--current {
	margin-top: 1.75rem;
}

/* ---------- Zurück / Weiter ---------- */

.mlxReg__hint {
	min-height: 1.5em;
	margin: 0 0 .5rem;
	color: #b3261e;
	font-weight: 600;
}

.mlxReg__hint:empty {
	visibility: hidden;
}

.mlxReg__nav {
	display: flex;
	align-items: center;
	gap: .75rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--mlxr-line);
}

.mlxReg__back,
.mlxReg__next {
	min-height: 52px;
	padding: 0 1.75rem;
	border-radius: 999px;
	font: inherit;
	font-size: 1.0625rem;
	font-weight: 700;
	cursor: pointer;
}

.mlxReg__back {
	border: 2px solid var(--mlxr-line);
	color: var(--mlxr-text);
	background: #fff;
}

.mlxReg__back[hidden] {
	display: none;
}

.mlxReg__next {
	margin-left: auto;
	min-width: 10rem;
	border: 0;
	color: #fff;
	background: var(--mlxr-brand);
	box-shadow: 0 6px 18px rgba(78, 42, 86, .25);
	transition: background-color .15s ease, opacity .15s ease;
}

.mlxReg__next:hover {
	background: var(--mlxr-dark);
}

.mlxReg__next:disabled {
	opacity: .35;
	box-shadow: none;
	cursor: not-allowed;
}

.mlxReg__next--skip {
	border: 2px solid var(--mlxr-line);
	color: var(--mlxr-text);
	background: #fff;
	box-shadow: none;
}

.mlxReg__next--skip:hover {
	background: var(--mlxr-fill);
}

.mlxReg__back:focus-visible,
.mlxReg__next:focus-visible {
	outline: 3px solid rgba(78, 42, 86, .35);
	outline-offset: 2px;
}

/* Handy: Knöpfe unten fest im Blick, Schaltflächen untereinander */
@media (max-width: 575.98px) {
	.mlxReg--ready .mlxReg__tiles:not(.mlxReg__tiles--chips) {
		grid-template-columns: 1fr;
		gap: .625rem;
	}

	.mlxReg__tile {
		min-height: 56px;
	}

	.mlxReg__nav {
		position: sticky;
		bottom: 0;
		z-index: 5;
		margin: 0 -16px;
		padding: .75rem 16px calc(.75rem + env(safe-area-inset-bottom));
		background: rgba(255, 255, 255, .96);
		box-shadow: 0 -6px 18px rgba(0, 0, 0, .06);
	}

	.mlxReg__next {
		flex: 1;
		min-width: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.mlxReg--ready .mlxReg__row--current,
	.mlxReg__progressFill,
	.mlxReg__tile {
		animation: none;
		transition: none;
	}
}
