.pq-cf7-wizard-admin-note {
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    border: 1px solid #f0ad4e;
    background: #fff7e6;
    color: #5c4400;
    font-size: 0.95rem;
}

.pq-cf7-wizard-native-submit {
    display: none;
}

.PQFormWrapper.pq-cf7-wizard.pq-cf7-wizard-is-sent,
.PQFormWrapper.pq-cf7-wizard.pq-cf7-wizard-is-sent.sidebarTabs {
    display: none !important;
}

/* Fehlerhafte Felder deutlich markieren (setzt sich gegen Theme-Rahmen durch). */
.pq-cf7-wizard input.wpcf7-not-valid:not([type="checkbox"]):not([type="radio"]),
.pq-cf7-wizard select.wpcf7-not-valid,
.pq-cf7-wizard textarea.wpcf7-not-valid {
    border-color: #c1121f !important;
    background-color: #fdf0f1 !important;
    box-shadow: 0 0 0 0.2rem rgba(193, 18, 31, 0.2) !important;
}

/* Checkbox-/Radio-Gruppen: ganze Gruppe umranden. */
.pq-cf7-wizard .pq-cf7-wizard-not-valid .wpcf7-checkbox,
.pq-cf7-wizard .pq-cf7-wizard-not-valid .wpcf7-radio {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border: 2px solid #c1121f;
    border-radius: 4px;
    background-color: #fdf0f1;
}

.pq-cf7-wizard .wpcf7-not-valid-tip {
    color: #c1121f;
}

.pq-cf7-wizard .pq-cf7-wizard-not-valid.wpcf7-acceptance,
.pq-cf7-wizard .pq-cf7-wizard-not-valid .wpcf7-acceptance {
    outline: 2px solid #c1121f;
    outline-offset: 0.35rem;
}

.pq-cf7-wizard .wpcf7-not-valid-tip {
    display: block;
    margin-top: 0.35rem;
}

/*
 * CF7 startet mit der Formularklasse "init" und wechselt bei der
 * clientseitigen Live-Validierung (SWV) zu "validating" - u. a. ausgeloest
 * durch Browser-Autofill, das change-Events feuert. Sobald "init" weg ist,
 * wird die (leere) .wpcf7-response-output-Region sichtbar, die das Avada/
 * Fusion-Theme als umrandete Alert-Box darstellt.
 *
 * Die Region nur in echten Ergebnis-Zustaenden zeigen (invalid/sent/failed/
 * spam/unaccepted/...). In den transienten Zustaenden bleibt sie verborgen.
 */
form.init:has(.pq-cf7-wizard) .wpcf7-response-output,
form.validating:has(.pq-cf7-wizard) .wpcf7-response-output,
form.submitting:has(.pq-cf7-wizard) .wpcf7-response-output,
form.resetting:has(.pq-cf7-wizard) .wpcf7-response-output {
    display: none !important;
}

.pq-cf7-wizard .pq-cf7-wizard-charcount {
    display: block;
    margin-top: 0.35rem;
    font-size: 0.85rem;
    line-height: 1.2;
    color: #6c757d;
    text-align: right;
}

.pq-cf7-wizard .pq-cf7-wizard-charcount.pq-cf7-wizard-charcount-limit {
    color: #c1121f;
    font-weight: 600;
}

#PQWizardLoadingModal,
#PQWizardWarningModal {
    z-index: 200000 !important;
}

#PQWizardLoadingModal.show,
#PQWizardWarningModal.show {
    display: flex !important;
    opacity: 1 !important;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#PQWizardLoadingModal .modal-dialog,
#PQWizardWarningModal .modal-dialog {
    position: relative;
    z-index: 200001;
    margin: 0 auto;
    width: min(100%, 32rem);
    max-width: 32rem;
}

#PQWizardLoadingModal .modal-content,
#PQWizardWarningModal .modal-content {
    pointer-events: auto;
}

.modal-backdrop.show {
    background-color: rgba(0, 0, 0, 0.5) !important;
    opacity: 1 !important;
    z-index: 199999 !important;
}

.pq-cf7-wizard-pdf-download {
    margin: 1.5rem auto;
    max-width: 48rem;
    text-align: center;
}

.pq-cf7-wizard-pdf-download p {
    margin-bottom: 0.75rem;
}

.pq-cf7-wizard-pdf-download .pq-cf7-wizard-pdf-download-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 13px 29px;
    border-radius: 30px;
    /* Gruen wie die Theme-Buttons (form.css setzt --primary auf Blau). */
    background-color: var(--pq-cf7-download-bg, #247a56);
    color: #fff !important;
    font-weight: 500;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    transition: filter 0.15s ease;
}

.pq-cf7-wizard-pdf-download .pq-cf7-wizard-pdf-download-button::before {
    /* PDF-Dokument-Icon (weiss; currentColor wird vom Theme ueberschrieben). */
    content: "";
    flex: 0 0 auto;
    width: 1.35em;
    height: 1.35em;
    background-color: #fff;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zM7.5 13h1.8c1 0 1.7.7 1.7 1.6s-.7 1.6-1.7 1.6H8.6V18H7.5v-5zm1.1 2.2h.7c.4 0 .7-.3.7-.6s-.3-.6-.7-.6h-.7v1.2zM11.8 13h1.6c1.4 0 2.3 1 2.3 2.5S14.8 18 13.4 18h-1.6v-5zm1.1 4h.5c.7 0 1.2-.6 1.2-1.5s-.5-1.5-1.2-1.5h-.5v3zM16.5 13h3v1h-1.9v1h1.7v1h-1.7v2h-1.1v-5z'/%3E%3C/svg%3E") no-repeat center / contain;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill-rule='evenodd' d='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8l-6-6zm-1 7V3.5L18.5 9H13zM7.5 13h1.8c1 0 1.7.7 1.7 1.6s-.7 1.6-1.7 1.6H8.6V18H7.5v-5zm1.1 2.2h.7c.4 0 .7-.3.7-.6s-.3-.6-.7-.6h-.7v1.2zM11.8 13h1.6c1.4 0 2.3 1 2.3 2.5S14.8 18 13.4 18h-1.6v-5zm1.1 4h.5c.7 0 1.2-.6 1.2-1.5s-.5-1.5-1.2-1.5h-.5v3zM16.5 13h3v1h-1.9v1h1.7v1h-1.7v2h-1.1v-5z'/%3E%3C/svg%3E") no-repeat center / contain;
}

.pq-cf7-wizard-pdf-download .pq-cf7-wizard-pdf-download-button:hover,
.pq-cf7-wizard-pdf-download .pq-cf7-wizard-pdf-download-button:focus {
    color: #fff;
    filter: brightness(0.9);
}

.pq-cf7-wizard-pdf-download .pq-cf7-wizard-pdf-download-hint {
    margin-top: 0.75rem !important;
    font-size: 0.875em;
    opacity: 0.75;
    word-break: break-all;
}
