/* IT310RESPONSIVE_DEVICE_PASS2C
   Hotfix final da Etapa 2.
   Escopo exclusivo: garantir que o popup PWA fique à esquerda nas páginas com AVADOG,
   mesmo quando CSS anterior, sidebar ou cache do service worker tentarem reposicionar o toast à direita.
   Também preserva auto-hide em 33s e ocultação em modo app/instalado via JS existente. */

:root{
  --it-rdp2c-avadog-pwa-left-gap:18px;
  --it-rdp2c-avadog-pwa-bottom:22px;
  --it-rdp2c-avadog-pwa-width:360px;
}

html.infotech-standalone-mode body .it-pwa-toast,
body.infotech-pwa-installed .it-pwa-toast,
body.infotech-pwa-standalone .it-pwa-toast{
  display:none!important;
  opacity:0!important;
  pointer-events:none!important;
}

@media (min-width:961px){
  html body.fixturebridge-page .it-pwa-toast[data-kind="install"],
  html body.fixturebridge-page .it-pwa-toast[data-kind="install-help"],
  html body.fixturebridge-page .it-pwa-toast[data-kind="install-installed"],
  html body.fixture-builder-page .it-pwa-toast[data-kind="install"],
  html body.fixture-builder-page .it-pwa-toast[data-kind="install-help"],
  html body.fixture-builder-page .it-pwa-toast[data-kind="install-installed"],
  html body .it-pwa-toast[data-infotech-placement="tool-left"]{
    left:calc(var(--it-side-w,284px) + var(--it-rdp2c-avadog-pwa-left-gap))!important;
    right:auto!important;
    bottom:calc(var(--it-rdp2c-avadog-pwa-bottom) + env(safe-area-inset-bottom,0px))!important;
    width:min(var(--it-rdp2c-avadog-pwa-width),calc(100vw - var(--it-side-w,284px) - 56px))!important;
    max-width:var(--it-rdp2c-avadog-pwa-width)!important;
    max-height:calc(100dvh - 80px)!important;
    overflow:auto!important;
    transform-origin:bottom left!important;
    z-index:222!important;
  }

  html body.fixturebridge-page.it-sidebar-collapsed .it-pwa-toast[data-kind="install"],
  html body.fixturebridge-page.it-sidebar-collapsed .it-pwa-toast[data-kind="install-help"],
  html body.fixturebridge-page.it-sidebar-collapsed .it-pwa-toast[data-kind="install-installed"],
  html body.fixture-builder-page.it-sidebar-collapsed .it-pwa-toast[data-kind="install"],
  html body.fixture-builder-page.it-sidebar-collapsed .it-pwa-toast[data-kind="install-help"],
  html body.fixture-builder-page.it-sidebar-collapsed .it-pwa-toast[data-kind="install-installed"]{
    left:calc(var(--it-side-mini,74px) + var(--it-rdp2c-avadog-pwa-left-gap))!important;
    width:min(var(--it-rdp2c-avadog-pwa-width),calc(100vw - var(--it-side-mini,74px) - 56px))!important;
  }

  html body.fixturebridge-page .infotech-support-float,
  html body.fixture-builder-page .infotech-support-float{
    z-index:232!important;
  }
}

@media (max-width:960px){
  html body.fixturebridge-page .it-pwa-toast[data-kind="install"],
  html body.fixturebridge-page .it-pwa-toast[data-kind="install-help"],
  html body.fixturebridge-page .it-pwa-toast[data-kind="install-installed"],
  html body.fixture-builder-page .it-pwa-toast[data-kind="install"],
  html body.fixture-builder-page .it-pwa-toast[data-kind="install-help"],
  html body.fixture-builder-page .it-pwa-toast[data-kind="install-installed"],
  html body .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;
    min-width:min(226px,calc(100vw - 128px))!important;
    max-width:276px!important;
    padding:10px!important;
    border-radius:16px!important;
    flex-direction:column!important;
    align-items:stretch!important;
    gap:8px!important;
    z-index:222!important;
    transform-origin:bottom left!important;
  }

  html body.fixturebridge-page .it-pwa-toast .it-pwa-toast-copy span,
  html body.fixture-builder-page .it-pwa-toast .it-pwa-toast-copy span,
  html body .it-pwa-toast[data-infotech-placement="tool-left"] .it-pwa-toast-copy span{
    font-size:10.5px!important;
    line-height:1.28!important;
  }

  html body.fixturebridge-page .it-pwa-toast .it-pwa-toast-copy strong,
  html body.fixture-builder-page .it-pwa-toast .it-pwa-toast-copy strong,
  html body .it-pwa-toast[data-infotech-placement="tool-left"] .it-pwa-toast-copy strong{
    font-size:12px!important;
  }

  html body.fixturebridge-page .it-pwa-toast .it-pwa-toast-actions,
  html body.fixture-builder-page .it-pwa-toast .it-pwa-toast-actions,
  html body .it-pwa-toast[data-infotech-placement="tool-left"] .it-pwa-toast-actions{
    display:grid!important;
    grid-template-columns:1fr 34px!important;
    width:100%!important;
    gap:7px!important;
  }
}
