/*
 * Styles scoped to the "Fertigstellung" form only, everything is namespaced
 * under .fertigstellung-form so it can never affect Netzanschluss,
 * Einspeiseanlagen, or any other form on the site.
 *
 * Shared layout scaffolding (.formsections, .formblock, .halfforms, .form20 …
 * .form100, .mandatory, .nextBTN etc.) is intentionally NOT redefined here —
 * it's already provided by style.css and reused as-is for visual consistency
 * with the rest of the site's multi-step forms.
 */

.fertigstellung-form .form30 {
    width: 30%;
    padding-right: 10px;
    box-sizing: border-box;
}

/*
 * .form20…form100 (from style.css) are all float:left, and CF7's own
 * .wpcf7-list-item rows don't reliably contribute height to a "relative"
 * wrapper either. A wrapper that contains floated/flex children collapses
 * to zero height unless it clears its own contents — otherwise whatever
 * comes next (an h4, a legend, a .mandatory notice) renders on top of it
 * instead of below it. overflow:hidden establishes a block formatting
 * context that contains all of that; clear:both makes sure the wrapper
 * itself starts below anything floated above it.
 *
 * IMPORTANT: this only targets full-width containers — [data-if] reveal
 * wrappers, <fieldset> radio groups, and .form100 checkbox groups. It must
 * NOT touch the fractional-width fields (.form20/30/40/50/60/80) that are
 * meant to float side by side inside .halfforms (e.g. Vorname/Nachname) —
 * forcing those to clear/100% would stack every side-by-side pair vertically.
 */
.fertigstellung-form [data-if],
.fertigstellung-form fieldset.contactinput,
.fertigstellung-form .form100.contactinput {
    display: block;
    clear: both;
    overflow: hidden;
    width: 100%;
}
.wpcf7-form-control-wrap[data-name="fert_211_art"] .form-control {
    height: 100%;
}
.fertigstellung-form .forminfotext-static {
    background: #f4f4f4;
    border-left: 3px solid #ccc;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.fertigstellung-form .fert-panel {
    border-left: 2px solid #ddd;
    padding-left: 16px;
    margin: 10px 0 25px;
}

/*
 * style.css sets .formblock .contactinput { margin-bottom: 0 }, which is fine
 * for a single labelled input but collapses consecutive Ja/Nein fieldsets
 * (this form has many, stacked directly one after another) into a cramped,
 * hard-to-read block. Give fieldsets their own spacing and a visible legend
 * gap, scoped to this form only.
 */
.fertigstellung-form .contactinput {
    margin-bottom: 15px !important;
}

.fertigstellung-form fieldset.contactinput {
    padding-bottom: 5px;
}

.fertigstellung-form fieldset.contactinput legend.new-label {
    margin-bottom: 8px;
}

.fertigstellung-form #section_2 .fert-panel h4:first-child {
    margin-top: 15px;
}
