/* Spendenformular Wir Helfen Rettern
 * Farbkonzept nach wir-helfen-rettern.de:
 *   Orange #DB6140  – Überschriften, Links, Buttons der Website
 *   Gelb   #EFB600  – Zweitfarbe der Website, Ende des Logo-Swooshs
 *   Schwarz         – Linien des Logos, Schrift auf farbigen Flächen
 *   Inter           – Schrift der Website
 * Der Farbverlauf Orange → Gelb greift den Pfeil aus dem Logo auf und
 * erscheint nur an zwei Stellen: am Spenden-Button und an der Danke-Meldung.
 * Text auf farbigen Flächen ist schwarz (wie bei den Buttons der Website),
 * weil Weiß auf dem Orange zu wenig Kontrast hätte. */

.rhr-sf {
	--rhr-accent: #DB6140;
	--rhr-accent-2: #EFB600;
	--rhr-ink: #000;
	--rhr-line: #000;
	--rhr-field: #8a8a8a;
	--rhr-soft: #FFF7E0;
	--rhr-muted: #5a5a5a;
	--rhr-error: #A63A1C;
	--rhr-ok: #1E6B3A;
	--rhr-swoosh: linear-gradient(90deg, var(--rhr-accent) 0%, #E8902F 45%, var(--rhr-accent-2) 100%);
	max-width: 40rem;
	margin: 0 auto;
	color: var(--rhr-ink);
	font-family: 'Inter', Helvetica, Arial, sans-serif;
	font-size: 1rem;
	line-height: 1.55;
	box-sizing: border-box;
}
.rhr-sf *, .rhr-sf *::before, .rhr-sf *::after { box-sizing: inherit; }

.rhr-sf__group {
	border: 0;
	margin: 0 0 2.25rem;
	padding: 0;
	min-width: 0;
}
/* Wie die h3 der Website: fett, orange */
.rhr-sf__legend {
	color: var(--rhr-accent);
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.3;
	margin: 0 0 0.9rem;
	padding: 0;
}

/* Art der Spende: zwei Wahlflächen mit schwarzer Linie wie im Logo */
.rhr-sf__switch {
	display: grid;
	grid-template-columns: 1fr 1fr;
	border: 2px solid var(--rhr-line);
	border-radius: 3px;
	overflow: hidden;
}
.rhr-sf__switch-option { position: relative; display: flex; cursor: pointer; margin: 0; }
.rhr-sf__switch-option + .rhr-sf__switch-option { border-left: 2px solid var(--rhr-line); }
.rhr-sf__switch-option input { position: absolute; opacity: 0; pointer-events: none; }
.rhr-sf__switch-option span {
	display: flex;
	flex-direction: column;
	gap: 0.3rem;
	width: 100%;
	padding: 1rem 1.1rem 1.1rem;
	background: #fff;
	transition: background-color 0.15s;
}
.rhr-sf__switch-option strong { font-size: 1.05rem; font-weight: 700; }
.rhr-sf__switch-option small { font-size: 0.875rem; line-height: 1.45; color: var(--rhr-muted); }
.rhr-sf__switch-option:hover span { background: var(--rhr-soft); }
.rhr-sf__switch-option input:checked + span { background: var(--rhr-accent-2); }
.rhr-sf__switch-option input:checked + span small { color: #000; }
.rhr-sf__switch-option input:focus-visible + span { outline: 3px solid #000; outline-offset: -6px; }

/* Beträge: eckig wie die Buttons der Website */
.rhr-sf__amounts { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.9rem; }
.rhr-sf__amount { position: relative; margin: 0; cursor: pointer; }
.rhr-sf__amount input { position: absolute; opacity: 0; pointer-events: none; }
.rhr-sf__amount span {
	display: inline-block;
	min-width: 5rem;
	padding: 0.7rem 1rem;
	border: 2px solid var(--rhr-line);
	border-radius: 2px;
	background: #fff;
	text-align: center;
	font-size: 1.05rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}
.rhr-sf__amount:hover span { background: var(--rhr-soft); }
.rhr-sf__amount input:checked + span { background: var(--rhr-accent-2); }
.rhr-sf__amount input:focus-visible + span { outline: 3px solid #000; outline-offset: 2px; }
.rhr-sf__amount--free span { font-weight: 600; font-size: 1rem; }
.rhr-sf__free { margin-bottom: 1rem; }
.rhr-sf.js .rhr-sf__free[hidden] { display: none; }

/* Felder */
.rhr-sf__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
.rhr-sf__row--plz { grid-template-columns: 8rem 1fr; }
.rhr-sf__field { margin-bottom: 1rem; }
.rhr-sf__label { display: block; font-weight: 600; font-size: 0.95rem; margin: 0 0 0.3rem; }
.rhr-sf__input {
	display: block;
	width: 100%;
	padding: 0.7rem 0.8rem;
	border: 1.5px solid var(--rhr-field);
	border-radius: 2px;
	background: #fff;
	color: #000;
	font: inherit;
	line-height: 1.4;
}
.rhr-sf__input--short { max-width: 14rem; }
.rhr-sf__input--iban { font-variant-numeric: tabular-nums; letter-spacing: 0.05em; }
.rhr-sf__input:hover { border-color: #000; }
.rhr-sf__input:focus { outline: none; border-color: var(--rhr-accent); box-shadow: 0 0 0 3px rgba(219, 97, 64, 0.28); }
.rhr-sf__input[aria-invalid="true"] { border-color: var(--rhr-error); border-width: 2px; }
textarea.rhr-sf__input { resize: vertical; min-height: 5rem; }

.rhr-sf__hint { color: var(--rhr-muted); font-size: 0.9rem; margin: 0.5rem 0 0.75rem; }
.rhr-sf__error { color: var(--rhr-error); font-size: 0.9rem; font-weight: 600; margin: 0.35rem 0 0; }
.rhr-sf__live { font-size: 0.9rem; margin: 0.35rem 0 0; min-height: 1.4em; }
.rhr-sf__live.is-ok { color: var(--rhr-ok); }
.rhr-sf__live.is-bad { color: var(--rhr-error); }

.rhr-sf a { color: var(--rhr-accent); text-decoration: underline; text-underline-offset: 2px; }
.rhr-sf a:hover { color: var(--rhr-error); }

/* Checkboxen */
.rhr-sf__check { display: flex; gap: 0.65rem; align-items: flex-start; margin: 0.5rem 0 1rem; cursor: pointer; font-weight: 400; }
.rhr-sf__check input { flex: none; width: 1.2rem; height: 1.2rem; margin: 0.18rem 0 0; accent-color: var(--rhr-accent); }

/* Mandatstext: abgesetzt wie ein Beleg, gelbe Kante */
.rhr-sf__mandate {
	border-left: 4px solid var(--rhr-accent-2);
	background: var(--rhr-soft);
	padding: 0.9rem 1rem;
	margin: 0.5rem 0 0.75rem;
	font-size: 0.875rem;
	line-height: 1.6;
}
.rhr-sf__mandate p { margin: 0 0 0.6rem; }
.rhr-sf__mandate p:last-child { margin-bottom: 0; }
.rhr-sf__mandate-head { font-weight: 700; font-size: 0.95rem; }

.rhr-sf.js[data-typ="zusage"] .rhr-sf__sepa { display: none; }

/* Honeypot: für Menschen unsichtbar, für Screenreader ausgeblendet */
.rhr-sf__hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Absenden: im Stil der Website-Buttons, mit dem Swoosh-Verlauf aus dem Logo */
.rhr-sf__submit {
	display: block;
	width: 100%;
	margin-top: 1.75rem;
	padding: 1.05rem 1.5rem;
	border: 0;
	border-radius: 2px;
	background: var(--rhr-accent);
	background: var(--rhr-swoosh);
	color: #000;
	font-family: inherit;
	font-size: 0.95rem;
	font-weight: 700;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	cursor: pointer;
	transition: filter 0.15s;
}
.rhr-sf__submit:hover { filter: brightness(1.07) saturate(1.05); }
.rhr-sf__submit:focus-visible { outline: 3px solid #000; outline-offset: 3px; }
.rhr-sf__submit[disabled] { opacity: 0.6; cursor: wait; }
.rhr-sf [data-label-zusage] { display: none; }
.rhr-sf.js[data-typ="zusage"] [data-label-zusage] { display: inline; }
.rhr-sf.js[data-typ="zusage"] [data-label-lastschrift] { display: none; }

/* Meldungen */
.rhr-sf__alert {
	border: 2px solid var(--rhr-error);
	border-radius: 2px;
	color: var(--rhr-error);
	padding: 0.8rem 1rem;
	margin-bottom: 1.5rem;
	font-weight: 600;
}
.rhr-sf--done { position: relative; padding-top: 1.5rem; }
.rhr-sf--done::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 9rem;
	height: 5px;
	border-radius: 3px;
	background: var(--rhr-swoosh);
}
.rhr-sf--done:focus { outline: none; }
.rhr-sf__done-title { color: var(--rhr-accent); font-size: 1.75rem; font-weight: 700; margin: 0 0 0.5rem; }
.rhr-sf__konto { font-variant-numeric: tabular-nums; background: var(--rhr-soft); border-left: 4px solid var(--rhr-accent-2); padding: 0.8rem 1rem; }

@media (max-width: 560px) {
	.rhr-sf__legend { font-size: 1.3rem; }
	.rhr-sf__switch { grid-template-columns: 1fr; }
	.rhr-sf__switch-option + .rhr-sf__switch-option { border-left: 0; border-top: 2px solid var(--rhr-line); }
	.rhr-sf__row { grid-template-columns: 1fr; }
	.rhr-sf__row--plz { grid-template-columns: 7rem 1fr; }
	.rhr-sf__amount { flex: 1 1 calc(33% - 0.5rem); }
	.rhr-sf__amount span { width: 100%; min-width: 0; }
}
@media (prefers-reduced-motion: reduce) {
	.rhr-sf__switch-option span, .rhr-sf__submit { transition: none; }
}
