/* Native WordPress integration for the full-screen 3D Workbench.
 * The Workbench owns the viewport; only the WordPress admin bar is reserved. */
body.sff-site-workbench {
  --labs-header-primary-height: 0px;
  --labs-header-secondary-height: 0px;
  --labs-header-total-height: 0px;
  margin: 0 !important;
  min-height: 100% !important;
  overflow: hidden !important;
  background: var(--labs-bg) !important;
}
html:has(body.sff-site-workbench) {
  min-height: 100% !important;
  overflow: hidden !important;
  background: var(--labs-bg) !important;
}
/* Override the legacy Workbench source rule that hid wpadminbar. Positioning is
   owned centrally by the parent Theme. */
body.sff-site-workbench #wpadminbar { display: block !important; }
body.sff-site-workbench .sff-3d-tool-container {
  width: 100% !important;
  height: calc(100dvh - var(--labs-admin-bar-height)) !important;
  margin-top: var(--labs-admin-bar-height) !important;
  min-height: 420px;
}
body.sff-site-workbench .sff-3d-sidebar { top: 0; bottom: 0; }
body.sff-site-workbench #sff-canvas-viewport { height: 100% !important; }
@media (max-width: 1024px) {
  body.sff-site-workbench #sff-canvas-viewport {
    width: 100% !important;
    height: 100% !important;
  }
  body.sff-site-workbench .sff-drawer-backdrop {
    top: var(--labs-admin-bar-height) !important;
    bottom: 0 !important;
    height: auto !important;
  }
  body.sff-site-workbench .sff-mobile-drawer-nav {
    top: var(--labs-admin-bar-height) !important;
  }
  body.sff-site-workbench .sff-3d-sidebar {
    top: calc(var(--labs-admin-bar-height) + 52px) !important;
    height: calc(100dvh - var(--labs-admin-bar-height) - 52px) !important;
    max-height: calc(100dvh - var(--labs-admin-bar-height) - 52px) !important;
  }
}
