/* Theo Properties RC1.0.15.112 — Mobile Workspace Shell, Dock & Footer Recovery Lock
   Scope: authenticated workspace shell on phones <=700px only.
   Corrects first-paint dock hydration side-effects and stacked bottom spacing.
   No dashboard, auth, routing, data or workflow changes. */

@media (max-width:700px){
  /* One source of physical bottom spacing. Older dashboard/application layers had
     cumulative padding which produced a large blank white zone before the footer. */
  body.signed-mode .content{
    padding-bottom:24px!important;
    scroll-padding-bottom:calc(104px + env(safe-area-inset-bottom))!important;
  }
  body.signed-mode #tenant.ws30-tenant-enhanced,
  body.signed-mode #tenant[data-tenant-page="applications"]{
    padding-bottom:0!important;
  }
  body.signed-mode #tenant[data-tenant-page="applications"] #tenant-applications{
    margin-bottom:16px!important;
  }

  /* Footer is part of the authenticated shell and must always remain visible. */
  body.signed-mode #site-footer.site-footer-v4{
    display:block!important;
    visibility:visible!important;
    opacity:1!important;
    position:relative!important;
    margin-top:20px!important;
    margin-bottom:calc(92px + env(safe-area-inset-bottom))!important;
    min-height:0!important;
  }
  body.signed-mode #site-footer.site-footer-v4 .footer-v4-shell,
  body.signed-mode #site-footer.site-footer-v4 .footer-v4-bottom{
    visibility:visible!important;
    opacity:1!important;
  }

  /* Dock remains a viewport control, never a flow element that appears only after scroll. */
  body.signed-mode #mobile-nav.mobile-nav{
    display:flex!important;
    visibility:visible!important;
    opacity:1!important;
    position:fixed!important;
    left:12px!important;
    right:12px!important;
    bottom:max(10px,env(safe-area-inset-bottom))!important;
    z-index:500!important;
    transform:translateZ(0)!important;
    -webkit-transform:translateZ(0)!important;
    will-change:transform!important;
  }

  /* Ensure the final footer/legal row can be read above the dock. */
  body.signed-mode #site-footer.site-footer-v4 .footer-v4-bottom{
    padding-bottom:calc(14px + env(safe-area-inset-bottom))!important;
  }
}
