/* V17.7.4.343 — Unified Right Context Drawer width + inside-open-handle position.
   Scope: the physical context drawer and its edge handle only.
   This intentionally does not redefine unrelated reserved-zone geometry. */

html body.v17-right-drawer-page .side-panels{
  width:360px!important;
  min-width:360px!important;
  max-width:360px!important;
}
html body.v17-right-drawer-page.v17-right-open > button.v17-edge-handle.v17-right-handle,
html body.v17-right-drawer-page.v17-right-open button.v17-edge-handle.v17-right-handle{
  right:calc(360px - var(--structune-drawer-opener-width,27px))!important;
}

/* AR View uses its own drawer selector inside the main SPA. */
html body.v17-ar-active #view-ar-view .ar-view-side-panels{
  width:360px!important;
  min-width:360px!important;
  max-width:360px!important;
}
html body.v17-ar-active.v17-right-open > button.v17-edge-handle.v17-right-handle{
  right:calc(360px - var(--structune-drawer-opener-width,27px))!important;
}

/* Installation Plans owns a dedicated fixed context drawer. */
html body.v17-installation-plans-fixed-layout.v17-right-drawer-page .side-panels{
  width:360px!important;
  min-width:360px!important;
  max-width:360px!important;
}
html body.v17-installation-plans-fixed-layout.v17-right-drawer-page.v17-right-open > button.v17-edge-handle.v17-right-handle,
html body.v17-installation-plans-fixed-layout.v17-right-drawer-page.v17-right-open button.v17-edge-handle.v17-right-handle{
  right:calc(360px - var(--structune-drawer-opener-width,27px))!important;
}

/* V17.7.4.344 — Assembly Drawing right opener must remain above the portaled context drawer.
   The drawing portal is z-index:3200; keep the existing handle as the single close/open control. */
html body.v17-drawing-stage button.v17-edge-handle.v17-right-handle{
  z-index:3201!important;
}
html body.v17-drawing-stage.v17-right-open button.v17-edge-handle.v17-right-handle{
  right:calc(360px - var(--structune-drawer-opener-width,27px))!important;
}
