/* Login modal backdrop.
   Lune Optimizer RUCSS strips the .modal-backdrop rule (position/size/background/z-index)
   because the element is created by JS at runtime. Without position+size it collapses to
   height:0 and sits in the page flow -> invisible. This file is excluded from RUCSS. */
.modal-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: #000;
  z-index: 999998;
}
.modal-backdrop.show { opacity: .5; }
.modal { z-index: 999999; }

/* Stacking de los modales del flujo auth. Como todos comparten .modal, el orden
   DOM dejaba a #loginModal por ENCIMA de la bifurcación/ownership (que van antes
   en el DOM) y de #registerUser. Se fija explícitamente el orden:
   login (999999) < registro (1000000) < bifurcación/ownership (1000001). */
#loginModal.modal { z-index: 999999; }
#registerUser.modal { z-index: 1000000; }
.modal.js-ccb-auth { z-index: 1000001; }

/* Las alertas de SweetAlert2 (p. ej. "Se ha enviado un nuevo código" al reenviar
   el OTP) tienen z-index 1060 por defecto -> quedaban DETRÁS de los modales.
   Se suben por encima de todos los modales del flujo auth. */
.swal2-container { z-index: 1000002 !important; }
