/* ========================================================================
   JUZÉ MOBILE PWA — overrides exclusivos do modo instalado (Android/Chromium)

   Estas regras ficam separadas do mobile responsivo comum porque, no PWA
   standalone, a área .content passa a ser o scroller principal. Os !important
   abaixo são intencionais: eles precisam vencer a base mobile já carregada.
   iPhone/Safari não entra neste bloco.
   ======================================================================== */
@supports not (-webkit-touch-callout: none) {
  @media (display-mode: standalone) and (max-width:960px) {
    /* Viewport fixo no shell instalado. */
    html,body{
      width:100%!important;
      height:100dvh!important;
      min-height:100dvh!important;
      overflow:hidden!important;
      overscroll-behavior:auto!important;
    }
    #appView{
      width:100%!important;
      height:100dvh!important;
      min-height:100dvh!important;
      overflow:hidden!important;
    }
    .main{
      width:100%!important;
      height:100dvh!important;
      min-height:0!important;
      display:flex!important;
      flex-direction:column!important;
      overflow:hidden!important;
    }
    .local-header{
      flex:0 0 auto!important;
    }

    /* O conteúdo, e não o body, recebe a rolagem no PWA Android. */
    .content{
      position:relative!important;
      flex:1 1 auto!important;
      width:100%!important;
      height:auto!important;
      min-height:0!important;
      overflow-x:hidden!important;
      overflow-y:auto!important;
      overscroll-behavior-y:auto!important;
      -webkit-overflow-scrolling:touch!important;
      touch-action:pan-y!important;
      scrollbar-gutter:auto!important;
    }
    .page.active,
    #page-caixa.active{
      height:auto!important;
      min-height:100%!important;
      overflow:visible!important;
    }

    /* Gestos: rolagem vertical nas áreas e toque direto nos controles. */
    .mobile-home,
    .mobile-cash-list,
    #caixaFormPanel,
    #cashTablePanel{
      touch-action:pan-y!important;
    }
    button,
    [role="button"],
    .mobile-home-launch-row,
    .mobile-launch-card{
      touch-action:manipulation!important;
    }
  }
}
