/* SIOV360 1.0.29-PILOT · Responsive accessibility fixes
   1) Tablet/ventanas de poca altura: el sidebar mantiene CERRAR SESIÓN accesible.
   2) Móvil: permite pinch-to-zoom sin perder el scroll horizontal introducido en 1.0.28.
   Solo cambia geometría/gestos de interfaz; no toca datos, navegación ni permisos. */

/* En tablet horizontal o cualquier viewport corto, el menú lateral debe tener
   su propio desplazamiento vertical y el cierre de sesión debe permanecer
   alcanzable. Se limita a >640px para no interferir con el modo compacto móvil
   ya corregido en 1.0.18. */
@media (min-width:641px) and (max-height:900px){
  #menuScreen > .siov-sidebar,
  #siovPersistentSidebar.siov-sidebar{
    height:100dvh!important;
    max-height:100dvh!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    -webkit-overflow-scrolling:touch;
    overscroll-behavior-y:contain;
    scrollbar-gutter:stable;
  }

  #menuScreen > .siov-sidebar > .siov-logout,
  #siovPersistentSidebar.siov-sidebar > .siov-logout{
    position:sticky!important;
    bottom:0!important;
    z-index:40!important;
    flex:0 0 auto!important;
    margin-top:auto!important;
    background:#092842!important;
    border-top:1px solid rgba(255,255,255,.18)!important;
    box-sizing:border-box!important;
    padding-bottom:calc(12px + env(safe-area-inset-bottom, 0px))!important;
  }
}

/* 1.0.28 necesitaba habilitar pan horizontal/vertical dentro del workspace.
   "pan-x pan-y" excluía el gesto de pellizco; se añade pinch-zoom explícitamente. */
@media (max-width:640px){
  #menuScreen > .siov-workspace{
    touch-action:pan-x pan-y pinch-zoom!important;
  }
}
