/* =========================================================
   DAMIAN PHILPOTT — STEP 2 ACCORDION SCROLL RESTORE V1
   ---------------------------------------------------------
   Desktop Step 2 only.

   Fixes expanded Services / Packages being clipped at the footer.

   Cause:
   - the search hard-fix temporarily forced the Step 2 booking
     shell to overflow:hidden
   - expanded accordion content could therefore extend below
     the visible body but was cut off at the footer

   Fix:
   - Step 2 shell/body return to natural auto height
   - expanded accordions can increase the shell height
   - the page can scroll naturally through all service/package
     content
   - footer remains pinned to the true bottom of the expanded shell

   Search, glass and footer button styling remain unchanged.
   ========================================================= */

@media screen and (min-width: 1001px) {

    /* Active Service step must be allowed to grow with open accordions. */
    html body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment:has(
        .booknetic_appointment_step_element.booknetic_active_step[data-step-id="service"]
    ) .booknetic_appointment_container {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        overflow: visible !important;
    }

    /* The body itself should not create a hidden/clipped inner viewport.
       Let the browser/page perform the scrolling naturally. */
    html body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment:has(
        .booknetic_appointment_step_element.booknetic_active_step[data-step-id="service"]
    ) .booknetic_appointment_container_body {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        overflow-y: visible !important;
        overflow-x: hidden !important;
    }

    html body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment:has(
        .booknetic_appointment_step_element.booknetic_active_step[data-step-id="service"]
    ) [data-step-id="service"] {
        height: auto !important;
        min-height: 0 !important;
        max-height: none !important;

        overflow: visible !important;
    }

    /* Keep enough room beneath all expanded content for the
       globally pinned footer. */
    html body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment:has(
        .booknetic_appointment_step_element.booknetic_active_step[data-step-id="service"]
    ) .booknetic_appointment_container {
        padding-bottom: 62px !important;
    }
}
