.dhp-afu-wrap {
    max-width: 1180px;
    margin: 24px auto;
    font-family: inherit;
}

.dhp-afu-form,
.dhp-afu-form * {
    box-sizing: border-box;
}

.dhp-afu-message {
    margin: 0 0 18px;
    padding: 14px 18px;
    border-radius: 12px;
    font-weight: 600;
}

.dhp-afu-success {
    background: #ecf8f1;
    color: #155d35;
    border: 1px solid #b9e7c9;
}

.dhp-afu-error {
    background: #fff2f2;
    color: #8a1f1f;
    border: 1px solid #f0b9b9;
}

.dhp-afu-searchbar {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr .8fr auto;
    align-items: stretch;
    gap: 0;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 18px 48px rgba(20, 35, 50, .16);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, .08);
}

.dhp-afu-search-field {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 82px;
    padding: 16px 20px;
    border-right: 1px solid rgba(0, 0, 0, .12);
    margin: 0;
}

.dhp-afu-search-field span {
    display: block;
    margin-bottom: 6px;
    font-size: 13px;
    line-height: 1.2;
    color: #5f666b;
    font-weight: 600;
}

.dhp-afu-search-field input {
    width: 100%;
    border: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    color: #2c3236;
    font-size: 16px;
    line-height: 1.4;
    outline: none !important;
    box-shadow: none !important;
    appearance: auto;
    -webkit-appearance: auto;
}

.dhp-afu-search-field input[type="text"],
.dhp-afu-search-field input[type="date"],
.dhp-afu-search-field input[type="number"] {
    border-color: transparent !important;
    background-color: transparent !important;
    box-shadow: none !important;
}

.dhp-afu-search-field input:focus,
.dhp-afu-search-field input:active {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

.dhp-afu-search-field input[readonly] {
    color: #2c3236;
    cursor: default;
}

.dhp-afu-search-button,
.dhp-afu-submit {
    border: 0;
    cursor: pointer;
    font-weight: 700;
    color: #ffffff;
    background: #0f789d;
    transition: transform .16s ease, background .16s ease, box-shadow .16s ease;
}

.dhp-afu-search-button {
    min-width: 150px;
    margin: 6px;
    border-radius: 12px;
    font-size: 16px;
}

.dhp-afu-search-button:hover,
.dhp-afu-submit:hover {
    background: #0b6382;
    transform: translateY(-1px);
}

.dhp-afu-details {
    margin-top: 22px;
    padding: 26px;
    background: #ffffff;
    border-radius: 18px;
    box-shadow: 0 14px 38px rgba(20, 35, 50, .12);
    border: 1px solid rgba(0, 0, 0, .08);
}


/* Version 0.3.7: Theme-Rahmen an Containern und Labels des Folgeformulars neutralisieren.
   Die rote Rahmenfarbe bleibt nur auf echten Formularfeldern aktiv. */
.dhp-afu-details {
    border: 1px solid rgba(0, 0, 0, .08) !important;
    outline: 0 !important;
}

.dhp-afu-details .dhp-afu-grid,
.dhp-afu-details .dhp-afu-grid label,
.dhp-afu-details .dhp-afu-consents,
.dhp-afu-details .dhp-afu-consents label {
    border: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
}

.dhp-afu-intro {
    margin-bottom: 22px;
}

.dhp-afu-intro h3 {
    margin: 0 0 8px;
    color: #1f2b33;
    font-size: 24px;
    line-height: 1.25;
}

.dhp-afu-intro p,
.dhp-afu-note {
    margin: 0;
    color: #58636a;
    font-size: 15px;
    line-height: 1.55;
}

.dhp-afu-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.dhp-afu-grid label,
.dhp-afu-consents label {
    margin: 0;
}

.dhp-afu-grid span {
    display: block;
    margin-bottom: 7px;
    color: #34424b;
    font-size: 14px;
    font-weight: 700;
}

.dhp-afu-grid input,
.dhp-afu-grid textarea,
.dhp-afu-grid select {
    width: 100%;
    border: 2px solid #B41E3C;
    background: #ffffff;
    border-radius: 10px;
    min-height: 48px;
    padding: 11px 13px;
    color: #1f2b33;
    font-size: 16px;
    line-height: 1.4;
    outline: none;
    box-shadow: none;
    transition: border-color .16s ease, box-shadow .16s ease, background-color .16s ease;
}

.dhp-afu-grid textarea {
    min-height: 92px;
    resize: vertical;
}

.dhp-afu-grid input:focus,
.dhp-afu-grid textarea:focus,
.dhp-afu-grid select:focus {
    border-color: #B41E3C;
    box-shadow: 0 0 0 3px rgba(180, 30, 60, .20);
}

.dhp-afu-grid input:focus-visible,
.dhp-afu-grid textarea:focus-visible,
.dhp-afu-grid select:focus-visible {
    outline: 3px solid rgba(180, 30, 60, .28);
    outline-offset: 2px;
}

.dhp-afu-wide {
    grid-column: 1 / -1;
}

.dhp-afu-consents {
    display: grid;
    gap: 12px;
    margin: 20px 0;
}

.dhp-afu-consents label {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    color: #34424b;
    font-size: 14px;
    line-height: 1.45;
}

.dhp-afu-consents input {
    margin-top: 3px;
}

.dhp-afu-consents a {
    color: #0f789d;
    text-decoration: underline;
}

.dhp-afu-errors {
    display: none;
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
    background: #fff2f2;
    border: 1px solid #f0b9b9;
    color: #8a1f1f;
    font-weight: 600;
}

.dhp-afu-errors.is-visible {
    display: block;
}

.dhp-afu-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border-radius: 12px;
    font-size: 16px;
}

.dhp-afu-note {
    margin-top: 12px;
    max-width: 760px;
}

.dhp-afu-hp {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 900px) {
    .dhp-afu-searchbar {
        grid-template-columns: 1fr 1fr;
    }
    .dhp-afu-search-field {
        border-right: 0;
        border-bottom: 1px solid rgba(0, 0, 0, .1);
    }
    .dhp-afu-search-button {
        grid-column: 1 / -1;
        min-height: 58px;
    }
}

@media (max-width: 640px) {
    .dhp-afu-wrap {
        margin: 16px auto;
    }
    .dhp-afu-searchbar,
    .dhp-afu-grid {
        grid-template-columns: 1fr;
    }
    .dhp-afu-search-field {
        min-height: 72px;
        padding: 14px 16px;
    }
    .dhp-afu-details {
        padding: 20px;
        border-radius: 14px;
    }
    .dhp-afu-grid input,
    .dhp-afu-grid textarea,
    .dhp-afu-grid select {
        min-height: 52px;
        font-size: 16px;
    }
    .dhp-afu-intro h3 {
        font-size: 21px;
    }
}

.dhp-afu-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 22px;
    padding: 0;
    list-style: none;
}

.dhp-afu-progress li {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 999px;
    background: #f3f1ed;
    color: #706960;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
}

.dhp-afu-progress span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #ffffff;
    color: inherit;
    font-size: 12px;
    flex: 0 0 auto;
}

.dhp-afu-progress li.is-active {
    background: #B41E3C;
    color: #ffffff;
}

.dhp-afu-progress li.is-complete {
    background: #efe2e6;
    color: #B41E3C;
}

@media (max-width: 640px) {
    .dhp-afu-progress {
        grid-template-columns: 1fr;
    }
}


/* Version 0.2.8: einheitliche barrierefreundliche Rahmenfarbe im erweiterten Anfrageformular.
   Sehr spezifisch, damit Theme-Styles keine gelben Eingaberahmen mehr setzen. */
.dhp-afu-form .dhp-afu-details .dhp-afu-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.dhp-afu-form .dhp-afu-details .dhp-afu-grid select,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid textarea {
    border: 2px solid #B41E3C !important;
    border-color: #B41E3C !important;
    outline: none;
    box-shadow: none;
    background-color: #ffffff;
}

.dhp-afu-form .dhp-afu-details .dhp-afu-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):hover,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid select:hover,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid textarea:hover,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):valid,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid select:valid,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid textarea:valid,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):invalid,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid select:invalid,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid textarea:invalid {
    border-color: #B41E3C !important;
}

.dhp-afu-form .dhp-afu-details .dhp-afu-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid select:focus,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid textarea:focus,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):focus-visible,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid select:focus-visible,
.dhp-afu-form .dhp-afu-details .dhp-afu-grid textarea:focus-visible {
    border-color: #B41E3C !important;
    box-shadow: 0 0 0 3px rgba(180, 30, 60, .22) !important;
    outline: 3px solid rgba(180, 30, 60, .28);
    outline-offset: 2px;
}

@media (max-width: 720px) {
    .dhp-afu-form .dhp-afu-details .dhp-afu-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
    .dhp-afu-form .dhp-afu-details .dhp-afu-grid select,
    .dhp-afu-form .dhp-afu-details .dhp-afu-grid textarea {
        min-height: 52px;
        font-size: 16px;
    }
}


/* Version 0.2.9/0.3.0: Fallback-Regel gegen Theme-Rahmen im erweiterten Formular. */
.dhp-afu-wrap .dhp-afu-form .dhp-afu-details input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
.dhp-afu-wrap .dhp-afu-form .dhp-afu-details select,
.dhp-afu-wrap .dhp-afu-form .dhp-afu-details textarea,
body .dhp-afu-wrap .dhp-afu-form .dhp-afu-details input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
body .dhp-afu-wrap .dhp-afu-form .dhp-afu-details select,
body .dhp-afu-wrap .dhp-afu-form .dhp-afu-details textarea {
    border: 2px solid #B41E3C !important;
    border-color: #B41E3C !important;
    outline-color: #B41E3C;
}

/* Version 0.3.1: gezielter Schutz gegen Theme-Regel form input:read-write. */
html body .dhp-afu-wrap,
html body .dhp-afu-wrap form.dhp-afu-form,
html body .dhp-afu-wrap .dhp-afu-details,
html body .dhp-afu-wrap .dhp-afu-grid {
    --dhp-afu-field-border-color: #B41E3C !important;
    --formfieldbordercolor: #B41E3C !important;
    --formfieldborderwidth: 2px !important;
    --formfieldborderradius: 10px !important;
}
html body form.dhp-afu-form .dhp-afu-details .dhp-afu-grid input:read-write:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html body form.dhp-afu-form .dhp-afu-details .dhp-afu-grid input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]),
html body form.dhp-afu-form .dhp-afu-details .dhp-afu-grid select,
html body form.dhp-afu-form .dhp-afu-details .dhp-afu-grid textarea {
    --formfieldbordercolor: var(--dhp-afu-field-border-color) !important;
    border-style: solid !important;
    border-width: 2px !important;
    border-color: var(--dhp-afu-field-border-color) !important;
    border-radius: 10px !important;
    background-color: #ffffff !important;
}
.dhp-afu-debug-panel {
    position: fixed;
    right: 16px;
    bottom: 16px;
    z-index: 999999;
    max-width: 360px;
    padding: 14px;
    border: 2px solid #B41E3C;
    border-radius: 12px;
    background: #ffffff;
    color: #1f2b33;
    box-shadow: 0 12px 34px rgba(0,0,0,.22);
    font-size: 13px;
    line-height: 1.45;
}
.dhp-afu-debug-panel strong {
    display: block;
    margin-bottom: 8px;
}
.dhp-afu-debug-panel button {
    margin-top: 10px;
    padding: 6px 10px;
    border: 1px solid #B41E3C;
    border-radius: 6px;
    background: #B41E3C;
    color: #ffffff;
    cursor: pointer;
}

/* Version 0.3.5: Frontend-Schutz fuer Suchleiste gegen aggressive Theme-Formularstile. */
html body .dhp-afu-wrap,
html body .dhp-afu-wrap form.dhp-afu-form {
    border: 0 !important;
    outline: 0 !important;
}

html body .dhp-afu-wrap .dhp-afu-searchbar {
    border-width: 1px !important;
    border-style: solid !important;
    outline: 0 !important;
}

html body .dhp-afu-wrap .dhp-afu-searchbar .dhp-afu-search-field input,
html body .dhp-afu-wrap .dhp-afu-searchbar .dhp-afu-search-field input:read-write,
html body .dhp-afu-wrap .dhp-afu-searchbar .dhp-afu-search-field input:focus,
html body .dhp-afu-wrap .dhp-afu-searchbar .dhp-afu-search-field input:focus-visible,
html body .dhp-afu-wrap .dhp-afu-searchbar .dhp-afu-search-field input:hover,
html body .dhp-afu-wrap .dhp-afu-searchbar .dhp-afu-search-field input:valid,
html body .dhp-afu-wrap .dhp-afu-searchbar .dhp-afu-search-field input:invalid {
    border: 0 !important;
    border-width: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    background: transparent !important;
    background-color: transparent !important;
    border-radius: 0 !important;
    padding: 0 !important;
}

html body .dhp-afu-wrap .dhp-afu-hp {
    position: absolute !important;
    left: -9999px !important;
    top: auto !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(1px, 1px, 1px, 1px) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

/* Version 0.3.9: erweiterte Diagnoseausgabe der Frontend-Fehlerkonsole. */
.dhp-afu-debug-panel {
    width: min(440px, calc(100vw - 32px));
    max-width: 440px;
}
.dhp-afu-debug-panel ul {
    margin: 6px 0 0 18px;
    padding: 0;
}
.dhp-afu-debug-panel li {
    margin: 0 0 4px;
}

/* Version 0.3.19: Hinweise zu Firmenname und Zahlungsmethode. */
.dhp-afu-grid small {
    display: block;
    margin-top: 6px;
    color: #66727a;
    font-size: 13px;
    line-height: 1.4;
}


/* Version 0.3.21: Aktionen im Anfrageformular. */
.dhp-afu-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px;
}
.dhp-afu-clear {
    min-height: 50px;
    padding: 0 20px;
    border-radius: 12px;
    border: 1px solid rgba(15, 120, 157, .35);
    background: #ffffff;
    color: #0f789d;
    cursor: pointer;
    font-weight: 700;
}
.dhp-afu-clear:hover,
.dhp-afu-clear:focus {
    border-color: #0f789d;
    box-shadow: 0 0 0 3px rgba(15, 120, 157, .14);
}

.dhp-afu-search-errors {
    margin-top: 14px;
    margin-bottom: 0;
}


.dhp-afu-wrap [aria-invalid="true"] {
    border-color: #b00020 !important;
    outline: 2px solid rgba(176, 0, 32, 0.18);
    outline-offset: 2px;
}

.dhp-afu-errors:focus,
.dhp-afu-message:focus,
.dhp-afu-details:focus {
    outline: 3px solid rgba(180, 30, 60, 0.35);
    outline-offset: 3px;
}

.dhp-afu-errors[role="alert"]:empty {
    display: none;
}
