/* Route planner page: full-screen map with a side panel (bottom sheet on phones). Colours come from site.css tokens. */
.mapbody{overflow:hidden;height:100vh;height:100dvh}
.mapapp{display:grid;grid-template-columns:380px minmax(0,1fr);height:100%}
.mmap{position:relative;min-width:0;height:100%;background:#0d1522}

.mpanel{display:flex;flex-direction:column;min-height:0;background:var(--bg);border-right:1px solid var(--line);z-index:2}
.mhead{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 18px;border-bottom:1px solid var(--line)}
.mhead .logo{font-size:16px}
.mhead .logo svg{width:26px;height:26px}
.mscroll{flex:1;overflow:auto;padding:18px 18px 8px;scrollbar-width:thin;scrollbar-color:var(--line2) transparent}
.mtitle{font-size:22px;letter-spacing:-.02em;line-height:1.2;margin:0 0 6px;font-weight:700}
.mhint{color:var(--ink2);font-size:14px;margin:0 0 18px}
.mlabel{font-size:11.5px;font-weight:600;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);margin:18px 0 8px}

.mveh{display:grid;grid-template-columns:repeat(3,1fr);gap:6px}
.mveh button{font:inherit;font-size:13px;padding:8px 6px;border-radius:8px;border:1px solid var(--line2);background:var(--surface);color:var(--ink2);cursor:pointer;line-height:1.25}
.mveh button:hover{border-color:var(--ink2);color:var(--ink)}
.mveh button[aria-checked=true]{background:var(--accent);border-color:var(--accent);color:var(--accent-ink);font-weight:600}

.mpoints{list-style:none;margin:0;padding:0;display:grid;gap:6px}
.mpoints li{display:flex;align-items:center;gap:10px;padding:7px 8px 7px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:13.5px}
.mpoints li .pin{flex:0 0 22px;height:22px;border-radius:50%;display:grid;place-items:center;font-size:11px;font-weight:700;background:var(--surface2);border:1.5px solid var(--accent);color:var(--ink)}
.mpoints li:first-child .pin{background:var(--accent);color:var(--accent-ink)}
.mpoints li .crd{flex:1;min-width:0;color:var(--ink2);font-variant-numeric:tabular-nums;font-size:12.5px}
.mpoints li .crd b{display:block;color:var(--ink);font-weight:600;font-size:13.5px}
.mpoints li button{flex:0 0 28px;height:28px;border:0;border-radius:6px;background:none;color:var(--muted);cursor:pointer;font-size:18px;line-height:1}
.mpoints li button:hover{background:var(--surface2);color:var(--ink)}
.mempty{color:var(--muted);font-size:13.5px;margin:0;padding:12px;border:1px dashed var(--line2);border-radius:8px;text-align:center}

.mopt{display:flex;gap:10px;align-items:flex-start;margin:16px 0 0;font-size:14px;cursor:pointer}
.mopt input{margin-top:3px;accent-color:var(--accent);width:16px;height:16px}
.mopt small{display:block;color:var(--muted);font-size:12.5px}
.mbtns{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:16px}
.mbtns .btn{justify-content:center}

.merr{margin:14px 0 0;padding:10px 12px;border-radius:8px;border:1px solid #f8717155;background:#f871711a;color:#fecaca;font-size:13.5px}
.mresult{margin-top:18px}
.msum{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.msum div{padding:12px 14px;border:1px solid var(--line);border-radius:8px;background:var(--surface)}
.msum b{display:block;font-size:22px;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.msum span{font-size:12.5px;color:var(--muted)}
.msteps{list-style:none;margin:0;padding:0}
.msteps li{display:flex;gap:10px;padding:9px 4px;border-bottom:1px solid var(--line);font-size:13.5px;cursor:pointer;border-radius:4px}
.msteps li:hover{background:var(--surface)}
.msteps li .ico{flex:0 0 26px;height:26px;border-radius:6px;display:grid;place-items:center;background:var(--surface2);border:0}
.msteps li .ico svg{width:16px;height:16px;stroke:var(--ink2);fill:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.msteps li .tx{flex:1;min-width:0}
.msteps li .tx small{display:block;color:var(--muted);font-size:12.5px}
.msteps li .d{color:var(--muted);font-size:12.5px;white-space:nowrap;font-variant-numeric:tabular-nums}
.msteps li.leg{cursor:default;background:none;font-weight:600;color:var(--accent);border-bottom-color:var(--line2)}
.mfoot{padding:12px 18px;border-top:1px solid var(--line);font-size:12.5px;color:var(--muted)}
.mfoot a{color:var(--accent)}

/* markers */
.mkw{width:28px;height:38px;display:flex;justify-content:center;cursor:grab}
.mk{width:28px;height:28px;border-radius:50% 50% 50% 0;transform:rotate(-45deg);background:var(--surface2);border:2px solid var(--accent);display:grid;place-items:center;cursor:grab;box-shadow:0 4px 10px #0008}
.mk span{transform:rotate(45deg);font:700 12px/1 Inter,ui-sans-serif,system-ui,sans-serif;color:var(--ink)}
.mk.start{background:var(--accent)}
.mk.start span{color:var(--accent-ink)}
.mstep-dot{width:12px;height:12px;border-radius:50%;background:#fff;border:3px solid var(--accent)}

/* MapLibre controls in the site's colours */
.maplibregl-ctrl-group{background:var(--surface);border:1px solid var(--line2)}
.maplibregl-ctrl-group button+button{border-top-color:var(--line2)}
.maplibregl-ctrl-group button .maplibregl-ctrl-icon{filter:invert(1) hue-rotate(180deg) brightness(.9)}
.maplibregl-ctrl.maplibregl-ctrl-attrib{background:#0d1522d9;color:var(--muted)}
.maplibregl-ctrl.maplibregl-ctrl-attrib.maplibregl-compact{background:#0d1522d9;border:1px solid var(--line)}
.maplibregl-ctrl-attrib .maplibregl-ctrl-attrib-inner{color:var(--muted)}
.maplibregl-ctrl-attrib a{color:var(--ink2)}
.maplibregl-ctrl-attrib-button{filter:invert(1) brightness(.85)}
.maplibregl-canvas:focus-visible{outline:none}

@media (max-width:820px){
  .mapapp{grid-template-columns:1fr;grid-template-rows:minmax(0,1fr) auto}
  .mmap{grid-row:1}
  .mpanel{grid-row:2;max-height:48vh;max-height:48dvh;border-right:0;border-top:1px solid var(--line2);border-radius:14px 14px 0 0}
  .mhead{padding:10px 16px}
  .mscroll{padding:12px 16px 6px}
  .mtitle{font-size:18px}
  .mfoot{display:none}
}
body.busy .mresult{opacity:.45;transition:opacity .2s}
body.busy .mmap{cursor:progress}
