/* =========================================================
   DAMIAN PHILPOTT — FOOTER VISIBILITY FIX V2
   ---------------------------------------------------------
   Desktop Booknetic footer.

   Fixes v1.0.112:
   The global footer styling used display:inline-flex!important,
   which could override Booknetic's own inline display:none state
   on CONFIRM BOOKING / NEXT / TRY AGAIN.

   This patch restores Booknetic's visibility control while
   keeping the approved global footer styling and bottom pinning.
   ========================================================= */

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

    /* Booknetic's explicit hidden inline state must always win. */
    body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment
    .booknetic_appointment_container_footer
    button[style*="display: none"],

    body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment
    .booknetic_appointment_container_footer
    button[style*="display:none"],

    body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment
    .booknetic_appointment_container_footer
    button.booknetic_hidden {
        display: none !important;
    }

    /* When Booknetic makes an action visible, retain the approved
       footer-button alignment without forcing hidden buttons open. */
    body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment
    .booknetic_appointment_container_footer
    button.booknetic_btn_primary.booknetic_next_step:not([style*="display: none"]):not([style*="display:none"]),

    body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment
    .booknetic_appointment_container_footer
    button.booknetic_btn_primary.booknetic_confirm_booking_btn:not([style*="display: none"]):not([style*="display:none"]),

    body:has(#booknetic_theme_8)
    .wp-block-booknetic-booking
    #booknetic_theme_8.booknetic_appointment
    .booknetic_appointment_container_footer
    button.booknetic_btn_secondary.booknetic_prev_step:not([style*="display: none"]):not([style*="display:none"]) {
        display: inline-flex !important;
    }
}
