/* E3/DC Formular-Prüfung: sichtbare Fehler für alle Contact-Form-7-Formulare
 *
 * Das Child-Theme blendet die Hinweise unter den Feldern aus und setzt die
 * roten Rahmen auf 0px. Hier werden sie nach dem ersten Absenden wieder
 * sichtbar, in hell (.wpcf7.e3cf) und dunkel (.wpcf7.e3cf.is-dark).
 * Die Klasse e3cf setzt script.js an jedes Formular außer an die mit eigenem Stil.
 */
.wpcf7.e3cf {
    --e3cf-err: #c9362d; --e3cf-ring: #e0574f;
    --e3cf-bad-bg: #fdecea; --e3cf-bad-tx: #8a1f17;
    --e3cf-ok-bg: #eaf6e6; --e3cf-ok-tx: #1f5d14;
}
.wpcf7.e3cf.is-dark {
    --e3cf-err: #ff9a90; --e3cf-ring: #ff6b5e;
    --e3cf-bad-bg: rgba(255, 107, 94, .14); --e3cf-bad-tx: #ffd9d4;
    --e3cf-ok-bg: rgba(92, 194, 68, .18); --e3cf-ok-tx: #e0ffd2;
}

/* Hinweis unter dem Feld, erst nach dem Absenden */
.wpcf7.e3cf form .wpcf7-not-valid-tip { display: none !important; }
html body .wpcf7.e3cf form.invalid .wpcf7-not-valid-tip,
html body .wpcf7.e3cf form.unaccepted .wpcf7-not-valid-tip {
    display: block !important; position: static !important; inset: auto !important; width: auto !important;
    margin: 6px 0 0 !important; padding: 0 !important; border: 0 !important; background: none !important; box-shadow: none !important;
    font-size: 12.5px !important; line-height: 1.4 !important; font-weight: 400 !important; letter-spacing: 0 !important; text-transform: none !important;
    text-align: left !important; color: var(--e3cf-err) !important;
}

/* Roter Rahmen am Feld (als Schatten, damit er auch bei Feldern ohne Rahmen sichtbar ist) */
html body .wpcf7.e3cf form.invalid input.wpcf7-not-valid,
html body .wpcf7.e3cf form.invalid select.wpcf7-not-valid,
html body .wpcf7.e3cf form.invalid textarea.wpcf7-not-valid,
html body .wpcf7.e3cf form.unaccepted input.wpcf7-not-valid {
    border-color: var(--e3cf-ring) !important; box-shadow: inset 0 0 0 1.5px var(--e3cf-ring) !important;
}
/* Kästchen (Datenschutz, Auswahl) rot umrandet, solange sie fehlen */
html body .wpcf7.e3cf form .wpcf7-form-control.wpcf7-not-valid .wpcf7-list-item-label::before { border-color: var(--e3cf-ring) !important; }
html body .wpcf7.e3cf form .wpcf7-form-control.wpcf7-not-valid { border-color: transparent !important; }

/* Angehakt: weißer Haken im grünen Kästchen (im Theme fehlt das Bild) */
html body .wpcf7.e3cf .wpcf7-form-control input:checked + span.wpcf7-list-item-label::before {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") !important;
    background-size: 68% 68% !important; background-position: center !important; background-repeat: no-repeat !important;
}
html body .wpcf7.e3cf .wpcf7-form-control.wpcf7-not-valid input:checked + span.wpcf7-list-item-label::before { border-color: transparent !important; }

/* Meldung unter dem Button: lesbar auf Hell und Dunkel */
html body .wpcf7.e3cf form .wpcf7-response-output {
    margin: 16px 0 0 !important; padding: 12px 16px !important; border: 0 !important; border-radius: 12px !important;
    font-size: 14px !important; line-height: 1.5 !important; text-align: left !important;
}
html body .wpcf7.e3cf form.init .wpcf7-response-output,
html body .wpcf7.e3cf form.resetting .wpcf7-response-output,
html body .wpcf7.e3cf form.submitting .wpcf7-response-output { display: none !important; }
html body .wpcf7.e3cf form.invalid .wpcf7-response-output,
html body .wpcf7.e3cf form.unaccepted .wpcf7-response-output,
html body .wpcf7.e3cf form.failed .wpcf7-response-output,
html body .wpcf7.e3cf form.aborted .wpcf7-response-output,
html body .wpcf7.e3cf form.spam .wpcf7-response-output { background: var(--e3cf-bad-bg) !important; color: var(--e3cf-bad-tx) !important; }
html body .wpcf7.e3cf:not(:has(.gutscheinform)) form.sent .wpcf7-response-output { background: var(--e3cf-ok-bg) !important; color: var(--e3cf-ok-tx) !important; }

/* Landingpage Ford: Straße und PLZ nebeneinander statt schmal zentriert */
.lp-ford-form-container .form-row:has(> .form-half) { display: grid !important; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 14px; }
.lp-ford-form-container .form-half { display: block !important; width: auto !important; margin: 0 !important; text-align: left !important; }
.lp-ford-form-container .form-half p { margin: 0 !important; padding: 0 !important; }
.lp-ford-form-container .form-half input { width: 100% !important; box-sizing: border-box; }
