.wpcf7-form:has([name="gp-nummer"]) {
    --er-navy: #1f2557;
    --er-muted: #5b6082;
    --er-green: #6ab036;
    --er-green-dark: #58952b;
    --er-blue: #5eafdb;
    --er-border: #7d7aa6;
    --er-soft: #f0f0f2;
    --er-error: #c8312b;

    box-sizing: border-box;
    max-width: 1000px;
    margin: 0 auto;
    padding: clamp(24px, 4.5vw, 60px);
    background: #fff;
    border-radius: 40px;
    box-shadow: 0 12px 56px rgba(31, 37, 87, .12);
    color: var(--er-navy);
    font-family: inherit;
    font-size: 18px;
    font-weight: 300;
    line-height: 1.45;
}
.wpcf7-form:has([name="gp-nummer"]) *, .wpcf7-form:has([name="gp-nummer"]) *::before, .wpcf7-form:has([name="gp-nummer"]) *::after { box-sizing: border-box; }
.wpcf7-form:has([name="gp-nummer"]) br { display: none; }
.wpcf7-form:has([name="gp-nummer"]) p:empty { display: none; }

/* Überschrift */
.wpcf7-form:has([name="gp-nummer"]) .er-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 6px 18px;
    margin: 0 0 clamp(20px, 3vw, 36px);
    color: var(--er-navy);
    font-size: clamp(30px, 4.4vw, 44px);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -.01em;
}
.wpcf7-form:has([name="gp-nummer"]) .er-subtitle {
    color: var(--er-navy);
    font-size: clamp(16px, 2vw, 20px);
    font-weight: 400;
    letter-spacing: 0;
}

/* Zeilen: Beschriftung links, Feld rechts */
.wpcf7-form:has([name="gp-nummer"]) .er-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
    align-items: start;
    gap: 10px 32px;
    margin: 0 0 22px;
    cursor: default;
}
.wpcf7-form:has([name="gp-nummer"]) .er-label {
    padding-top: 14px;
    color: var(--er-navy);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.3;
}
.wpcf7-form:has([name="gp-nummer"]) .er-label small {
    display: block;
    margin-top: 2px;
    color: var(--er-muted);
    font-size: 16px;
    font-weight: 300;
}
.wpcf7-form:has([name="gp-nummer"]) .wpcf7-form-control-wrap { display: block; min-width: 0; }

/* Eingabefelder (mit !important gegen Theme-/Elementor-Vorgaben) */
.wpcf7-form:has([name="gp-nummer"]) .er-row input.wpcf7-form-control {
    display: block;
    width: 100% !important;
    height: 52px;
    margin: 0 !important;
    padding: 0 18px !important;
    border: 1px solid var(--er-border) !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: none !important;
    color: var(--er-navy) !important;
    font: inherit;
    font-size: 20px;
    font-weight: 400;
    appearance: none;
    -webkit-appearance: none;
}
.wpcf7-form:has([name="gp-nummer"]) .er-row input.wpcf7-form-control::placeholder { color: #a3a6c0; opacity: 1; }
.wpcf7-form:has([name="gp-nummer"]) .er-row input.wpcf7-form-control:focus {
    outline: 0;
    border-color: var(--er-blue) !important;
    box-shadow: 0 0 0 4px rgba(94, 175, 219, .28) !important;
}
.wpcf7-form:has([name="gp-nummer"]) .er-row input.wpcf7-not-valid { border-color: var(--er-error) !important; }

/* Fehlermeldung am Feld */
.wpcf7-form:has([name="gp-nummer"]) .wpcf7-not-valid-tip {
    display: block;
    margin-top: 6px;
    color: var(--er-error);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.3;
}

/* Hinweis für Kommunen */
.wpcf7-form:has([name="gp-nummer"]) .er-note {
    margin: 8px 0 22px;
    padding: 18px 22px;
    border-radius: 16px;
    background: var(--er-soft);
    color: var(--er-navy);
    font-size: 20px;
    font-weight: 300;
}
.wpcf7-form:has([name="gp-nummer"]) .er-note strong { font-weight: 700; }
.wpcf7-form:has([name="gp-nummer"]) .er-note > *,
.wpcf7-form:has([name="gp-nummer"]) .er-note p { margin: 0 !important; padding: 0 !important; }

/* Fußbereich: Datenschutz links, Button rechts */
.wpcf7-form:has([name="gp-nummer"]) .er-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px 40px;
    margin-top: clamp(16px, 2.5vw, 30px);
}
.wpcf7-form:has([name="gp-nummer"]) .er-privacy {
    flex: 1 1 auto;
    margin: 0;
    color: var(--er-navy) !important;
    font-size: 20px;
    font-weight: 300;
}
.wpcf7-form:has([name="gp-nummer"]) .er-privacy b { font-weight: 700; }
.wpcf7-form:has([name="gp-nummer"]) .er-privacy a {
    color: #78BB4B;
    font-weight: 700;
    text-decoration: none;
}
.wpcf7-form:has([name="gp-nummer"]) .er-privacy a:hover { text-decoration: underline; }

.wpcf7-form:has([name="gp-nummer"]) .er-action { position: relative; flex: 0 0 auto; }
.wpcf7-form:has([name="gp-nummer"]) input.er-btn {
    display: inline-block;
    width: auto !important;
    min-height: 58px;
    margin: 0 !important;
    padding: 0 56px 0 40px !important;
    border: 0 !important;
    border-radius: 999px !important;
    background-color: #78BB4B;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='7' height='13' viewBox='0 0 7 13'%3E%3Cpath fill='%23fff' transform='translate(0 .38)' d='M1.10064706,0 C0.492882353,0 0,0.504794483 0,1.12819034 C0,1.43967724 0.122705882,1.72161931 0.322,1.92590069 L4.31364706,6.01701517 L4.33917647,6.02587862 L4.31364706,6.03474207 L0.322,10.1258566 C0.122705882,10.3301379 0,10.61208 0,10.9235669 C0,11.5465407 0.492882353,12.0517572 1.10064706,12.0517572 C1.40452941,12.0517572 1.67958824,11.9255586 1.87888235,11.7212772 L6.64835294,6.83245241 C6.84764706,6.6285931 6.97076471,6.34622897 6.97076471,6.03474207 C6.97076471,6.03178759 6.96994118,6.0288331 6.96994118,6.02587862 C6.96994118,6.02292414 6.97076471,6.01996966 6.97076471,6.01701517 C6.97076471,5.70510621 6.84764706,5.42316414 6.64835294,5.21888276 L1.87888235,0.330057931 C1.67958824,0.125776552 1.40452941,0 1.10064706,0 Z'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 40px center !important;
    background-size: 7px 12px !important;
    box-shadow: none !important;
    color: #fff !important;
    font: inherit;
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    transition: background-color .15s ease;
}

/* Ladeanzeige von CF7 links neben dem Button, damit nichts verspringt */
.wpcf7-form:has([name="gp-nummer"]) .er-action .wpcf7-spinner {
    position: absolute;
    top: 50%;
    right: 100%;
    margin: -12px 12px 0 0;
}

/* Rückmeldung nach dem Absenden */
.wpcf7-form:has([name="gp-nummer"]) .wpcf7-response-output {
    margin: 28px 0 0 !important;
    padding: 16px 22px !important;
    border: 0 !important;
    border-radius: 16px;
    background: var(--er-soft);
    color: var(--er-navy);
    font-size: 16px;
    font-weight: 400;
}
.wpcf7-form:has([name="gp-nummer"]) .wpcf7-response-output:empty,
.wpcf7-form.init:has([name="gp-nummer"]) .wpcf7-response-output { display: none; }
.wpcf7-form.sent:has([name="gp-nummer"]) .wpcf7-response-output { background: #e8f4de; color: #2f5b13; }
.wpcf7-form.invalid:has([name="gp-nummer"]) .wpcf7-response-output,
.wpcf7-form.failed:has([name="gp-nummer"]) .wpcf7-response-output,
.wpcf7-form.aborted:has([name="gp-nummer"]) .wpcf7-response-output,
.wpcf7-form.unaccepted:has([name="gp-nummer"]) .wpcf7-response-output,
.wpcf7-form.spam:has([name="gp-nummer"]) .wpcf7-response-output { background: #fbe9e8; color: #8d1f1a; }

/* Tablet */
@media (max-width: 900px) {
    .wpcf7-form:has([name="gp-nummer"]) { border-radius: 32px; }
    .wpcf7-form:has([name="gp-nummer"]) .er-row { grid-template-columns: minmax(0, 1fr) minmax(220px, 320px); gap: 10px 24px; }
    .wpcf7-form:has([name="gp-nummer"]) .er-title {
        margin-top: 20px;
    }
}

/* Mobil */
@media (max-width: 640px) {
    .wpcf7-form:has([name="gp-nummer"]) { border-radius: 24px; box-shadow: 0 8px 32px rgba(31, 37, 87, .12); }
    .wpcf7-form:has([name="gp-nummer"]) .er-row { grid-template-columns: 1fr; gap: 8px; margin-bottom: 18px; }
    .wpcf7-form:has([name="gp-nummer"]) .er-row input.wpcf7-form-control { font-size: 16px; }
    .wpcf7-form:has([name="gp-nummer"]) .er-foot { flex-direction: column; align-items: stretch; }
    .wpcf7-form:has([name="gp-nummer"]) .er-action { width: 100%; display: flex; justify-content: center; }
    .wpcf7-form:has([name="gp-nummer"]) input.er-btn { width: auto !important; }
    .wpcf7-form:has([name="gp-nummer"]) .er-action .wpcf7-spinner { right: 12px; margin: -12px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
    .wpcf7-form:has([name="gp-nummer"]) input.er-btn { transition: none; }
}