/* ==================================================================
   DBDO – Neues Design · nur Kontakt
   ==================================================================
   Wird nur auf /kontakt/ geladen (nach relaunch.css). Werte aus dem
   Entwurf "Kontakt v2.dc.html".

     1  Seitenkopf
     2  Angaben und Karte
     3  Formular von Contact Form 7 (Block "rl-formular")
     4  Hinweis auf die App
     5  Schmale Bildschirme

   Abschnitt 3 haengt nur an der Klasse "rl-formular" und an den Klassen,
   die Contact Form 7 selbst ausgibt – nicht an dieser Seite. Braucht eine
   weitere Seite das Formular (Kommunen), kann der Abschnitt unveraendert
   nach relaunch.css umziehen.
   ================================================================== */

/* 1 ─ Seitenkopf ─────────────────────────────────────────────────── */

.rl-kontakt-hero {
	--rl-hero-bildlage: center 60%;
	--rl-hero-schleier: radial-gradient(ellipse 75% 62% at 50% 45%, rgba(16, 42, 30, .72) 0%, rgba(16, 42, 30, .56) 45%, rgba(16, 42, 30, .2) 100%);
	--rl-hero-polster: 112px var(--rl-rand) 120px;
	--rl-hero-titel: clamp(44px, 8vw, 128px);
}
.dbdo-rl-neu .rl-inhalt .rl-kontakt-hero .rl-hero__titel {
	line-height: .9;
}
/* 2 ─ Angaben und Karte ──────────────────────────────────────────── */

.rl-kontakt-bereich {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
	gap: 40px;
	align-items: start;
	padding-top: 72px;
	padding-bottom: var(--rl-abstand);
}
.rl-kontakt-info {
	display: flex;
	flex-direction: column;
	gap: 24px;
	min-width: 0;
}
.rl-kontakt-angaben {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding: 0;
	border-top: 1px solid var(--rl-linie);
}
.rl-kontakt-angabe {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 20px 0;
	border-bottom: 1px solid var(--rl-linie);
}
.rl-kontakt-angabe dt {
	margin: 0;
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--rl-text-3);
}
.rl-kontakt-angabe dd {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	overflow-wrap: anywhere;
}
/* Die ganze Zeile ist anklickbar, wie im Entwurf */
.rl-kontakt-angabe a::after {
	content: '';
	position: absolute;
	inset: 0;
}

.rl-kontakt-karte {
	min-width: 0;
	padding: 32px;
	border: 1px solid var(--rl-linie-hell);
	border-radius: var(--rl-rund-xl);
	background: #fff;
}

/* 3 ─ Formular von Contact Form 7 ────────────────────────────────── */
/* Das HTML kommt unveraendert von Contact Form 7:
     .wpcf7 > form.wpcf7-form[.init|.submitting|.invalid|.sent|.failed|…]
       .form-wrapper > .formrow > p > label > Text, .wpcf7-form-control-wrap > Feld
       … > .cf7sr-g-recaptcha, Knopf .wpcf7-submit, Wartezeichen .wpcf7-spinner
       .wpcf7-response-output   (Meldung nach dem Absenden)
   Fehler an einem Feld: Feld bekommt .wpcf7-not-valid, dahinter steht
   .wpcf7-not-valid-tip mit dem Text. */

.rl-formular {
	/* Die Breite der Karte ist der Massstab fuer das reCAPTCHA-Kaestchen (siehe unten). */
	container-type: inline-size;
}
.rl-formular .wpcf7 {
	margin: 0;
}
.rl-formular .hidden-fields-container {
	display: none;
}
.rl-formular .form-wrapper {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.rl-formular .formrow {
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.dbdo-rl-neu .rl-inhalt .rl-formular .form-wrapper p {
	margin: 0;
	padding: 0;
}
/* Zeilenumbrueche und der leere Absatz aus der Formularvorlage */
.rl-formular .form-wrapper br,
.rl-formular .form-wrapper > p:empty {
	display: none;
}

/* Beschriftung ueber dem Feld */
.rl-formular label {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
	color: var(--rl-text-2);
}
.rl-formular .wpcf7-form-control-wrap,
.rl-formular .wpcf7-checkbox,
.rl-formular .wpcf7-radio,
.rl-formular .wpcf7-acceptance,
.rl-formular .dsgvo-checkbox {
	display: block;
	position: relative;
}

/* Felder */
.rl-formular input[type="text"],
.rl-formular input[type="email"],
.rl-formular input[type="tel"],
.rl-formular input[type="url"],
.rl-formular input[type="number"],
.rl-formular input[type="date"],
.rl-formular select,
.rl-formular textarea {
	display: block;
	width: 100%;
	max-width: 100%;
	margin: 0;
	padding: 14px 16px;
	border: 1px solid #D9D2C1;
	border-radius: var(--rl-rund-m);
	background: #FBFAF6;
	color: var(--rl-text);
	font-family: var(--rl-schrift);
	font-size: 16px;
	font-weight: 400;
	line-height: normal;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color .15s, background .15s;
}
.rl-formular textarea {
	height: auto;       /* fuenf Zeilen wie im Entwurf (rows="5", siehe page-kontakt.php) */
	min-height: 80px;
	resize: vertical;
}
.rl-formular input:focus,
.rl-formular select:focus,
.rl-formular textarea:focus {
	border-color: var(--rl-gruen);
	background: #fff;
}

/* Haekchen "Datenschutzerklaerung gelesen" */
.rl-formular .wpcf7-list-item {
	display: block;
	margin: 0;
}
.rl-formular .wpcf7-list-item label {
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	font-weight: 400;
	line-height: 1.5;
	cursor: pointer;
}
.rl-formular input[type="checkbox"],
.rl-formular input[type="radio"] {
	flex: none;
	width: 18px;
	height: 18px;
	margin: 3px 3px 3px 4px;   /* wie im Entwurf: Browser-Standard, oben 3 px */
	accent-color: var(--rl-gruen);
}
.rl-formular .wpcf7-list-item-label {
	min-width: 0;
}
.dbdo-rl-neu .rl-inhalt .rl-formular .wpcf7-list-item-label a {
	color: var(--rl-tanne);
	text-decoration: underline;
}
.rl-formular .wpcf7-list-item-label::before,
.rl-formular .wpcf7-list-item-label::after {
	content: none;
}

/* reCAPTCHA: Google gibt das Kaestchen fest mit 304 x 78 px aus. Ist die
   Karte schmaler, wird es verkleinert (links oben verankert, die Hoehe
   zieht mit) – sonst ragte es rechts aus der Karte. Uebernommen aus
   mu-plugins/dbdo-kleine-korrekturen.php, das hier abgemeldet ist.
   Gemessen wird die Innenbreite der Karte, nicht der Bildschirm. */
.rl-formular .cf7sr-g-recaptcha {
	--rl-recaptcha: 1;
	height: calc(78px * var(--rl-recaptcha));
}
.rl-formular .cf7sr-g-recaptcha > div {
	transform: scale(var(--rl-recaptcha));
	transform-origin: 0 0;
}
@container (max-width: 303px) { .rl-formular .cf7sr-g-recaptcha { --rl-recaptcha: .91; } }
@container (max-width: 277px) { .rl-formular .cf7sr-g-recaptcha { --rl-recaptcha: .83; } }
@container (max-width: 252px) { .rl-formular .cf7sr-g-recaptcha { --rl-recaptcha: .75; } }
@container (max-width: 228px) { .rl-formular .cf7sr-g-recaptcha { --rl-recaptcha: .65; } }
@container (max-width: 197px) { .rl-formular .cf7sr-g-recaptcha { --rl-recaptcha: .55; } }
/* Sehr alte Browser, die die Kartenbreite nicht abfragen koennen */
@supports not (container-type: inline-size) {
	@media (max-width: 440px) { .rl-formular .cf7sr-g-recaptcha { --rl-recaptcha: .65; } }
}
/* Die Huelle des unsichtbaren reCAPTCHA-Feldes: ohne Fehlermeldung ohne Hoehe
   und ohne eigenen Abstand, mit Fehlermeldung direkt unter dem Kaestchen. */
.rl-formular .wpcf7-form-control-wrap.cf7sr-recaptcha {
	margin-top: -14px;
}

/* Knopf */
.rl-formular .wpcf7-submit {
	display: block;
	width: 100%;
	margin: 0;
	padding: 15px 24px;
	border: 0;
	border-radius: var(--rl-rund-pille);
	background: var(--rl-tanne);
	color: var(--rl-auf-dunkel);
	font-family: var(--rl-schrift);
	font-size: 16px;
	font-weight: 700;
	line-height: normal;
	white-space: normal;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background .15s, opacity .15s;
}
.rl-formular .wpcf7-submit:hover {
	background: var(--rl-gruen);
	color: #fff;
}
.rl-formular form.submitting .wpcf7-submit {
	opacity: .7;
	cursor: progress;
}
/* Wartezeichen von Contact Form 7: rechts im Knopf statt als eigene Zeile */
.rl-formular .wpcf7-spinner {
	position: absolute;
	right: 16px;
	bottom: 13px;
	margin: 0;
	background-color: var(--rl-auf-dunkel);
	opacity: 1;
	pointer-events: none;
}
.rl-formular .wpcf7-spinner::before {
	background-color: var(--rl-tanne);
}

/* Ergaenzung 26.11.2026 (nur diese Kopie, weicht damit von der Vorlage im
   Website-Ordner ab): Knopf "Absenden" steht jetzt ueber der Haekchen-Zeile
   (Ronny: "mach den Text unter dem Button absenden"). Die Abstaende kommen
   unveraendert vom gap der .form-wrapper (14 px wie zwischen den Feldern).
   Das Wartezeichen haengt am Absatz des Knopfs statt am Formular-Ende. */
.rl-formular .dbdo-absenden {
	position: relative;
}

/* Fehler an einem Feld */
.rl-formular input.wpcf7-not-valid,
.rl-formular select.wpcf7-not-valid,
.rl-formular textarea.wpcf7-not-valid {
	border-color: var(--rl-rot);
	background: #FFF9F5;
}
.rl-formular .wpcf7-not-valid-tip {
	display: block;
	margin-top: 6px;
	color: var(--rl-rot-tinte);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.4;
}

/* Meldung unter dem Formular (Fehler, Versand fehlgeschlagen, Spam-Verdacht) */
.rl-formular .wpcf7 form .wpcf7-response-output {
	margin: 14px 0 0;
	padding: 14px 16px;
	border: 1px solid var(--rl-linie);
	border-radius: var(--rl-rund-m);
	background: var(--rl-sand-hell);
	color: var(--rl-text);
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
}
.rl-formular .wpcf7 form.invalid .wpcf7-response-output,
.rl-formular .wpcf7 form.unaccepted .wpcf7-response-output,
.rl-formular .wpcf7 form.payment-required .wpcf7-response-output,
.rl-formular .wpcf7 form.spam .wpcf7-response-output,
.rl-formular .wpcf7 form.failed .wpcf7-response-output,
.rl-formular .wpcf7 form.aborted .wpcf7-response-output {
	border-color: #EFC2A8;
	background: var(--rl-rot-hell);
	color: var(--rl-rot-tinte);
}

/* Nachricht gesendet: wie im Entwurf steht nur noch der Dank in der Karte
   (Haken, Ueberschrift, Satz; Karte mit 40 px Innenabstand). Erkannt an
   form.sent (Contact Form 7, auch nach einem Absenden ohne Javascript) oder
   an .ist-gesendet (setzt seite-kontakt.js beim Ereignis wpcf7mailsent).
   Den Dank-Block blendet "hidden" aus und ein (nicht CSS: relaunch.css
   setzt [hidden] mit !important).
   Direkt nach dem Senden steht das Formular einen Augenblick auf
   "resetting" – der Dank bleibt auch dann stehen. */
.rl-kontakt-karte:has(form.sent),
.rl-kontakt-karte:has(form.resetting .wpcf7-response-output:not(:empty)),
.rl-kontakt-karte.ist-gesendet {
	padding: 40px;
}
.rl-formular:has(form.sent) .wpcf7-form,
.rl-formular:has(form.resetting .wpcf7-response-output:not(:empty)) .wpcf7-form,
.rl-formular.ist-gesendet .wpcf7-form,
.rl-formular:has(form.sent) .rl-formular__hinweis,
.rl-formular.ist-gesendet .rl-formular__hinweis {
	display: none;
}
/* Der Dank selbst traegt "hidden", bis gesendet ist (page-kontakt.php bzw. seite-kontakt.js). */
.rl-kontakt-danke {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.rl-kontakt-danke__haken {
	display: grid;
	place-items: center;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: var(--rl-gruen);
	color: #fff;
	font-size: 22px;
}
.dbdo-rl-neu .rl-inhalt .rl-kontakt-danke__titel {
	font-family: var(--rl-schrift-titel);
	font-size: 26px;
	font-weight: 700;
	line-height: normal;
}
.dbdo-rl-neu .rl-inhalt .rl-kontakt-danke__text {
	font-size: 16px;
	color: var(--rl-text-2);
}

/* Zeile unter dem Formular mit dem Link zur Datenschutzerklaerung */
.dbdo-rl-neu .rl-inhalt .rl-formular__hinweis {
	margin-top: 14px;
	font-size: 13px;
	line-height: 1.5;
	color: var(--rl-text-3);
}
.dbdo-rl-neu .rl-inhalt .rl-formular__hinweis a,
.dbdo-rl-neu .rl-inhalt .rl-formular__ersatz a {
	text-decoration: underline;
	text-underline-offset: 2px;
}
.rl-formular:has(form.sent) .rl-formular__hinweis {
	display: none;
}
/* Falls Contact Form 7 nicht laeuft: Hinweis statt Formular */
.rl-formular__ersatz {
	font-size: 16px;
	line-height: 1.6;
	color: var(--rl-text-2);
}

/* 4 ─ Hinweis auf die App ────────────────────────────────────────── */

.rl-kontakt-app {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 40px;
	border-radius: var(--rl-rund-xxl);
	background: var(--rl-gelb);
	color: var(--rl-tanne);
}
.dbdo-rl-neu .rl-inhalt .rl-kontakt-app h2 {
	min-width: 0;
	font-weight: 700;
	font-size: clamp(26px, 3vw, 36px);
	line-height: 1.1;
	letter-spacing: -.02em;
}

/* 5 ─ Schmale Bildschirme ────────────────────────────────────────── */
/* Wie im Entwurf ohne eigene Handy-Masse (Karte auch dort 32 px Innenabstand);
   nur das reCAPTCHA-Kaestchen wird verkleinert (Abschnitt 3). */
