/* fuyej SEO hardening - modal backdrop fallback  v3.0.2 (2026-11-06)
   UNCONDITIONAL by design: this is the only layer that still works if the JS
   asset fails to load, the browser is Trident, or any Bootstrap event never
   dispatches. It must NOT depend on a JS-added body class.

   Why pointer-events, not display:none:
   Bootstrap show() calls .show() BEFORE addClass('in'), so a !important
   display:none on .modal:not(.in) would fight the opening animation.
   And "click the dim area to close" is bound on .modal (z-index 1050) via
   click.dismiss.bs.modal, NOT on .modal-backdrop (1040), so disabling
   pointer events on the backdrop does not break dismissal.

   v3.0.2 (2026-11-06) - FIX "login button does nothing":
   The theme hard-codes window.onload + 500ms -> $('#modal-system-notice')
   .modal('show') into every WPSC static snapshot. That notice is a
   full-viewport .modal (z-index 1050) and sits AFTER #u_sign in the DOM,
   so once it opens (or is left behind with .in still on), it swallows every
   click aimed at the login form. Three unconditional guards:
     1. ALL backdrops stay at 1040 (Bootstrap raises the 2nd one to 1050).
     2. The notice container never takes pointer events; only its real
        content does, so its own close button / link still work.
     3. The notice is demoted below normal modals; while any interactive
        modal is active the JS adds body.fuyej-modal-active to hide it.
   No theme edits, no server-side UA branch, no cloaking. */
.modal-backdrop { pointer-events: none !important; z-index: 1040 !important; }
.modal:not(.in) { pointer-events: none !important; }

#modal-system-notice { z-index: 1041 !important; pointer-events: none !important; }
#modal-system-notice .modal-dialog,
#modal-system-notice .modal-content,
#modal-system-notice .modal-body,
#modal-system-notice .modal-buts { pointer-events: auto !important; }
body.fuyej-modal-active #modal-system-notice { visibility: hidden !important; }
