/*
 * EYEDEA – Kontaktseite (Block 3.5), nur auf /kontakt/ geladen.
 * Formular (Fluent Forms ohne eigenes CSS), Chip „Bezug“, Danke-Fläche, Ansprechpartner, Kundenstimmen „Wechsel“.
 * Werte aus theme.json (Kurznamen in eyedea.css). Artboard „Kontakt“, CI-Leitfaden 10.11.
 */

/* ===================== Anordnung ===================== */

.seite-breite > .kopf-baustein:first-child + .kontakt-raster { margin-top: 56px; }

.seite-breite .kontakt-raster {
	gap: 64px;
	align-items: flex-start;
}

.kontakt-raster > .wp-block-column:last-child {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

@media (max-width: 1060px) {
	.seite-breite .kontakt-raster { flex-wrap: wrap !important; }
	.kontakt-raster > .wp-block-column { flex-basis: 100% !important; }
}

/* „So geht es weiter“: Label als Überschrift (h2) */
.seite-breite > h2.label {
	margin-top: var(--wp--preset--spacing--abschnitt-gross);
	margin-bottom: 0;
}
.seite-breite > h2.label + * { margin-top: 24px; }

/* ===================== Formular ===================== */

.anfrage-formular fieldset {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 20px;
	min-width: 0;
}

.anfrage-formular .ff-el-group { margin: 0; min-width: 0; }
.anfrage-formular .feld-voll { grid-column: 1 / -1; }
.anfrage-formular legend.ff_screen_reader_title { position: absolute !important; }

@media (max-width: 640px) {
	.anfrage-formular fieldset { grid-template-columns: minmax(0, 1fr); }
}

/* Label */
.anfrage-formular .ff-el-input--label { margin-bottom: 8px; }
.anfrage-formular .ff-el-input--label label {
	display: block;
	color: var(--c-grau);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .1em;
	line-height: 1.3;
	text-transform: uppercase;
}
.anfrage-formular .ff-el-is-required label::after { content: " *"; }

/* Felder */
.anfrage-formular .ff-el-form-control {
	display: block;
	width: 100%;
	min-height: 52px;
	margin: 0;
	padding: 14px 16px;
	border: 1px solid var(--c-rahmen);
	border-radius: 0;
	background: var(--c-flaeche);
	color: var(--c-text);
	font-family: inherit;
	font-size: 16px;
	font-weight: 500;
	line-height: 1.4;
	box-shadow: none;
	transition: border-color var(--uebergang);
}

.anfrage-formular .ff-el-form-control::placeholder { color: var(--c-grau); opacity: 1; }
.anfrage-formular .ff-el-form-control:focus { border-color: var(--c-rot); }
/* Mausklick: nur roter Rahmen; Tastatur: zusätzlich Fokus-Rahmen laut CI (eyedea.css) */
.anfrage-formular .ff-el-form-control:focus:not(:focus-visible) { outline: none; }

.anfrage-formular textarea.ff-el-form-control { min-height: 160px; resize: vertical; line-height: 1.6; }

/* Auswahl: roter Pfeil */
.anfrage-formular select.ff-el-form-control {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 44px;
	background-image: linear-gradient(45deg, transparent 50%, var(--c-rot) 50%), linear-gradient(135deg, var(--c-rot) 50%, transparent 50%);
	background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
	background-size: 6px 6px;
	background-repeat: no-repeat;
	cursor: pointer;
}
.anfrage-formular select.ff-el-form-control option { background: var(--c-flaeche); color: var(--c-text); }

/* Fehler: Feld mit rotem Rahmen, Text hell mit rotem Strich (Kontrast; CI: keine Mischfarben) */
.anfrage-formular .ff-el-is-error .ff-el-form-control,
.anfrage-formular .ff-el-form-control[aria-invalid="true"] { border-color: var(--c-rot); }

.anfrage-formular .error {
	margin-top: 8px;
	padding-left: 10px;
	border-left: 2px solid var(--c-rot);
	color: var(--c-text);
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
}

.anfrage-formular + .ff-errors-in-stack:not(:empty),
.ff-errors-in-stack:not(:empty) {
	margin-top: 16px;
	padding: 12px 16px;
	border-left: 2px solid var(--c-rot);
	background: var(--c-flaeche);
	color: var(--c-text);
	font-size: 14px;
}
.ff-errors-in-stack .error { margin: 0; }

/* Honeypot: Fluent Forms blendet es inline aus, hier zur Sicherheit */
.ff-hpsf-container { display: none !important; }

/* Hinweis links, Button rechts */
.anfrage-formular .ff-custom_html { grid-column: 1 / 2; align-self: center; }
.anfrage-formular .ff_submit_btn_wrapper { grid-column: 2 / 3; justify-self: end; align-self: center; margin: 0; }

/* C10 (F10): Hinweis nur ohne JavaScript (steht im noscript) */
.anfrage-ohne-js {
	margin: 0 0 24px;
	padding: 16px 20px;
	border-left: 2px solid var(--c-rot);
	background: var(--c-flaeche);
	color: var(--c-text);
	font-size: 15px;
	line-height: 1.5;
}
.anfrage-ohne-js a { color: var(--c-text); overflow-wrap: anywhere; }

.anfrage-hinweis {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin: 0;
	color: var(--c-grau);
	font-size: 12px;
	line-height: 1.5;
}
.anfrage-hinweis a { color: var(--c-grau); }
.anfrage-hinweis a:focus-visible { color: var(--c-rot); }
@media (hover: hover) and (pointer: fine) {
	.anfrage-hinweis a:hover { color: var(--c-rot);
	}
}

@media (max-width: 640px) {
	.anfrage-formular .ff-custom_html,
	.anfrage-formular .ff_submit_btn_wrapper { grid-column: 1 / -1; justify-self: stretch; }
	.anfrage-formular .ff-btn-submit { width: 100%; }
}

/* Senden: roter Button (bausteine.css), Abstände wie Artboard */
.anfrage-formular .ff-btn-submit { min-height: 52px; padding: 0 32px; }
.anfrage-formular .ff-btn-submit:disabled { cursor: progress; opacity: .6; }
.anfrage-formular.ff-form-loading .ff-btn-submit,
.anfrage-formular .ff-working { cursor: progress; }
.anfrage-formular .ff-loading-icon,
.anfrage-formular .ff-btn-submit .ff-svg-loader { display: none; }

/* ===================== Bezug zum Film (Chip) ===================== */

.anfrage-bezug {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin-bottom: 24px;
}

.anfrage-bezug-text { color: var(--c-grau); font-size: 13px; }

.chip {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	min-height: 40px;
	padding: 0 4px 0 14px;
	border: 1px solid var(--c-rot);
	font-size: 13px;
	font-weight: 700;
	letter-spacing: .06em;
	text-transform: uppercase;
}

.chip-entfernen {
	display: inline-grid;
	place-items: center;
	width: 32px;
	height: 32px;
	color: var(--c-text);
	font-size: 18px;
	line-height: 1;
	text-decoration: none;
}

/* ===================== Danke-Fläche ===================== */

.fluentform .ff-message-success {
	padding: 48px;
	border-left: 3px solid var(--c-rot);
	background: var(--c-flaeche);
}
.fluentform .ff-message-success:focus { outline: none; }
.fluentform .ff-message-success:focus-visible { outline: 2px solid var(--c-rot); outline-offset: 3px; }
.ff-message-success .label { margin: 0; }
.ff-message-success h2 {
	margin: 12px 0 0;
	font-size: 32px;
	font-weight: 800;
	line-height: 1.1;
	text-transform: uppercase;
}
.ff-message-success p:not(.label) {
	margin: 16px 0 0;
	color: var(--c-grau-hell);
	font-size: 17px;
	line-height: 1.6;
}

@media (max-width: 640px) {
	.fluentform .ff-message-success { padding: 32px 24px; }
}

/* ===================== Ansprechpartner ===================== */

.portrait-ring--mittel {
	--groesse: 88px;
	box-shadow: 0 0 0 3px var(--c-hg);
}
.portrait-ring--mittel::after { inset: -4px; }

.ansprechpartner { display: flex; flex-direction: column; gap: 40px; }
.ansprechpartner p { margin: 0; }

.ansprechpartner-person { display: flex; align-items: center; gap: 20px; }
.ansprechpartner-name { font-size: 18px; font-weight: 800; line-height: 1.3; }
.ansprechpartner-funktion { margin-top: 4px !important; color: var(--c-grau); font-size: 14px; }

.ansprechpartner-kontakt { display: flex; flex-direction: column; gap: 14px; } /* C6a: gleichmäßig enger (vorher stand <address> außerhalb des Absatzes, Abstand 40 px) */
.ansprechpartner-kontakt address { margin: 0; }
.ansprechpartner-kontakt a { text-decoration: none; }
.ansprechpartner-telefon { font-size: 24px; font-weight: 800; }
.ansprechpartner-mail { color: var(--c-grau-hell); font-size: 18px; font-weight: 500; }
.ansprechpartner-anschrift { color: var(--c-grau-hell); font-size: 16px; font-style: normal; }
.ansprechpartner-zeile { margin-top: 0; color: var(--c-grau); font-size: 14px; }

/* ===================== Kundenstimmen „Wechsel“ ===================== */

.stimmen-wechsel {
	padding-top: 32px;
	border-top: 1px solid var(--c-linie);
}
.stimmen-wechsel > .label { margin-bottom: 20px; }

.stimmen-wechsel .kundenstimme {
	gap: 24px;
	padding: 0;
	background: none;
}
.stimmen-wechsel .kundenstimme-zeichen { width: 32px; height: 24px; }
.stimmen-wechsel .kundenstimme blockquote p { font-size: 20px; line-height: 1.55; }

/* Ohne JavaScript: alle untereinander */
.stimmen-wechsel-buehne { display: flex; flex-direction: column; gap: 40px; }

/* Mit JavaScript: übereinander in einer Zelle (Höhe = längste Stimme), Überblenden */
.stimmen-wechsel--js .stimmen-wechsel-buehne { display: grid; gap: 0; }
.stimmen-wechsel--js .stimmen-wechsel-eintrag {
	grid-area: 1 / 1;
	opacity: 0;
	filter: blur(2px); /* C6a (9): 0,5 s statt 0,9 s, leichte Unschärfe verbindet alten und neuen Text */
	visibility: hidden;
	transition: opacity .5s ease, filter .5s ease, visibility 0s linear .5s;
}
.stimmen-wechsel--js .stimmen-wechsel-eintrag.ist-aktiv {
	opacity: 1;
	filter: none;
	visibility: visible;
	transition: opacity .5s ease, filter .5s ease, visibility 0s;
}

/* B6: Alle Stimmen teilen sich dieselben Zeilen (subgrid): Porträt und Name springen beim Wechsel nicht,
   die Bühne ist so hoch wie die längste Stimme. */
@supports (grid-template-rows: subgrid) {
	.stimmen-wechsel--js .stimmen-wechsel-buehne { grid-template-rows: auto auto auto; }
	.stimmen-wechsel--js .stimmen-wechsel-eintrag {
		grid-area: 1 / 1 / 4 / 2;
		display: grid;
		grid-template-rows: subgrid;
	}
	.stimmen-wechsel .kundenstimme { row-gap: 24px; }
	.stimmen-wechsel .kundenstimme figcaption { grid-row: 3; }
}

@media (prefers-reduced-motion: reduce) {
	.stimmen-wechsel--js .stimmen-wechsel-eintrag,
	.stimmen-wechsel--js .stimmen-wechsel-eintrag.ist-aktiv { transition: none; }
}

/* Ohne JavaScript: Hinweis über dem Formular */
.anfrage-ohne-js {
	margin: 0 0 24px;
	padding: 16px 20px;
	border-left: 2px solid var(--c-rot);
	background: var(--c-flaeche);
	font-size: 15px;
	line-height: 1.6;
}

/* C6b: Smartphone – Mail etwas kleiner (eine Zeile bei 360 px), Anschrift gleicher Abstand wie die übrigen Zeilen */
@media (max-width: 699px) {
	.ansprechpartner-mail { font-size: 16px; }
	.ansprechpartner-anschrift { font-size: 14px; }
}
