/* ScoutTract floating draw & measure toolbar (draw-overlay.js). Sits over the map; never resizes it. */
.st-drawbar{position:absolute;z-index:20;left:50%;bottom:14px;transform:translateX(-50%);display:flex;align-items:flex-end;gap:4px;
  font-family:Inter,system-ui,sans-serif;color:#fff;pointer-events:none}
.st-drawbar[hidden],.st-drawchip[hidden],.st-drawpop[hidden]{display:none!important}
.st-drawbar-tools{display:flex;gap:3px;padding:4px;background:#1F2A44f2;border:1px solid #B87333;border-radius:14px;box-shadow:0 4px 14px #0007;pointer-events:auto}
.st-dt{width:48px;min-height:46px;padding:3px 0 2px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:1px;background:transparent;color:#fff;
  border:1px solid transparent;border-radius:10px;cursor:pointer;touch-action:manipulation;line-height:1}
.st-dt span{font-size:18px;line-height:20px}.st-dt small{font:600 10px/12px Inter,system-ui,sans-serif;white-space:nowrap;opacity:.92}
.st-dt:hover{background:#2b3a5c}.st-dt:active{transform:scale(.96)}
.st-dt:focus-visible,.st-dt-x:focus-visible{outline:3px solid #f3d48b;outline-offset:1px}
.st-dt.on,.st-dt[aria-pressed=true]{background:#B87333;border-color:#f3c08b}
.st-dt[data-tool=pan][aria-pressed=true]{background:#33476e;border-color:#6d84ad}
.st-dt[data-tool=undo]{margin-left:6px}
.st-dt-expand{display:none;pointer-events:auto;background:#1F2A44f2;border:1px solid #B87333;border-radius:14px;box-shadow:0 4px 14px #0007;width:56px;min-height:52px}
.st-drawbar.st-collapsed .st-drawbar-tools{display:none}
.st-drawbar.st-collapsed .st-dt-expand{display:flex}
.st-drawbar.st-collapsed.st-drawing .st-dt-expand{background:#B87333}
/* options pop-over (adopts the original Color / Label / Project / parcel / save / export controls) */
.st-drawpop{position:absolute;bottom:calc(100% + 8px);right:0;width:min(360px,calc(100vw - 24px));max-height:min(60vh,460px);overflow:auto;pointer-events:auto;
  background:#14203a;border:1px solid #B87333;border-radius:12px;box-shadow:0 8px 24px #000a;padding:8px 10px 10px;color:#eaf1f6;font-size:13px}
.st-drawpop-head{display:flex;align-items:center;justify-content:space-between;margin-bottom:6px}
.st-dt-x{background:transparent;border:0;color:#fff;font-size:16px;min-width:36px;min-height:36px;cursor:pointer;border-radius:8px}
.st-drawpop .st-pop-row{display:flex;flex-wrap:wrap;gap:6px 8px;align-items:center;margin:0 0 8px}
.st-drawpop .st-pop-row label{display:flex;align-items:center;gap:6px;flex:1 1 140px}
.st-drawpop .st-pop-row label input:not([type=color]),.st-drawpop .st-pop-row select{flex:1;min-width:0;min-height:36px}
.st-drawpop .research-export-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center;border-top:1px solid #2b3a5c;padding-top:8px}
.st-drawpop .research-export-row select{flex:1;min-width:130px}
.st-drawpop #researchUndo{display:none}
.st-drawbar.st-pop-open ~ .st-drawchip{display:none!important}
.st-drawpop-foot{display:flex;justify-content:flex-end;border-top:1px solid #2b3a5c;padding-top:8px}
/* live readout chip */
.st-drawchip{position:absolute;z-index:20;left:50%;transform:translateX(-50%);bottom:84px;max-width:min(560px,calc(100% - 24px));padding:5px 12px;border-radius:999px;
  background:#0e2431eb;border:1px solid #ffe27a;color:#ffe27a;font:600 12px/1.35 Inter,system-ui,sans-serif;box-shadow:0 2px 8px #0006;pointer-events:none;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* the old in-panel tool block is replaced by the floating toolbar; its summary is a launcher */
#researchDrawPanel.st-draw-overlay > #researchMapToolbar{display:none}
#researchDrawPanel.st-draw-overlay > summary{list-style:none;cursor:pointer}
#researchDrawPanel.st-draw-overlay > summary::-webkit-details-marker{display:none}
#researchDrawPanel.st-draw-overlay > summary small{opacity:.7;font-weight:500}
/* desktop map-first: centre within the visible map, above the coordinate/zoom footer pill */
body.st-wm #researchDrawPanel{display:none}
body.st-wm #map .st-drawbar{left:calc(var(--stw-inset-l,0px) + (100% - var(--stw-inset-l,0px) - var(--stw-inset-r,0px)) / 2);bottom:48px}
body.st-wm #map .st-drawchip{left:calc(var(--stw-inset-l,0px) + (100% - var(--stw-inset-l,0px) - var(--stw-inset-r,0px)) / 2);bottom:118px}
/* mobile: bottom-left above the peek sheet and MapLibre's (i) attribution button, two rows of six, clear of the right control column */
body.ga-mobile .st-drawbar{left:calc(10px + env(safe-area-inset-left));right:auto;transform:none;bottom:calc(var(--ga-sheet-peek,92px) + 44px)}
body.ga-mobile .st-drawbar-tools{display:grid;grid-template-columns:repeat(6,48px);gap:3px}
body.ga-mobile .st-dt{min-height:48px}
body.ga-mobile .st-dt[data-tool=undo]{margin-left:0}
body.ga-mobile .st-drawpop{left:0;right:auto;width:calc(100vw - 84px - env(safe-area-inset-left) - env(safe-area-inset-right));max-height:calc(100dvh - var(--ga-top,58px) - var(--ga-nav,58px) - var(--ga-sheet-peek,92px) - 164px)}
body.ga-mobile .st-drawchip{left:calc(10px + env(safe-area-inset-left));transform:none;max-width:calc(100% - 92px);bottom:calc(var(--ga-sheet-peek,92px) + 162px)}
body.ga-mobile .st-drawbar.st-collapsed ~ .st-drawchip,body.ga-mobile .st-drawchip.st-low{bottom:calc(var(--ga-sheet-peek,92px) + 106px)}
body.ga-mobile.st-draw-on #gaMobileMapHost .st-map-ctrls{z-index:21}
#stCtrlDraw[aria-pressed=true]{background:#B87333}
@media (max-width:360px){body.ga-mobile .st-drawbar-tools{grid-template-columns:repeat(6,44px)}body.ga-mobile .st-dt{width:44px}}
@media (max-height:600px){body.ga-mobile .st-dt small{display:none}body.ga-mobile .st-dt{min-height:42px}}
@media (prefers-reduced-motion:reduce){.st-dt:active{transform:none}}
@media print{.st-drawbar,.st-drawchip{display:none!important}}
