/* Truck paths, stops, property line and entrances (js/truck-paths.js): toolbar bottom-left of the Top view, drawing layer.
   Colours follow the New UI tokens (css/layouts.css --l-*), dark by default, body.theme-light for light. */
.tp-bar{--tp-bg:#121d33f2;--tp-surface2:#16233d;--tp-border:#27344f;--tp-text:#e8edf5;--tp-muted:#9aa7bd;--tp-accent:#10b981;--tp-accent-ink:#06281d;--tp-warn:#fbbf24;--tp-danger:#f87171;--tp-shadow:0 8px 30px rgba(0,0,0,.42);
  position:absolute;left:12px;bottom:12px;z-index:45;max-width:calc(100% - 24px);display:flex;flex-direction:column;align-items:flex-start;gap:6px;
  font:13px/1.35 system-ui,-apple-system,"Segoe UI",Roboto,sans-serif;color:var(--tp-text);pointer-events:none;box-sizing:border-box}
body.theme-light .tp-bar{--tp-bg:#fffffff5;--tp-surface2:#f1f5f9;--tp-border:#e2e8f0;--tp-text:#0f172a;--tp-muted:#5b6675;--tp-accent:#0ea371;--tp-accent-ink:#fff;--tp-warn:#b45309;--tp-danger:#dc2626;--tp-shadow:0 8px 28px rgba(16,24,40,.14)}
.tp-bar>*{pointer-events:auto}
.tp-bar *{box-sizing:border-box}
.tp-row{display:flex;flex-wrap:wrap;align-items:center;gap:2px;padding:4px;background:var(--tp-bg);border:1px solid var(--tp-border);border-radius:12px;box-shadow:var(--tp-shadow);max-width:100%}
/* the tools are items of the row itself, so a narrowed row (a phone, ending before the command button) wraps them as one line set */
.tp-tools{display:contents}
.tp-tools[hidden]{display:none}
.tp-btn{display:inline-flex;align-items:center;gap:6px;min-height:36px;min-width:36px;padding:0 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer;white-space:nowrap}
.tp-btn svg{width:18px;height:18px;flex:none}
.tp-btn:hover:not(:disabled){background:var(--tp-surface2)}
.tp-btn[aria-pressed="true"],.tp-btn[aria-pressed="true"]:hover:not(:disabled){background:var(--tp-accent);color:var(--tp-accent-ink)}
.tp-btn:disabled{opacity:.45;cursor:default}
.tp-btn:focus-visible,.tp-small:focus-visible,.tp-speed:focus-visible,.tp-field input:focus-visible,.tp-field select:focus-visible{outline:2px solid var(--tp-accent);outline-offset:2px}
.tp-toggle[aria-expanded="true"]{color:var(--tp-accent)}
.tp-sep{width:1px;height:22px;margin:0 4px;background:var(--tp-border)}
.tp-speed,.tp-kind{height:32px;border:1px solid var(--tp-border);border-radius:8px;background:var(--tp-surface2);color:inherit;font:inherit;padding:0 6px}
.tp-hint{max-width:min(420px,100%);padding:7px 11px;background:var(--tp-bg);border:1px solid var(--tp-border);border-radius:10px;box-shadow:var(--tp-shadow);color:var(--tp-muted)}
.tp-hint[hidden],.tp-panel[hidden]{display:none}
.tp-panel{width:min(340px,100%);max-height:min(46vh,440px,var(--tp-room,440px));overflow:auto;overscroll-behavior:contain;padding:10px 12px 12px;background:var(--tp-bg);border:1px solid var(--tp-border);border-radius:12px;box-shadow:var(--tp-shadow)}
/* No room for the panel under the corner controls (js/truck-paths.js fitBar: a short phone with a sheet open): the bar goes over the
   measurement control (js/plan-dims.js, z-index 45 like this bar; the Opacity panel is 44), unless that control's menu is open.
   The control steps down rather than the bar up: the bar shares the page's stacking context with the New UI shell (#lyt-root, 45,
   later in the page), which stays on top. With no room at all up to the top of the view, the panel waits. */
#view-top-container:has(>.tp-bar.tp-over)>.pd-ctl:not(:has(.pd-btn[aria-expanded="true"])){z-index:44}
.tp-bar.tp-noroom .tp-panel{display:none}
.tp-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:6px}
.tp-head strong{font-size:12px;text-transform:uppercase;letter-spacing:.06em}
.tp-field{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.3fr);align-items:center;gap:8px;margin:6px 0}
.tp-field span{color:var(--tp-muted);font-size:12px}
.tp-field input,.tp-field select{width:100%;min-height:32px;padding:4px 8px;border:1px solid var(--tp-border);border-radius:8px;background:var(--tp-surface2);color:inherit;font:inherit}
.tp-field input:disabled{opacity:.7}
.tp-note{margin:6px 0;color:var(--tp-muted);font-size:12px}
.tp-num{margin:6px 0;font-weight:600;font-variant-numeric:tabular-nums}
.tp-disclaimer{font-size:11px}
.tp-warn{margin:4px 0 8px;padding:0 0 0 16px;color:var(--tp-warn);font-size:12px}
.tp-warn li{margin:2px 0}
.tp-actions{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px}
.tp-small{min-height:32px;padding:4px 10px;border:1px solid var(--tp-border);border-radius:8px;background:var(--tp-surface2);color:inherit;font:inherit;font-weight:600;cursor:pointer;text-align:left}
.tp-small:hover{border-color:var(--tp-accent)}
.tp-danger{color:var(--tp-danger)}
.tp-primary{background:var(--tp-accent);border-color:var(--tp-accent);color:var(--tp-accent-ink)}
.tp-x{min-height:28px;width:28px;padding:0;text-align:center;font-size:16px;line-height:1}
.tp-pathrow{display:block;width:100%;margin:4px 0}
.tp-upsell{margin-top:8px;padding-top:8px;border-top:1px solid var(--tp-border)}
@media (max-width:560px){.tp-btn .tp-lbl,.tp-bar[data-open="true"] .tp-lbl-always{display:none}.tp-btn{padding:0 8px}.tp-panel{max-height:min(38vh,var(--tp-room,38vh))}}
@media print{.tp-bar{display:none!important}}
/* While a drawing tool is active the Top view owns every press (no pan, no item drag, no browser pan/zoom on touch). */
#view-top-container.tp-capturing,#view-top-container.tp-capturing svg{touch-action:none;cursor:crosshair!important}

/* ---- drawing layer (SVG user units: 1 ft = PX_PER_FT) ---- */
.tp-band{fill:none;stroke:var(--tp-color,#0284c7);stroke-opacity:.2;stroke-linecap:round;stroke-linejoin:round}
.tp-path.tp-sel .tp-band{stroke-opacity:.34}
.tp-draft-band{stroke:#0284c7;stroke-opacity:.18}
.tp-center{fill:none;stroke:var(--tp-color,#0284c7);stroke-width:2;stroke-dasharray:10 7;stroke-linecap:round;stroke-linejoin:round}
.tp-arrow{fill:none;stroke:var(--tp-color,#0284c7);stroke-width:5;stroke-linecap:round;stroke-linejoin:round;opacity:.85}
/* --tp-k (set per draw from the zoom) keeps labels about 16 screen px when zoomed out. */
.tp-label{font:600 calc(16px * var(--tp-k,1)) system-ui,-apple-system,"Segoe UI",sans-serif;fill:#e8edf5;stroke:#0d1526;stroke-width:calc(4px * var(--tp-k,1));stroke-linejoin:round;paint-order:stroke}
body.theme-light .tp-label{fill:#0f172a;stroke:#ffffff}
.tp-dim{font-weight:500;font-size:calc(14px * var(--tp-k,1));font-variant-numeric:tabular-nums}
.tp-name{fill:var(--tp-color,#0284c7)}
body.theme-light .tp-name{fill:var(--tp-color,#0284c7)}
.tp-area{font-size:calc(18px * var(--tp-k,1));opacity:.85}
.tp-stop-dot{fill:var(--tp-color,#0284c7);fill-opacity:.2;stroke:var(--tp-color,#0284c7);stroke-width:3}
.tp-stop-mark{fill:var(--tp-color,#0284c7)}
.tp-stop.tp-sel .tp-stop-dot{stroke-width:6;fill-opacity:.35}
.tp-boundary-line{fill:none;stroke:#a16207;stroke-width:2.5;stroke-dasharray:14 8}
body:not(.theme-light) .tp-boundary-line{stroke:#facc15}
.tp-boundary polygon.tp-boundary-line{fill:#a16207;fill-opacity:.03}
.tp-boundary.tp-sel .tp-boundary-line{stroke-width:4}
.tp-gate-flag{fill:#16a34a;stroke:#14532d;stroke-width:3;stroke-linejoin:round}
.tp-exit .tp-gate-flag{fill:#dc2626;stroke:#7f1d1d}
.tp-gate-foot{fill:#0f172a;stroke:#fff;stroke-width:3}
.tp-gate.tp-sel .tp-gate-flag{stroke-width:6}
.tp-handle{fill:#fff;stroke:#0284c7;stroke-width:2}
.tp-handle.tp-sel{fill:#0284c7}
.tp-editing .tp-band,.tp-editing .tp-stop,.tp-editing .tp-gate,.tp-editing .tp-handle{cursor:pointer}
.tp-warn-ring{fill:none;stroke:#f59e0b;stroke-width:3;stroke-dasharray:6 5}
.tp-cab{fill:var(--tp-color,#0284c7);stroke:#0f172a;stroke-width:3}
.tp-cab-roof{fill:#0f172a;opacity:.55}
.tp-trailer{fill:#e2e8f0;stroke:#334155;stroke-width:3}
.tp-dwell .tp-trailer{fill:#fde68a}
