/* ALUTECH WIDENKA 3.2.7 – live geprüfte Formular- und Konfigurator-Korrektur. */

/* Gravity Forms setzt an den Wrappern physische Außenabstände. Die bisherigen
 * logischen Eigenschaften verloren im Live-Cascade gegen diese Regeln. */
body :is(#gform_wrapper_1, #gform_wrapper_2, #gform_wrapper_3, #gform_wrapper_4),
body :is(.rank1-footer-form-column, .rank1-form-section-form-column, .rank1-live-inquiry-form, .rank1-embedded-form-section) .gform_wrapper {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
}

body .rank1-footer-form {
    margin-top: 12px !important;
}

body :is(#gform_wrapper_1, #gform_wrapper_2, #gform_wrapper_3, #gform_wrapper_4) form.rank1-gform .gf_page_steps {
    min-height: 0 !important;
    margin: 0 0 12px !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px !important;
}

body :is(#gform_wrapper_2, #gform_wrapper_4) form.rank1-gform .gf_page_steps {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

body :is(#gform_wrapper_1, #gform_wrapper_2, #gform_wrapper_3, #gform_wrapper_4) form.rank1-gform .gf_step {
    min-height: 42px !important;
    margin: 0 !important;
    padding: 6px 9px !important;
    border: 0 !important;
    box-shadow: none !important;
}

body :is(#gform_wrapper_1, #gform_wrapper_2, #gform_wrapper_3, #gform_wrapper_4) form.rank1-gform .gf_step_number {
    width: 28px !important;
    height: 28px !important;
    flex-basis: 28px !important;
}

body :is(.rank1-footer-form-column, .rank1-form-section-form-column) .gform_wrapper form.rank1-gform .gform_fields {
    gap: 10px 14px !important;
}

body :is(.rank1-footer-form-column, .rank1-form-section-form-column) .gform_wrapper form.rank1-gform :is(.gform_page_footer, .gform_footer) {
    margin-top: 13px !important;
}

/* Auch die achtstufige Projektanfrage bleibt mehrstufig, nutzt den verfügbaren
 * Desktopbereich aber vollständig. Dadurch ist Schritt 1 ohne unnötige
 * Scrollstrecke erfassbar. */
@media (min-width: 901px) {
    body .alutech-funnel__body {
        padding: 38px 48px 24px !important;
    }

    body .alutech-funnel__question {
        min-height: 0 !important;
        margin-bottom: 24px !important;
    }

    body .alutech-options {
        gap: 10px !important;
    }

    body .alutech-option {
        min-height: 76px !important;
        padding: 11px 16px !important;
        grid-template-columns: 42px minmax(0, 1fr) 22px !important;
        gap: 12px !important;
    }

    body .alutech-option__icon {
        width: 42px !important;
        height: 42px !important;
    }

    body .alutech-funnel__nav {
        min-height: 0 !important;
        padding-top: 16px !important;
    }
}

/* Konfigurator: Auswahlflächen verdichten, 14 Oberflächen in zwei gut lesbare
 * Reihen legen und die Zusammenfassung beim Scrollen sichtbar halten. */
body.rank1-route-kantteile-online-bestellen .rank1-live-configurator {
    padding-block: 48px;
}

body.rank1-route-kantteile-online-bestellen .rank1-live-configurator > .elementor-element {
    width: min(1360px, calc(100% - 32px));
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__heading {
    margin-bottom: 20px;
    padding-bottom: 20px;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__layout {
    gap: 24px;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__steps {
    gap: 12px;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__step {
    padding: 20px;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__profiles button {
    height: 124px !important;
    min-height: 124px !important;
    padding: 8px !important;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__profiles button > span {
    min-height: 52px !important;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__profiles button svg {
    height: 46px !important;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__drawing svg {
    height: 195px !important;
    min-height: 195px !important;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__choice {
    padding-top: 11px;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__choice + .rank1-kantteil__choice {
    margin-top: 11px;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__finishes {
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 7px !important;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__finishes label {
    min-height: 68px !important;
    padding: 6px !important;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__finishes .rank1-kantteil__swatch {
    width: 28px;
    height: 28px;
    flex-basis: 28px;
}

body.rank1-route-kantteile-online-bestellen .rank1-kantteil__summary {
    position: sticky !important;
    top: 132px !important;
    align-self: start !important;
}

body.rank1-route-kantteile-online-bestellen .alutech-contact-float {
    display: none !important;
}

@media (max-width: 1180px) {
    body.rank1-route-kantteile-online-bestellen .rank1-kantteil__summary {
        position: relative !important;
        top: auto !important;
    }
}

@media (max-width: 900px) {
    body.rank1-route-kantteile-online-bestellen .rank1-kantteil__finishes {
        grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    body :is(#gform_wrapper_1, #gform_wrapper_2, #gform_wrapper_3, #gform_wrapper_4) form.rank1-gform .gf_step {
        min-height: 38px !important;
        padding: 5px !important;
    }

    body.rank1-route-kantteile-online-bestellen .rank1-live-configurator {
        padding-block: 40px;
    }

    body.rank1-route-kantteile-online-bestellen .rank1-kantteil__profiles button {
        height: 108px !important;
        min-height: 108px !important;
    }

    body.rank1-route-kantteile-online-bestellen .rank1-kantteil__drawing svg {
        height: 190px !important;
        min-height: 190px !important;
    }

    body.rank1-route-kantteile-online-bestellen .rank1-kantteil__finishes {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}
