/* Planner refinement. Link AFTER navigation.css (and any other panel CSS) so these rules win ties.
   All interactive targets stay at least 44px; no animation is added, so reduced motion needs no override. */

/* Row: input flexes; Use current location, Choose on map and Undo keep fixed 44px targets.
   Undo is [hidden] until the field has history, which returns its width to the input. */
.route-field .route-row input{min-width:0}
.route-field .route-pick,.route-field .route-undo{flex:none;width:44px;height:44px;min-width:44px}
.route-field .route-undo[hidden]{display:none}
.route-field .route-pick[aria-pressed=true]{outline:2px solid currentColor;outline-offset:-2px}

/* Planner tools: Add stop and Options side by side from 360px; Undo removed stop takes its own full row. */
.nav-tools{display:grid;grid-template-columns:1fr;gap:6px}
@media (min-width:360px){
  .nav-tools{grid-template-columns:repeat(2,minmax(0,1fr))}
}
.nav-tools .nav-tool{min-height:44px;min-width:44px}
.nav-tools .route-undo-removed{grid-column:1/-1}
.nav-tools .route-undo-removed[hidden]{display:none}

/* Per-stop actions: one compact row of three 44px targets instead of a stack. */
.nav-stop-actions{display:flex;flex-wrap:wrap;gap:6px}
.nav-stop-actions button{flex:1 1 0;min-width:44px;min-height:44px;padding:0 10px;font-size:13px;white-space:nowrap}

/* Visually hidden polite live region for mode, reversal, undo and map-choice announcements. */
.planner-live{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}

/* Keep a revealed dropdown clear of the clipped bottom edge of the scrolling body. */
.route-body{scroll-padding-block:8px 16px}

/* Picking uses a compact instruction strip at every size so the selected field cannot obscure the map. */
.route-panel.is-picking>:not(.route-pick-bar):not(.route-status){display:none}
.route-panel.is-picking .route-pick-bar{margin-top:0}

/* Focus never changes sheet geometry: a pointer-down must not move its target before pointer-up.
   The input scrolls long names horizontally; action targets remain a stable 44px. */
.route-field .route-row{flex-wrap:nowrap}

/* A short landscape screen cannot fit header, multi-stop editor and a full preview footer.
   Editing owns the column; Show route returns to the preview and Start action. */
@media (max-height:480px) and (min-width:480px){
  .route-panel:not(.is-collapsed):not(.is-navigating):not(.is-picking):not(.is-options) .route-result{display:none}
}
