/* Vistio Business v1.1.58 — restituye scroll interno, sin alterar reflejos. */
/* No permitir desplazamiento de la página principal mientras se ve el acceso. */
html:has(#auth-modal:not([hidden])),
body:has(#auth-modal:not([hidden])) {
  overflow: hidden !important;
  overscroll-behavior: none;
}

/* El modal permanece fijo: ni rueda, ni touch, ni teclado desplazan el fondo. */
#auth-modal:not([hidden]) {
  overflow: hidden !important;
  overscroll-behavior: contain;
}

/* Importante: v1.1.55 y v1.1.56 volvieron a definir overflow:hidden.
   Esta declaración posterior devuelve SOLO el eje vertical al contenedor.
   No afecta a ::before (reflejo) ni al apilamiento de los elementos. */
#auth-modal .modal-panel.vb148-auth-shell {
  box-sizing: border-box;
  min-width: 0;
  max-width: 100%;
  min-height: 0;
  max-height: calc(100vh - 56px);
  max-height: calc(100dvh - 56px);
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #bd9253 rgba(255,255,255,.045);
}

/* Barra vertical elegante, igual a la versión solicitada originalmente. */
#auth-modal .modal-panel.vb148-auth-shell::-webkit-scrollbar {
  width: 8px;
  height: 0;
}
#auth-modal .modal-panel.vb148-auth-shell::-webkit-scrollbar-track {
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}
#auth-modal .modal-panel.vb148-auth-shell::-webkit-scrollbar-thumb {
  border-radius: 12px;
  background: linear-gradient(180deg,#e3c083,#96703a);
  border: 2px solid #121113;
}
#auth-modal .modal-panel.vb148-auth-shell::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg,#f0d59b,#b78a49);
}
#auth-modal .modal-panel.vb148-auth-shell::-webkit-scrollbar-corner {
  background: #111012;
}

/* Previene barras horizontales por contenido interno o por la retícula visual. */
#auth-modal .vb148-auth-aside,
#auth-modal .vb148-auth-main {
  min-width: 0;
}

@media (max-width:900px) {
  #auth-modal .modal-panel.vb148-auth-shell {
    max-height: calc(100vh - 40px);
    max-height: calc(100dvh - 40px);
  }
}
@media (max-width:640px) {
  #auth-modal .modal-panel.vb148-auth-shell {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
    scrollbar-gutter: auto;
  }
  #auth-modal .modal-panel.vb148-auth-shell::-webkit-scrollbar { width: 5px; }
}
