/* Stage 37: put the panel's white backing INSIDE the map app's viewport stacking
   context. All existing tool nodes stay in their original DOM positions. The
   backing now sits below the app's original controls instead of covering them. */
#saj-left-tools-panel-stage35 {
  z-index: 9998 !important;
  pointer-events: none !important;
}
#saj-left-tools-panel-stage35 .saj-left-tools-head {
  pointer-events: auto !important;
  z-index: 1 !important;
}
/* The original React map workspace is a fixed 100vw x 100vh stacking context.
   Stage 37 docks only the panel background into it, so the original controls
   (validation, layer menu, user location, compass) with higher z-indices paint
   above the white backing. */
#root > div[style*="width: 100vw"] > #saj-left-tools-panel-stage35 {
  z-index: 9998 !important;
}
/* Preserve independent collapse behavior. */
body.saj-left-tools-collapsed #saj-left-tools-panel-stage35 {
  width: 48px !important;
  height: 44px !important;
  bottom: auto !important;
}
/* Keep the complete panel visible on narrow/short displays; its controls remain
   scrollable individually and are not hidden behind the white backing. */
@media (max-width: 520px) {
  #saj-left-tools-panel-stage35 {
    left: 6px !important;
    top: 8px !important;
    bottom: 8px !important;
    width: 188px !important;
  }
}
