/* RR146 Anmeldeformular - Gestaltung nach Royal-Rangers-CI (Website rr146.de).
 * Schrift "Libre Franklin" wird von der Website global geladen (hier nicht eingebunden).
 * Kontraste: Text #1A1A18 und Hinweistext #55534A auf #FFFEFB erfüllen WCAG AA;
 * Eingabefeld-Rahmen #8C887A erreichen 3:1 (Nicht-Text-Kontrast), Linien #E3E1D2/#CFCCB8 nur dekorativ. */

.rr146-form,
.rr146-errors,
.rr146-demo-hinweis {
	--rr146-text: #1A1A18;
	--rr146-muted: #55534A;
	--rr146-blau: #1E398F;
	--rr146-blau-dunkel: #172C70;
	--rr146-gelb: #FCE604;
	--rr146-flaeche: #FFFEFB;
	--rr146-grund: #F7F6F2;
	--rr146-linie: #E3E1D2;
	--rr146-linie-stark: #CFCCB8;
	--rr146-feldrand: #8C887A;
	--rr146-fokus: rgba(30, 57, 143, 0.25);
	--rr146-fehler: #B3261E;
	--rr146-fehler-flaeche: #FDF1EF;
	--rr146-ok: #1F6B3A;
	--rr146-ok-flaeche: #EEF6EF;
	font-family: "Libre Franklin", system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--rr146-text);
}

.rr146-form { max-width: 920px; margin: 0; font-size: 16px; line-height: 1.55; }
.rr146-form .rr146-hp { position: absolute !important; left: -9999px !important; }

.rr146-form .rr146-formtitel {
	margin: 0 0 18px;
	font-family: inherit;
	font-size: 1.8em;
	font-weight: 700;
	line-height: 1.2;
	color: var(--rr146-text);
}

/* Karten (Abschnitte) */
.rr146-form .rr146-fs {
	border: 1px solid var(--rr146-linie);
	border-radius: 20px;
	padding: 20px 22px 16px;
	margin: 0 0 22px;
	background: var(--rr146-flaeche);
	box-shadow: 0 1px 2px rgba(26, 26, 24, 0.04);
}
.rr146-form legend {
	font-weight: 700;
	padding: 0 10px;
	color: var(--rr146-text);
	font-size: 1.05em;
}
.rr146-form legend::before {
	content: "";
	display: inline-block;
	width: 10px;
	height: 10px;
	margin-right: 8px;
	border-radius: 50%;
	background: var(--rr146-gelb);
	box-shadow: 0 0 0 1px var(--rr146-linie-stark);
	vertical-align: 1px;
}

/* Raster */
.rr146-form .rr146-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.rr146-form .rr146-grid label { display: flex; flex-direction: column; font-weight: 600; gap: 6px; margin: 0; }
.rr146-form .rr146-grid .rr146-wide { grid-column: 1 / -1; }

/* Eingabefelder */
.rr146-form input[type=text],
.rr146-form input[type=email],
.rr146-form input[type=tel],
.rr146-form input[type=date],
.rr146-form textarea,
.rr146-form select {
	border: 1px solid var(--rr146-feldrand);
	border-radius: 12px;
	padding: 10px 12px;
	font: inherit;
	font-weight: 400;
	color: var(--rr146-text);
	background: #fff;
	width: 100%;
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rr146-form textarea { resize: vertical; }
.rr146-form input[disabled] { background: var(--rr146-grund); color: var(--rr146-muted); }
.rr146-form input:focus,
.rr146-form textarea:focus,
.rr146-form select:focus {
	outline: none;
	border-color: var(--rr146-blau);
	box-shadow: 0 0 0 4px var(--rr146-fokus);
}
.rr146-form input[type=radio],
.rr146-form input[type=checkbox] { accent-color: var(--rr146-blau); width: 18px; height: 18px; }
.rr146-form input[type=radio]:focus-visible,
.rr146-form input[type=checkbox]:focus-visible { outline: 3px solid var(--rr146-fokus); outline-offset: 2px; }
.rr146-form input.rr146-ok { border-color: var(--rr146-ok); }
.rr146-form input.rr146-bad { border-color: var(--rr146-fehler); }

/* Auswahlfelder */
.rr146-form .rr146-check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; margin: 10px 0; }
.rr146-form .rr146-check input { margin-top: 3px; flex: 0 0 auto; }
.rr146-form .rr146-check span a,
.rr146-form a { color: var(--rr146-blau); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.rr146-form a:hover { color: var(--rr146-blau-dunkel); }

.rr146-form .rr146-rollen { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.rr146-form .rr146-rolle {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	border: 1px solid var(--rr146-linie-stark);
	border-radius: 16px;
	padding: 14px;
	cursor: pointer;
	margin: 0;
	background: #fff;
	transition: border-color 0.15s ease, background 0.15s ease;
}
.rr146-form .rr146-rolle:hover { border-color: var(--rr146-blau); }
.rr146-form .rr146-rolle:has(input:checked) {
	border-color: var(--rr146-blau);
	background: #EEF1F9;
	box-shadow: inset 0 0 0 1px var(--rr146-blau);
}
.rr146-form .rr146-rolle small { display: block; font-weight: 400; color: var(--rr146-muted); }

.rr146-form .rr146-stufe {
	margin: 14px 0 0;
	padding: 10px 14px;
	background: var(--rr146-grund);
	border-left: 5px solid var(--rr146-gelb);
	border-radius: 12px;
}
.rr146-form .rr146-schwimmer { display: flex; flex-wrap: wrap; gap: 0 24px; margin: 8px 0 0; }

.rr146-radiofeld .rr146-radios { display: flex; gap: 1.25em; padding-top: 0.4em; }
.rr146-radiofeld .rr146-check { font-weight: 400; margin: 0; }
.rr146-abholung { display: flex; flex-wrap: wrap; gap: 0.4em 1.5em; margin: 0 0 0.6em; }
#rr146-abholer-feld { display: block; margin-bottom: 1em; font-weight: 600; }
#rr146-abholer-feld input { width: 100%; margin-top: 0.4em; }
#rr146-abholer-feld.rr146-aus { opacity: 0.55; }

.rr146-fotozeile { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.4em 1.25em; margin: 0.8em 0 0; }
.rr146-fotozeile > span { flex: 1 1 100%; font-weight: 600; }
.rr146-fotozeile .rr146-check { margin: 0; }

/* Unterschrift */
.rr146-sig-wrap { position: relative; }
.rr146-sig-wrap canvas {
	width: 100%;
	max-width: 560px;
	height: 200px;
	border: 1px dashed var(--rr146-feldrand, #8C887A);
	border-radius: 12px;
	background: #fff;
	touch-action: none;
	display: block;
}
.rr146-sig-label { font-weight: 600; margin: 18px 0 6px; }
.rr146-sig-clear {
	position: absolute;
	top: 8px;
	right: 8px;
	border: 1px solid var(--rr146-linie-stark, #CFCCB8);
	background: #fff;
	color: var(--rr146-blau, #1E398F);
	border-radius: 999px;
	padding: 4px 14px;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	font-weight: 600;
}
.rr146-sig-clear:hover { border-color: var(--rr146-blau, #1E398F); }
.rr146-sig-clear:focus-visible { outline: none; box-shadow: 0 0 0 4px rgba(30, 57, 143, 0.25); }

/* Absenden */
.rr146-form .rr146-submit { margin: 8px 0 10px; }
.rr146-form .rr146-button {
	background: var(--rr146-blau);
	color: #fff;
	border: 0;
	border-radius: 999px;
	padding: 14px 32px;
	font: inherit;
	font-size: 18px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s ease, box-shadow 0.15s ease;
}
.rr146-form .rr146-button:hover { background: var(--rr146-blau-dunkel); }
.rr146-form .rr146-button:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--rr146-fokus); }
.rr146-button-busy { opacity: 0.7; cursor: progress; }

.rr146-form .rr146-hint { color: var(--rr146-muted); font-size: 14px; }
.rr146-form small { color: var(--rr146-muted); font-weight: 400; }
.rr146-form .rr146-grid label small { display: block; margin-top: 2px; line-height: 1.35; }

/* Pflichtfeld-Markierung */
.rr146-form input.rr146-invalid,
.rr146-form textarea.rr146-invalid,
.rr146-form select.rr146-invalid,
.rr146-sig-wrap.rr146-invalid canvas {
	border: 2px solid var(--rr146-fehler, #B3261E);
	background: var(--rr146-fehler-flaeche, #FDF1EF);
}
.rr146-form p.rr146-invalid,
.rr146-form span.rr146-invalid,
.rr146-form label.rr146-check.rr146-invalid {
	outline: 2px solid var(--rr146-fehler);
	outline-offset: 4px;
	border-radius: 12px;
	background: var(--rr146-fehler-flaeche);
}

/* Meldungen */
.rr146-errors {
	border: 1px solid var(--rr146-fehler);
	background: var(--rr146-fehler-flaeche);
	border-radius: 20px;
	padding: 16px 20px;
	margin: 0 auto 20px;
	max-width: 760px;
}
.rr146-errors ul { margin: 8px 0 0 18px; }

.rr146-demo-hinweis {
	margin: 0 0 20px;
	padding: 12px 16px;
	border: 1px solid var(--rr146-linie-stark);
	border-left: 6px solid var(--rr146-gelb);
	border-radius: 12px;
	background: var(--rr146-flaeche);
	font-size: 0.95em;
	line-height: 1.5;
}
.rr146-demo-hinweis code { background: var(--rr146-grund); padding: 1px 5px; border-radius: 6px; }

.rr146-form.rr146-success {
	margin: 0 auto;
	text-align: center;
	border: 1px solid var(--rr146-linie);
	border-top: 6px solid var(--rr146-gelb);
	background: var(--rr146-flaeche);
	border-radius: 20px;
	padding: 24px 26px;
}
.rr146-success h3 { color: var(--rr146-blau); font-size: 1.6em; margin: 0 0 12px; }
.rr146-success-klein { color: var(--rr146-muted); font-size: 0.95em; margin-top: 14px; }
.rr146-form.rr146-success-warn { border-top-color: #B26B00; }
.rr146-success-warn h3 { color: #7A4A00; }

@media (max-width: 640px) {
	.rr146-form .rr146-grid,
	.rr146-form .rr146-rollen { grid-template-columns: 1fr; }
	.rr146-form .rr146-fs { padding: 16px 16px 12px; }
	.rr146-form .rr146-button { width: 100%; }
}
