/* Eventformular: lokale Gestaltung für Contact Form 7.
 * Im CF7-Formular alle sichtbaren Felder mit <div class="nsb-event-form"> umschließen.
 * Farben und Schrift folgen den globalen Einstellungen des Themes.
 */
.nsb-event-form {
    color: var(--nsb-ink);
    font-family: inherit;
    line-height: 1.4;
    width: 100%;
    min-width: 0;
}
.nsb-event-form > p { margin: 0 0 20px; }
.nsb-event-form label {
    display: block;
    color: var(--nsb-navy);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.35;
}
.nsb-event-form .wpcf7-form-control-wrap {
    display: block;
    margin-top: 8px;
}
/* CF7 fügt zwischen Beschriftung und Feld gegebenenfalls einen Umbruch ein. */
.nsb-event-form label > br { display: none; }
.nsb-event-form input:where([type="text"], [type="email"], [type="tel"], [type="url"], [type="number"], [type="date"]),
.nsb-event-form textarea,
.nsb-event-form select {
    box-sizing: border-box;
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    min-height: 50px;
    margin: 0;
    padding: 13px 16px;
    border: 1px solid var(--nsb-line);
    border-radius: 0;
    background: var(--nsb-paper);
    color: var(--nsb-ink);
    font: inherit;
    font-weight: 400;
    line-height: 1.4;
}
.nsb-event-form textarea { min-height: 160px; resize: vertical; }
.nsb-event-form :where(input, textarea)::placeholder { color: var(--nsb-muted); opacity: 1; }
.nsb-event-form :where(input, textarea, select):focus-visible {
    outline: 2px solid var(--nsb-navy);
    outline-offset: 2px;
    border-color: var(--nsb-navy);
}
.nsb-event-form a { color: var(--nsb-navy); text-underline-offset: 3px; }
.nsb-event-form > p:has(> label) { color: var(--nsb-navy); }
.nsb-event-form > p:not(:has(label, .wpcf7-submit)) {
    color: var(--nsb-muted);
    font-size: .875rem;
    line-height: 1.45;
}
.nsb-event-form .wpcf7-submit {
    box-sizing: border-box;
    display: inline-block;
    max-width: 100%;
    min-height: 50px;
    padding: 16px 24px;
    border: 2px solid transparent;
    border-radius: 0;
    background: var(--nsb-orange);
    color: #fff;
    font: inherit;
    font-weight: 700;
    line-height: 1.35;
    white-space: normal;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}
.nsb-event-form .wpcf7-submit:hover { filter: brightness(.96); }
.nsb-event-form .wpcf7-submit:focus-visible {
    outline: 3px solid var(--nsb-navy);
    outline-offset: 3px;
}
.nsb-event-form .wpcf7-submit:disabled,
.wpcf7-form.submitting .nsb-event-form .wpcf7-submit { opacity: .65; cursor: wait; }
.nsb-event-form .wpcf7-spinner { vertical-align: middle; margin: 8px 12px; }
.nsb-event-form :where(input, textarea, select).wpcf7-not-valid { border-color: #a52a2a; }
.nsb-event-form .wpcf7-not-valid-tip {
    display: block;
    margin-top: 7px;
    color: #a52a2a;
    font-size: .875rem;
    font-weight: 400;
    line-height: 1.4;
}
/* Die CF7-Rückmeldung liegt außerhalb des eigenen Formular-Wrappers.
 * Ihre eingebaute Sichtbarkeit vor/nach dem Absenden bleibt erhalten.
 */
.wpcf7-form .nsb-event-form ~ .wpcf7-response-output {
    margin: 24px 0 0;
    padding: 16px 20px;
    border: 2px solid var(--nsb-navy);
    color: var(--nsb-ink);
    background: var(--nsb-paper);
    font: inherit;
    line-height: 1.45;
}
.wpcf7-form.sent .nsb-event-form ~ .wpcf7-response-output { border-color: #287044; }
.wpcf7-form:where(.invalid, .unaccepted, .failed, .aborted, .spam) .nsb-event-form ~ .wpcf7-response-output { border-color: #a52a2a; }
@media (max-width: 600px) {
    .nsb-event-form .wpcf7-submit { width: 100%; padding-inline: 16px; }
}
