/* Route editor: map almost full screen, large handles for a finger, tools under the map. */
.route-editor-dialog{width:min(1100px,calc(100vw - 24px));max-height:calc(100dvh - 24px);padding:16px;display:flex;flex-direction:column;gap:8px}
.route-editor-dialog[open]{display:flex}
.route-editor-top{display:flex;flex-wrap:wrap;align-items:center;gap:10px}
.route-editor-top h2{margin:0;font-size:1.2rem;white-space:nowrap}
.route-editor-top .pc-info[open]{display:contents}
.route-editor-top .pc-info[open] p{flex:1 0 100%;max-width:none;margin:0}
.route-editor-top>h2,.route-editor-top .pc-info summary{order:-2}
.route-editor-top .route-editor-close{order:-1}
.route-editor-top .pc-info[open]::details-content{flex:1 0 100%}
.route-editor-close{margin-left:auto}
.route-editor-fields{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.route-editor-fields input[type=text]{flex:1 1 220px;min-width:0}
.route-editor-fields select{flex:0 0 auto;width:auto}
.route-editor-follow{display:flex;align-items:center;gap:6px;white-space:nowrap}
.route-editor-map{height:min(62dvh,620px);min-height:280px;border-radius:14px;overflow:hidden;border:1px solid var(--sep);touch-action:none}
.route-editor-stats{margin:0;font-variant-numeric:tabular-nums}
.route-editor-tools{display:flex;flex-wrap:wrap;gap:8px;margin:0}
.route-editor-tools>button{width:auto;margin:0}
.route-editor-tools>button.primary{margin-left:auto}
.route-editor-status:empty{display:none}
.route-editor-result .actions{display:flex;flex-wrap:wrap;gap:8px}
.route-editor-menu{display:flex;flex-direction:column;gap:6px;min-width:190px}
.route-editor-menu button{width:100%;text-align:left;min-height:40px}
.route-editor-popup .leaflet-popup-content-wrapper{background:var(--card);color:var(--text);border-radius:12px}
.route-editor-popup .leaflet-popup-tip{background:var(--card)}
.route-editor-popup .leaflet-popup-content{margin:10px}
.leaflet-marker-icon.route-pin{display:flex !important;align-items:center;justify-content:center;border-radius:50%;box-sizing:border-box}
.route-pin span{font:700 12px/1 system-ui,sans-serif;color:#07172e}
.route-way,.route-start,.route-end{border:3px solid #07172e;box-shadow:0 1px 4px #0006}
.route-way{background:#c8ff31}
.route-start{background:#3ddc84}
.route-end{background:#ff5d5d}
.route-end span{color:#07172e}
/* The handle in the middle of a tramo: a small ring inside a finger-sized hit area. */
.route-mid{background:transparent}
.route-mid::after{content:"";display:block;width:12px;height:12px;border-radius:50%;background:#fff;border:3px solid #07172e;opacity:.85}
@media (max-width:640px){
  .route-editor-dialog{width:100vw;max-width:100vw;height:100dvh;max-height:100dvh;border-radius:0;padding:10px;border:0}
  /* The map takes what is left, so Guardar and what follows it (saved, Garmin, GPX) stay on screen. */
  .route-editor-map{flex:1 1 0;height:auto;min-height:200px}
  .route-editor-tools>button{flex:1 1 30%;min-height:44px;padding:6px 8px;font-size:.9rem}
  .route-editor-tools>button.primary{flex-basis:100%;margin-left:0}
}
/* Zoom buttons of 44 px for touch (Leaflet draws 30 px). */
.route-editor-map.leaflet-touch .leaflet-bar.leaflet-control-zoom a{width:44px;height:44px;line-height:44px;font-size:22px}
