/**
 * Anfrageformular der Landingpages.
 *
 * Buildfrei (kein SCSS). Farben spiegeln 0-settings/_!variables.scss:
 * $primary #F59100, $primary-hover #bf6600, $primary-bright #f5cd93.
 */

.lwreq {
	--lwreq-primary: #f59100;
	--lwreq-primary-hover: #bf6600;
	--lwreq-primary-bright: #f5cd93;
	--lwreq-primary-brighter: #fff6e8;
	--lwreq-border: #dcdfe4;
	--lwreq-text: #1f2933;
	--lwreq-muted: #6b7480;
	--lwreq-error: #c0392b;
	--lwreq-radius: 10px;

	/* Oben knapp halten: die Formular-H1 ersetzt die Seiten-H1. */
	padding: 8px 0 48px 0;
	color: var(--lwreq-text);
}

.lwreq *,
.lwreq *::before,
.lwreq *::after {
	box-sizing: border-box;
}

/*
 * [hidden] muss unsere display-Regeln schlagen. Sonst bleibt z. B. der
 * Kamera-Button am Desktop sichtbar, weil .lwreq__btn display: inline-flex
 * setzt und damit das display: none des Browsers ueberschreibt.
 */
.lwreq [hidden],
.lwreq__reference[hidden] {
	display: none !important;
}

.lwreq__header {
	max-width: 760px;
	margin: 0 auto 32px auto;
	text-align: center;
}

/* Erbt Groesse und Schrift der Theme-H1 (.entry-title). */
.lwreq__headline {
	margin: 0 0 12px 0;
}

.lwreq__intro {
	margin: 0;
	font-size: 17px;
	line-height: 1.6;
	color: var(--lwreq-muted);
}

.lwreq__form {
	max-width: 860px;
	margin: 0 auto;
}

.lwreq__fieldset {
	margin: 0 0 32px 0;
	padding: 0;
	border: 0;
}

.lwreq__legend {
	display: block;
	width: 100%;
	margin: 0 0 14px 0;
	padding: 0;
	font-size: 18px;
	font-weight: 600;
}

.lwreq__hint {
	display: block;
	font-size: 14px;
	font-weight: 400;
	color: var(--lwreq-muted);
}

.lwreq__hint--block {
	margin: -6px 0 14px 0;
	line-height: 1.5;
}

/* Hinweis unter den Buttons braucht Luft nach oben, nicht nach unten. */
.lwreq__hint--voice {
	margin: 18px 0 0 0;
}

/* Hinweis unter dem Textfeld, wenn eine Sprachnachricht anhaengt. */
.lwreq__hint--message {
	margin: 8px 0 0 0;
	color: var(--lwreq-primary-hover);
}

/* --- Produktkarten --- */

/* Vier Kacheln pro Reihe, zwei Reihen. Feste Spaltenzahl statt auto-fit,
   damit die Labels ("Garagentore") nicht umbrechen. */
.lwreq__cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 16px;
}

@media (max-width: 900px) {
	.lwreq__cards {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media (max-width: 620px) {
	.lwreq__cards {
		grid-template-columns: repeat(2, 1fr);
		gap: 12px;
	}
}

.lwreq__card {
	position: relative;
	display: flex;
	flex-direction: column;
	margin: 0;
	border: 2px solid var(--lwreq-border);
	border-radius: var(--lwreq-radius);
	background: #fff;
	cursor: pointer;
	overflow: hidden;
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.lwreq__card:hover {
	border-color: var(--lwreq-primary-bright);
	box-shadow: 0 4px 14px rgba(31, 41, 51, .08);
}

.lwreq__card-input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	padding: 0;
	opacity: 0;
	pointer-events: none;
}

.lwreq__card-media {
	position: relative;
	display: block;
	aspect-ratio: 1 / 1;
	background: #fff;
	overflow: hidden;
}

/* contain statt cover: die Produkte sind komplett zu sehen, nichts wird
   angeschnitten. Die Quellbilder sind quadratisch auf weissem Grund. */
.lwreq__card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.lwreq__card-check {
	position: absolute;
	top: 10px;
	right: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	background: #fff;
	border: 2px solid #b9c0c9;
	box-shadow: 0 2px 6px rgba(31, 41, 51, .18);
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.lwreq__card-check svg {
	width: 22px;
	height: 22px;
	fill: #d3d8de;
	transition: fill .15s ease;
}

.lwreq__card:hover .lwreq__card-check {
	border-color: var(--lwreq-primary);
}

.lwreq__card:hover .lwreq__card-check svg {
	fill: var(--lwreq-primary-bright);
}

/* Normale Schreibweise statt der Theme-Grossbuchstaben: sonst brechen lange
   Labels wie "Nebeneingangstüren" mitten im Wort um. */
.lwreq__card-label {
	display: block;
	padding: 12px 8px 14px 8px;
	font-size: 15px;
	font-weight: 600;
	text-align: center;
	line-height: 1.25;
	text-transform: none;
	letter-spacing: 0;
	hyphens: auto;
}

@media (max-width: 1080px) {
	.lwreq__card-label {
		font-size: 14px;
	}
}

.lwreq__card-input:checked ~ .lwreq__card-media .lwreq__card-check,
.lwreq__card-input:checked + .lwreq__card-media .lwreq__card-check {
	background: var(--lwreq-primary);
	border-color: #fff;
	box-shadow: 0 0 0 2px var(--lwreq-primary), 0 2px 8px rgba(245, 145, 0, .45);
	transform: scale(1.1);
}

.lwreq__card-input:checked + .lwreq__card-media .lwreq__card-check svg {
	fill: #fff;
}

.lwreq__card:has(.lwreq__card-input:checked) {
	border-color: var(--lwreq-primary);
	box-shadow: 0 4px 16px rgba(245, 145, 0, .18);
}

.lwreq__card-input:focus-visible + .lwreq__card-media {
	outline: 3px solid var(--lwreq-primary-hover);
	outline-offset: -3px;
}

/* Fallback fuer Browser ohne :has() */
.lwreq__card-input:checked ~ .lwreq__card-label {
	color: var(--lwreq-primary-hover);
}

/* --- Felder --- */

.lwreq__grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 16px;
}

.lwreq__field {
	margin: 0;
}

.lwreq__field--wide {
	grid-column: 1 / -1;
}

.lwreq__field label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
}

.lwreq__field input,
.lwreq__field textarea {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--lwreq-border);
	border-radius: 8px;
	background: #fff;
	font: inherit;
	font-size: 16px; /* verhindert Zoom auf iOS */
	color: var(--lwreq-text);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.lwreq__field input:focus,
.lwreq__field textarea:focus {
	outline: 0;
	border-color: var(--lwreq-primary);
	box-shadow: 0 0 0 3px rgba(245, 145, 0, .18);
}

.lwreq__field textarea {
	resize: vertical;
	min-height: 140px;
	line-height: 1.6;
}

@media (max-width: 640px) {
	.lwreq__grid {
		grid-template-columns: 1fr;
	}
}

/* --- Dateien --- */

.lwreq__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.lwreq__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 12px 22px;
	border-radius: 8px;
	border: 2px solid transparent;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease, color .15s ease;
}

.lwreq__btn--ghost {
	border-color: var(--lwreq-border);
	background: #fff;
	color: var(--lwreq-text);
}

.lwreq__btn--ghost:hover {
	border-color: var(--lwreq-primary);
	color: var(--lwreq-primary-hover);
}

/* Mikrofon-Button: Icon links vom Text, wie bei Sprachnachrichten in
   Messengern. */
.lwreq__btn--mic {
	gap: 8px;
}

.lwreq__mic {
	width: 20px;
	height: 20px;
	fill: currentColor;
}

.lwreq__btn--ghost.is-recording {
	border-color: var(--lwreq-error);
	color: var(--lwreq-error);
	animation: lwreq-pulse 1.4s ease-in-out infinite;
}

@keyframes lwreq-pulse {
	50% {
		background: #fdecea;
	}
}

.lwreq__btn--primary {
	background: var(--lwreq-primary);
	color: #fff;
	padding: 14px 32px;
	font-size: 16px;
}

.lwreq__btn--primary:hover:not(:disabled) {
	background: var(--lwreq-primary-hover);
}

.lwreq__btn--primary:disabled {
	opacity: .6;
	cursor: not-allowed;
}

.lwreq__files {
	margin: 16px 0 0 0;
	padding: 0;
	list-style: none;
}

.lwreq__file {
	position: relative;
	display: grid;
	grid-template-columns: 1fr auto auto;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	margin-bottom: 8px;
	border: 1px solid var(--lwreq-border);
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
}

.lwreq__file.is-done {
	border-color: var(--lwreq-primary-bright);
	background: var(--lwreq-primary-brighter);
}

.lwreq__file.is-failed {
	border-color: var(--lwreq-error);
	background: #fdecea;
}

.lwreq__file-name {
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.lwreq__file-meta {
	color: var(--lwreq-muted);
	font-variant-numeric: tabular-nums;
}

.lwreq__file-bar {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: transparent;
	overflow: hidden;
	border-radius: 0 0 8px 8px;
}

.lwreq__file-fill {
	display: block;
	height: 100%;
	width: 0;
	background: var(--lwreq-primary);
	transition: width .2s ease;
}

.lwreq__file.is-done .lwreq__file-fill {
	background: transparent;
}

/* Sprachnachricht: Player unter der Dateizeile */
.lwreq__file--audio {
	grid-template-areas:
		"name meta remove"
		"player player player";
	row-gap: 8px;
}

.lwreq__file--audio .lwreq__file-name {
	grid-area: name;
}

.lwreq__file--audio .lwreq__file-meta {
	grid-area: meta;
}

.lwreq__file--audio .lwreq__file-remove {
	grid-area: remove;
}

.lwreq__file-player {
	grid-area: player;
	width: 100%;
	height: 36px;
}

.lwreq__file-remove {
	padding: 6px 10px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--lwreq-muted);
	font: inherit;
	font-size: 13px;
	text-decoration: underline;
	cursor: pointer;
}

.lwreq__file-remove:hover {
	color: var(--lwreq-error);
}

/* --- Consent, Honeypot, Submit --- */

/* --- Info-Box "So geht es weiter" --- */

.lwreq__steps {
	margin: 0 0 18px 0;
	padding: 18px 22px;
	border-left: 4px solid var(--lwreq-primary);
	border-radius: 8px;
	background: var(--lwreq-primary-brighter);
}

.lwreq__steps-title {
	margin: 0 0 10px 0;
	font-size: 16px;
	font-weight: 600;
	text-align: left;
	text-transform: none;
}

.lwreq__steps-list {
	margin: 0;
	padding: 0 0 0 4px;
	list-style: none;
	counter-reset: lwreq-step;
}

.lwreq__steps-list li {
	position: relative;
	counter-increment: lwreq-step;
	padding: 0 0 0 34px;
	margin: 0 0 8px 0;
	font-size: 15px;
	line-height: 1.5;
}

.lwreq__steps-list li::before {
	content: counter(lwreq-step);
	position: absolute;
	left: 0;
	top: -1px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: var(--lwreq-primary);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
}

.lwreq__steps-note {
	margin: 12px 0 0 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--lwreq-primary-hover);
}

/* --- Kostenlos-Hinweis --- */

.lwreq__free {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin: 0 0 14px 0;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
}

.lwreq__free svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 1px;
	fill: var(--lwreq-primary);
}

.lwreq__consent {
	margin: 0 0 20px 0;
	font-size: 14px;
	line-height: 1.6;
}

/* Ganzer Satz statt Label-Wort: die Theme-Grossbuchstaben waeren hier
   schwer lesbar. */
.lwreq__consent label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	cursor: pointer;
	text-transform: none;
	letter-spacing: 0;
	font-size: 14px;
}

.lwreq__consent input {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	accent-color: var(--lwreq-primary);
}

.lwreq__consent a {
	color: var(--lwreq-primary-hover);
}

.lwreq__hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.lwreq__turnstile {
	margin: 0 0 18px 0;
}

.lwreq__submit-row {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 14px;
}

.lwreq__status {
	font-size: 14px;
	color: var(--lwreq-muted);
}

.lwreq__error {
	margin: 14px 0 0 0;
	padding: 12px 14px;
	border-radius: 8px;
	background: #fdecea;
	color: var(--lwreq-error);
	font-size: 14px;
	line-height: 1.5;
}

.lwreq__warning {
	margin: 14px 0 0 0;
	padding: 12px 14px;
	border-radius: 8px;
	background: var(--lwreq-primary-brighter);
	color: var(--lwreq-primary-hover);
	font-size: 14px;
}

/* --- Erfolg --- */

.lwreq__success {
	max-width: 620px;
	margin: 0 auto;
	padding: 36px 28px;
	border: 2px solid var(--lwreq-primary-bright);
	border-radius: var(--lwreq-radius);
	background: var(--lwreq-primary-brighter);
	text-align: center;
}

.lwreq__success-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 56px;
	height: 56px;
	margin: 0 auto 16px auto;
	border-radius: 50%;
	background: var(--lwreq-primary);
}

.lwreq__success-icon svg {
	width: 32px;
	height: 32px;
	fill: #fff;
}

.lwreq__success h3 {
	margin: 0 0 10px 0;
}

.lwreq__success p {
	margin: 0 0 8px 0;
	line-height: 1.6;
}

.lwreq__reference {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
	margin-top: 14px;
	padding: 10px 18px;
	border-radius: 8px;
	background: #fff;
	font-size: 14px;
}

.lwreq__reference span {
	color: var(--lwreq-muted);
}

.lwreq__reference strong {
	font-size: 16px;
}

/* Referenz-Anzeige auf der Danke-Seite (ausserhalb von .lwreq) */
.lwreq__reference.lwreq-standalone {
	display: inline-flex;
	flex-direction: column;
	gap: 2px;
	padding: 12px 20px;
	border: 1px solid #f5cd93;
	border-radius: 8px;
	background: #fff6e8;
	font-size: 14px;
}

.lwreq__reference.lwreq-standalone span {
	color: #6b7480;
}
