/* IT310RESPONSIVE_DEVICE_PASS2J — INFOTECH Device Runtime CSS
   Variáveis e travas globais baseadas nas classes de dispositivo aplicadas por infotech-device-runtime.js. */
:root{
  --it-device-vw:100vw;
  --it-device-vh:100vh;
  --it-device-visual-vh:100vh;
  --it-device-safe-top:env(safe-area-inset-top,0px);
  --it-device-safe-bottom:env(safe-area-inset-bottom,0px);
  --it-mobile-drawer-w:min(344px,92vw);
  --it-pwa-footer-safe-zone:142px;
  --it-pwa-fullhd-bottom:164px;
}

html.it-dr-ready,
body.it-dr-ready{
  min-height:100dvh;
}

html.it-dr-phone,
html.it-dr-phone-small,
html.it-dr-tablet{
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  overscroll-behavior-y:none;
}

html.it-dr-phone body,
html.it-dr-phone-small body{
  min-width:0!important;
  max-width:100vw!important;
  overflow-x:hidden!important;
}

html.it-dr-phone body.it-tools-bg,
html.it-dr-phone-small body.it-tools-bg,
html.it-dr-tablet body.it-tools-bg{
  --it-mobile-drawer-w:min(344px,92vw);
}

html.it-dr-phone-small body.it-tools-bg{
  --it-mobile-drawer-w:min(328px,92vw);
}

/* PWA instalado/app: prompt de instalação nunca deve disputar espaço. */
html.it-dr-mode-pwa .it-pwa-toast[data-kind="install"],
html.it-dr-mode-pwa .it-pwa-toast[data-kind="install-help"],
html.it-dr-mode-pwa .it-pwa-toast[data-kind="install-installed"],
html.it-dr-installed-known .it-pwa-toast[data-kind="install"],
html.it-dr-installed-known .it-pwa-toast[data-kind="install-help"],
html.it-dr-installed-known .it-pwa-toast[data-kind="install-installed"]{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

/* Full HD/desktop: mantém o prompt fora da faixa institucional do footer. */
html.it-dr-fullhd body:not(.fixturebridge-page):not(.fixture-builder-page) .it-pwa-toast,
html.it-dr-large-monitor body:not(.fixturebridge-page):not(.fixture-builder-page) .it-pwa-toast{
  bottom:calc(var(--it-pwa-fullhd-bottom) + env(safe-area-inset-bottom,0px))!important;
}

/* Ferramentas no celular: runtime declara um único modelo de navegação, sem barra inferior. */
html.it-dr-phone body.it-tools-bg.it-sidebar-enabled .it-mobile-appbar,
html.it-dr-phone-small body.it-tools-bg.it-sidebar-enabled .it-mobile-appbar,
html.it-dr-tablet body.it-tools-bg.it-sidebar-enabled .it-mobile-appbar{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
  transform:translateY(140%)!important;
}

/* Menu aberto: estado modal exclusivo orientado pelo runtime. */
html.it-dr-phone body.it-tools-bg.it-sidebar-mobile.it-sidebar-open,
html.it-dr-phone-small body.it-tools-bg.it-sidebar-mobile.it-sidebar-open,
html.it-dr-tablet body.it-tools-bg.it-sidebar-mobile.it-sidebar-open{
  overflow:hidden!important;
  touch-action:none!important;
  overscroll-behavior:none!important;
}

html.it-dr-phone body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded,
html.it-dr-phone-small body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded,
html.it-dr-tablet body.it-tools-bg.it-sidebar-mobile.it-sidebar-open > header.it-global-header.it-sidebar-upgraded{
  width:var(--it-mobile-drawer-w)!important;
  max-width:calc(100vw - 18px)!important;
  height:100svh!important;
  max-height:100svh!important;
  z-index:10040!important;
}

html.it-dr-phone body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .infotech-support-float,
html.it-dr-phone body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .fixture-ava,
html.it-dr-phone body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .ava-mascot,
html.it-dr-phone body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .it-pwa-toast,
html.it-dr-phone-small body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .infotech-support-float,
html.it-dr-phone-small body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .fixture-ava,
html.it-dr-phone-small body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .ava-mascot,
html.it-dr-phone-small body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .it-pwa-toast,
html.it-dr-tablet body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .infotech-support-float,
html.it-dr-tablet body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .fixture-ava,
html.it-dr-tablet body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .ava-mascot,
html.it-dr-tablet body.it-tools-bg.it-sidebar-mobile.it-sidebar-open .it-pwa-toast{
  display:none!important;
  visibility:hidden!important;
  opacity:0!important;
  pointer-events:none!important;
}

html.it-dr-phone body.fixturebridge-page .it-pwa-toast[data-infotech-placement="tool-left"],
html.it-dr-phone body.fixture-builder-page .it-pwa-toast[data-infotech-placement="tool-left"],
html.it-dr-phone-small body.fixturebridge-page .it-pwa-toast[data-infotech-placement="tool-left"],
html.it-dr-phone-small body.fixture-builder-page .it-pwa-toast[data-infotech-placement="tool-left"]{
  left:10px!important;
  right:auto!important;
  bottom:calc(12px + env(safe-area-inset-bottom,0px))!important;
  width:min(276px,calc(100vw - 128px))!important;
  max-width:276px!important;
  z-index:222!important;
}

html.it-dr-keyboard-open body.it-tools-bg .it-pwa-toast,
html.it-dr-keyboard-open body.it-tools-bg .infotech-support-float{
  display:none!important;
}

@media (prefers-reduced-motion: reduce){
  html.it-dr-ready *,
  html.it-dr-ready *::before,
  html.it-dr-ready *::after{
    scroll-behavior:auto!important;
  }
}
