/* Structune Hub V17.7.4.477 — AR View lifecycle and workspace cleanup. */

html.ar-view-first-paint,
html.ar-view-first-paint body,
html body.v17-ar-active{
  width:100%;
  height:100%;
  overflow:hidden!important;
  background:#0B1723!important;
}

/* Isolate AR View before and after the SPA route lifecycle starts. The AR tool
   trigger/dock remain available only after the AR route becomes active. */
html.ar-view-first-paint #content>.view:not(#view-ar-view),
html.ar-view-first-paint #arToolsFab,
html.ar-view-first-paint #arToolsDock,
html.ar-view-first-paint #arToolMessage,
html.ar-view-first-paint #labelsPrintModal,
html.ar-view-first-paint #labelsPrintStage,
html.ar-view-first-paint #arMarkerModal,
html.ar-view-first-paint #productionPasteModal,
html.ar-view-first-paint #productionConfirmModal,
html.ar-view-first-paint #view-ar-site-setout,
body.v17-ar-active #content>.view:not(#view-ar-view),
body.v17-ar-active #labelsPrintModal,
body.v17-ar-active #labelsPrintStage,
body.v17-ar-active #arMarkerModal,
body.v17-ar-active #productionPasteModal,
body.v17-ar-active #productionConfirmModal,
body.v17-ar-active #view-ar-site-setout{
  display:none!important;
  visibility:hidden!important;
  pointer-events:none!important;
}

/* Fill the shared A3 work region. Header, footer and both drawer lanes remain
   outside this viewport and opening a drawer cannot resize it. */
html[data-structune-shell="v432"] body.v432-shell-geometry.v17-ar-active #view-ar-view{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  max-width:none!important;
  max-height:none!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  background:#0B1723!important;
}
html[data-structune-shell="v432"] body.v432-shell-geometry.v17-ar-active #view-ar-view>.ar-view-stage{
  position:absolute!important;
  inset:0!important;
  width:100%!important;
  height:100%!important;
  min-width:0!important;
  min-height:0!important;
  overflow:hidden!important;
  background:#0B1723!important;
}

/* The useful mode and QR controls occupy the released title lane directly. */
body.v17-ar-active #view-ar-view>.ar-view-mode-tools{
  position:absolute!important;
  left:10px!important;
  top:10px!important;
  right:auto!important;
  width:auto!important;
  margin:0!important;
  padding:0!important;
  z-index:82!important;
  pointer-events:auto!important;
}

/* Do not retain an empty video surface while camera AR is inactive. */
body.v17-ar-active #arCameraFeed{display:none!important}
body.v17-ar-active.ar-camera-active #arCameraFeed{display:block!important}

/* Keep all drawer scrolling inside the drawer. */
body.v17-ar-active #view-ar-view .ar-view-side-panels,
body.v17-ar-active #view-ar-view .ar-view-side-panels .side-card{
  background:#0B1723!important;
}
body.v17-ar-active #view-ar-view .ar-view-side-panels :is(.ar-parts-list,.assemblies-list){
  overscroll-behavior:contain!important;
}

@media (max-width:640px){
  body.v17-ar-active #view-ar-view>.ar-view-mode-tools{left:6px!important;top:6px!important}
}
