/*
 * Anfrage auf Landingpages (docs/landingpages-scroll.md, Abschnitt 5.2; Pattern verdure/lp-anfrage mit dem Formular
 * „Anfrage Landingpage“ aus Contact Form 7). Werte aus der Referenz (section#anfrage), Farben, Button und Raster im
 * Website-Stand. Geladen mit der Gruppe is-style-lp-anfrage (functions.php).
 */

.wp-block-group.is-style-lp-anfrage {
	margin-block-start: clamp(100px, 14vw, 200px);
	padding-block: clamp(80px, 10vw, 160px);
	background: var(--wp--preset--color--schwarz);
	color: var(--wp--preset--color--hellgrau);
}

.is-style-lp-anfrage :focus-visible {
	outline: 2px solid var(--wp--preset--color--gruen);
	outline-offset: 3px;
}

.is-style-lp-anfrage .lp-anfrage__spalten {
	align-items: stretch;
	gap: 64px clamp(56px, 7vw, 128px);
}

.is-style-lp-anfrage .lp-anfrage__links {
	display: flex;
	flex-direction: column;
	gap: 56px;
}

.is-style-lp-anfrage .lp-anfrage__links > * {
	margin: 0;
}

.is-style-lp-anfrage h2 {
	margin: 0 0 32px;
	color: var(--wp--preset--color--hellgrau);
	font-size: clamp(36px, 4.2vw, 60px);
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -1.13px;
}

@media (min-width: 960px) {
	/* Oberkante H2 und Formular auf einer Linie */
	.is-style-lp-anfrage h2 {
		margin-top: -0.17em;
	}
}

.is-style-lp-anfrage .lp-anfrage__einleitung {
	max-width: 28em;
	margin: 0;
	font-size: clamp(18px, 1.6vw, 22px);
	font-weight: 500;
	line-height: 1.45;
}

/* Ansprechpartner: Porträt quadratisch, Freisteller auf Hellgrau, Kopf und Schultern; Angaben daneben, Links bündig unten */
.is-style-lp-anfrage .lp-ansprechpartner {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 24px 32px;
}

.is-style-lp-anfrage .lp-ansprechpartner > * {
	margin: 0;
}

.is-style-lp-anfrage .lp-ansprechpartner__bild {
	position: relative;
	flex: 0 0 auto;
	width: clamp(180px, 15vw, 220px);
	aspect-ratio: 1;
	overflow: hidden;
	background: var(--wp--preset--color--hellgrau);
}

.is-style-lp-anfrage .lp-ansprechpartner__bild img {
	position: absolute;
	top: 6%;
	left: -5.8%;
	display: block;
	width: 115%;
	max-width: none;
	height: auto;
}

.is-style-lp-anfrage .lp-ansprechpartner__angaben {
	display: flex;
	flex: 1 1 200px;
	flex-direction: column;
	justify-content: space-between;
	gap: 24px;
	min-width: 0;
}

.is-style-lp-anfrage .lp-ansprechpartner__angaben > * {
	margin: 0;
}

.is-style-lp-anfrage .lp-ansprechpartner__person {
	font-size: 16px;
	line-height: 1.5;
}

.is-style-lp-anfrage .lp-ansprechpartner__label {
	color: var(--wp--preset--color--grau);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 2.4px;
	text-transform: uppercase;
}

.is-style-lp-anfrage .lp-ansprechpartner__person strong {
	display: inline-block;
	margin-top: 8px;
	font-size: clamp(22px, 2vw, 28px);
	font-weight: 600;
	line-height: 1.3;
}

.is-style-lp-anfrage .lp-ansprechpartner__wege {
	font-size: 18px;
	font-weight: 500;
	line-height: 1.9;
}

.is-style-lp-anfrage .lp-ansprechpartner__wege a {
	color: var(--wp--preset--color--hellgrau);
	text-decoration: underline 2px var(--wp--preset--color--gruen);
	text-underline-offset: 5px;
}

/* Quelle des Platzhalters im Nachrichtenfeld; im Frontend entfernt (Site-Plugin, Anfrage.php), im Editor als Hinweis */
.lp-anfrage__platzhalter {
	display: none;
}

.editor-styles-wrapper .lp-anfrage__platzhalter {
	display: block;
	color: var(--wp--preset--color--grau);
	font-size: 14px;
}

.editor-styles-wrapper .lp-anfrage__platzhalter::before {
	content: "Platzhalter im Nachrichtenfeld: ";
}

/* ---------------------------------------------------------------- Formular */

.is-style-lp-anfrage .wpcf7 form {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 24px 32px;
	margin: 0;
}

.is-style-lp-anfrage .wpcf7 form > * {
	margin: 0;
}

/* versteckte Felder von Contact Form 7 */
.is-style-lp-anfrage .wpcf7 form > .hidden-fields-container,
.is-style-lp-anfrage .wpcf7 form > div[style*="display: none"] {
	display: none;
}

/* Worum geht es? Als Unterüberschrift, darunter drei schmale Zeilen: Kästchen, Titel und Erklärung in einer Zeile
   (auf schmalen Bildschirmen bricht die Erklärung um) */
.is-style-lp-anfrage .lp-auswahl {
	flex: 1 1 100%;
	min-width: 0;
	margin: 0 0 8px;
	padding: 0;
	border: 0;
}

.is-style-lp-anfrage .lp-auswahl legend {
	margin: 0 0 16px;
	padding: 0;
	font-size: clamp(20px, 1.6vw, 24px);
	font-weight: 600;
	line-height: 1.3;
}

.is-style-lp-anfrage .lp-auswahl .wpcf7-checkbox {
	display: grid;
	grid-template-columns: minmax(0, 1fr);
	gap: 8px;
}

.is-style-lp-anfrage .lp-auswahl .wpcf7-list-item {
	display: block;
	margin: 0;
}

.is-style-lp-anfrage .lp-auswahl label {
	position: relative;
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 16px;
	border: 1px solid var(--wp--preset--color--strichel);
	cursor: pointer;
	transition: border-color 0.2s ease-out;
}

.is-style-lp-anfrage .lp-auswahl label:hover {
	border-color: var(--wp--preset--color--grau);
}

/* natives Kästchen unsichtbar, aber bedienbar */
.is-style-lp-anfrage .lp-auswahl input[type="checkbox"] {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
}

/* gezeichnetes Kästchen mit Häkchen, links vor dem Text; Titel und Erklärung laufen als Text, eine umbrochene
   Erklärung beginnt bündig unter dem Titel */
.is-style-lp-anfrage .lp-auswahl .wpcf7-list-item-label::before {
	content: "";
	position: absolute;
	top: 50%;
	left: 0;
	box-sizing: border-box;
	width: 20px;
	height: 20px;
	margin-top: -10px;
	border: 2px solid var(--wp--preset--color--grau);
}

.is-style-lp-anfrage .lp-auswahl .wpcf7-list-item-label {
	position: relative;
	display: block;
	min-width: 0;
	padding-left: 34px;
	line-height: 1.45;
}

.is-style-lp-anfrage .lp-auswahl__titel {
	margin-right: 10px;
	color: var(--wp--preset--color--hellgrau);
	font-size: 15px;
	font-weight: 600;
}

.is-style-lp-anfrage .lp-auswahl__text {
	color: var(--wp--preset--color--grau);
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
}

.is-style-lp-anfrage .lp-auswahl label:has(input:checked) {
	padding: 9px 15px;
	border: 2px solid var(--wp--preset--color--gruen);
}

.is-style-lp-anfrage .lp-auswahl label:has(input:checked) .wpcf7-list-item-label::before {
	border-color: var(--wp--preset--color--gruen);
	background: var(--wp--preset--color--gruen) url(../../../icons/haken-schwarz.svg) center / 14px no-repeat;
}

.is-style-lp-anfrage .lp-auswahl label:has(input:focus-visible) {
	outline: 2px solid var(--wp--preset--color--gruen);
	outline-offset: 3px;
}

/* Felder: Pflicht nur Name und E-Mail, darunter Unternehmen und Telefon, dann die Nachricht */
.is-style-lp-anfrage .lp-felder {
	display: flex;
	flex: 1 1 100%;
	flex-wrap: wrap;
	gap: 24px 32px;
}

.is-style-lp-anfrage .lp-feld {
	display: flex;
	flex: 1 1 260px;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	font-size: 14px;
	font-weight: 600;
}

.is-style-lp-anfrage .lp-feld--breit {
	flex-basis: 100%;
}

.is-style-lp-anfrage .lp-feld .wpcf7-form-control-wrap {
	display: block;
}

.is-style-lp-anfrage .lp-feld :is(input, textarea) {
	box-sizing: border-box;
	width: 100%;
	min-width: 0;
	min-height: 56px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--feld-dunkel);
	color: var(--wp--preset--color--weiss);
	font: 400 16px/1.5 var(--wp--preset--font-family--poppins, inherit);
}

.is-style-lp-anfrage .lp-feld textarea {
	min-height: 0;
	padding: 14px 16px;
	resize: vertical;
}

.is-style-lp-anfrage .lp-feld :is(input, textarea)::placeholder {
	color: var(--wp--preset--color--grau);
	opacity: 1;
}

.is-style-lp-anfrage .lp-feld :is(input, textarea):focus-visible {
	outline: 2px solid var(--wp--preset--color--gruen);
	outline-offset: 2px;
}

.is-style-lp-anfrage .lp-feld__hinweis,
.is-style-lp-anfrage .wpcf7-not-valid-tip {
	display: block;
	margin-top: 4px;
	color: var(--wp--preset--color--fehler-rot);
	font-size: 14px;
	font-weight: 500;
}

.is-style-lp-anfrage .lp-feld__hinweis {
	color: var(--wp--preset--color--hellgrau);
}

.is-style-lp-anfrage .lp-feld__hinweis[hidden] {
	display: none;
}

/* Rückruf erwünscht */
.is-style-lp-anfrage .wpcf7-form-control-wrap[data-name="lp-rueckruf"] {
	flex: 1 1 100%;
}

.is-style-lp-anfrage .lp-rueckruf .wpcf7-list-item {
	margin: 0;
}

.is-style-lp-anfrage .lp-rueckruf label {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 16px;
	font-weight: 500;
	cursor: pointer;
}

.is-style-lp-anfrage .lp-rueckruf input[type="checkbox"] {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin: 2px 0 0;
	accent-color: var(--wp--preset--color--gruen);
}

.is-style-lp-anfrage .lp-rueckruf__zusatz {
	color: var(--wp--preset--color--grau);
	font-size: 14px;
	font-weight: 400;
}

/* Unternehmen, Telefon, Nachricht und Rückruf erst nach der E-Mail-Adresse (landingpage.js setzt „lp-kurz“ und
   „lp-spaeter“, ohne Skript ist alles sichtbar) */
.is-style-lp-anfrage form.lp-kurz .lp-spaeter {
	display: none;
}

.is-style-lp-anfrage form .lp-spaeter.ist-neu {
	animation: lp-einblenden 0.3s ease-out;
}

@keyframes lp-einblenden {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.is-style-lp-anfrage form .lp-spaeter.ist-neu {
		animation: none;
	}
}

/* Absenden: Haarlinie, nächste Schritte, Button, Hinweis */
.is-style-lp-anfrage .lp-absenden {
	flex: 1 1 100%;
	margin-top: 8px;
	padding-top: 24px;
	border-top: 1px solid var(--wp--preset--color--strichel);
}

.is-style-lp-anfrage .lp-naechste {
	margin: 0 0 24px;
	font-size: 16px;
	line-height: 1.6;
}

.is-style-lp-anfrage .lp-absenden__zeile {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-start;
	gap: 20px 32px;
}

/* Button im Website-Stand: grün, schwarze Schrift, Pfeil, ohne Versatzrahmen */
.is-style-lp-anfrage .lp-senden {
	display: inline-flex;
	align-items: center;
	gap: 20px;
	margin: 0;
	padding: 22px 30px;
	border: 0;
	border-radius: 0;
	background: var(--wp--preset--color--gruen) url(../../../icons/pfeil-rechts.svg) right 30px center / 18px no-repeat;
	padding-right: 68px;
	color: var(--wp--preset--color--schwarz);
	font: 700 14px/1 var(--wp--preset--font-family--poppins, inherit);
	letter-spacing: 2.4px;
	text-transform: uppercase;
	white-space: nowrap;
	cursor: pointer;
}

.is-style-lp-anfrage .lp-senden:hover {
	background-color: var(--wp--preset--color--weiss);
}

.is-style-lp-anfrage .lp-hinweis {
	margin: 20px 0 0;
	color: var(--wp--preset--color--grau);
	font-size: 14px;
	line-height: 1.55;
}

.is-style-lp-anfrage .lp-hinweis a {
	color: inherit;
	text-decoration: underline 1px var(--wp--preset--color--gruen);
	text-underline-offset: 3px;
}

/* Rückmeldung von Contact Form 7 */
.is-style-lp-anfrage .wpcf7-spinner {
	margin: 0;
}

.is-style-lp-anfrage .wpcf7 form .wpcf7-response-output {
	flex: 1 1 100%;
	margin: 0;
	padding: 16px 20px;
	border: 2px solid var(--wp--preset--color--gruen);
	color: var(--wp--preset--color--hellgrau);
	font-size: 16px;
}

.is-style-lp-anfrage .wpcf7 form:is(.invalid, .unaccepted, .failed, .aborted, .spam) .wpcf7-response-output {
	border-color: var(--wp--preset--color--fehler-rot);
}

.is-style-lp-anfrage .wpcf7 form.init .wpcf7-response-output,
.is-style-lp-anfrage .wpcf7 form.resetting .wpcf7-response-output,
.is-style-lp-anfrage .wpcf7 form.submitting .wpcf7-response-output {
	display: none;
}

@media (prefers-reduced-motion: reduce) {
	.is-style-lp-anfrage .lp-auswahl label {
		transition: none;
	}
}
