/* Nearby transit: scoped UI only. No styles apply to Leaflet map layers. */
.map-shell > .map-controls #nearbyStopsToggle {
  width:44px; min-width:44px; height:44px; min-height:44px; display:flex;
  flex-direction:column; align-items:center; justify-content:center; gap:1px;
  padding:2px 0 3px; border-radius:13px; color:#285c96;
}
.map-shell > .map-controls #nearbyStopsToggle svg {width:17px;height:17px;flex:none}
.map-shell > .map-controls #nearbyStopsToggle span {font-size:8.5px;line-height:1;font-weight:800;letter-spacing:-.15px}
.map-shell > .map-controls #nearbyStopsToggle.is-active {color:#145dba;background:#e9f3ff;box-shadow:0 0 0 2px #88bdfa,0 4px 14px #142d2415}
.map-shell > .map-controls #nearbyStopsToggle:focus-visible {outline:3px solid #4a98ff;outline-offset:3px}
.nearby-transit-panel {
  position:absolute;z-index:470;top:105px;right:78px;width:min(352px,calc(100% - 100px));
  max-height:calc(100% - 135px);display:flex;flex-direction:column;overflow:hidden;
  background:#fffffff5;border:1px solid #dde6f2;border-radius:22px;
  box-shadow:0 18px 50px #071c3e35;backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);
  color:#1b304e;
}
.nearby-transit-panel[hidden] {display:none!important}
.nearby-sheet-handle {display:none}
.nearby-panel-head {flex:none;display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 17px 12px;border-bottom:1px solid #e7edf5}
.nearby-eyebrow {display:block;color:#567caa;font-size:9px;font-weight:850;letter-spacing:.115em;margin-bottom:3px}
.nearby-panel-head h2 {font-size:15px;font-weight:850;letter-spacing:-.35px;margin:0;line-height:1.25;outline:none}
.nearby-head-actions {display:flex;gap:6px;flex:none}
.nearby-head-actions button {width:34px;height:34px;display:grid;place-items:center;border-radius:10px;border:1px solid #dce6f1;background:#f2f7fd;color:#51647d;font-size:21px;line-height:1}
.nearby-head-actions button:hover {background:#e5f0fb;color:#174b8e}
.nearby-head-actions button:focus-visible,.nearby-filters button:focus-visible,.nearby-map-link:focus-visible,.nearby-retry:focus-visible {outline:3px solid #5aabf8;outline-offset:2px}
.nearby-panel-content {min-height:0;display:flex;flex-direction:column;padding:12px 14px 14px}
.nearby-distance-note {font-size:10px;color:#69809b;line-height:1.45;padding-bottom:10px}
.nearby-filters {display:flex;gap:5px;background:#f0f4fa;border-radius:12px;padding:4px;flex:none}
.nearby-filters button {flex:1;min-height:36px;border:0;border-radius:9px;background:transparent;color:#64768e;font-size:11px;font-weight:750}
.nearby-filters button.is-selected {color:#1454a4;background:#fff;box-shadow:0 2px 8px #153e7230}
.nearby-status {font-size:10px;line-height:1.45;color:#5e7086;padding:8px 2px 5px;margin:0;flex:none}
.nearby-status[data-state="loading"] {color:#266bad}
.nearby-status[data-state="warning"] {color:#90640c}
.nearby-status[data-state="error"] {color:#a94344}
.nearby-results {min-height:0;overflow-y:auto;overscroll-behavior:contain;scrollbar-width:thin;scrollbar-color:#bfd1e5 transparent}
.nearby-result {display:flex;align-items:center;gap:8px;padding:11px 2px;border-top:1px solid #e9eff7}
.nearby-result-icon {width:30px;height:30px;display:grid;place-items:center;flex:none;border-radius:10px;background:#e3efff;color:#1b62b3;font-size:12px;font-weight:900}
.nearby-result-body {min-width:0;flex:1;display:flex;flex-direction:column;gap:3px}
.nearby-result-body strong {font-size:11.5px;font-weight:800;line-height:1.3;overflow-wrap:anywhere}
.nearby-result-body span {font-size:9.5px;color:#5e7897;line-height:1.25}
.nearby-result-body small {font-size:9.5px;color:#4f637c;line-height:1.2}
.nearby-map-link {flex:none;min-height:38px;max-width:80px;border-radius:10px;border:1px solid #c8dffb;background:#f1f7ff;color:#125caa;font-size:9.5px;line-height:1.18;font-weight:800;padding:5px 7px}
.nearby-map-link:hover {background:#dceeff;border-color:#88baf1}
.nearby-result.st-nearby-premium .nearby-map-link{background:#fff7e8;border-color:#eedfbe;color:#906318}
.nearby-result.st-nearby-premium .nearby-map-link:hover{background:#ffefcb;border-color:#ddb968}
.nearby-retry {min-height:40px;margin-top:7px;border:1px solid #b8d7f7;border-radius:11px;background:#edf6ff;color:#165fae;font-size:11px;font-weight:800}
.nearby-retry[hidden] {display:none!important}
.nearby-transit-panel.is-minimized .nearby-panel-content {display:none}
.nearby-transit-panel.is-minimized .nearby-panel-head {border-bottom:0}
:root[data-theme="dark"] .map-shell > .map-controls #nearbyStopsToggle {color:#b6d5fb}
:root[data-theme="dark"] .map-shell > .map-controls #nearbyStopsToggle.is-active {color:#cce6ff;background:#1e456d;box-shadow:0 0 0 2px #579bdc,0 4px 14px #07101f70}
:root[data-theme="dark"] .nearby-transit-panel {background:#132339f5;color:#e6f0ff;border-color:#3c516b;box-shadow:0 17px 50px #020713a3}
:root[data-theme="dark"] .nearby-panel-head {border-color:#31465e}
:root[data-theme="dark"] .nearby-eyebrow {color:#89b8f1}
:root[data-theme="dark"] .nearby-head-actions button {color:#d4e5f9;background:#203653;border-color:#425d7e}
:root[data-theme="dark"] .nearby-head-actions button:hover {background:#2a486d;color:#fff}
:root[data-theme="dark"] .nearby-distance-note,:root[data-theme="dark"] .nearby-status {color:#a2b9d3}
:root[data-theme="dark"] .nearby-status[data-state="loading"] {color:#8ec8ff}
:root[data-theme="dark"] .nearby-status[data-state="warning"] {color:#ffd688}
:root[data-theme="dark"] .nearby-status[data-state="error"] {color:#ffb7b4}
:root[data-theme="dark"] .nearby-filters {background:#1c304a}
:root[data-theme="dark"] .nearby-filters button {color:#aec1d9}
:root[data-theme="dark"] .nearby-filters button.is-selected {color:#d8efff;background:#305479;box-shadow:0 2px 8px #02071360}
:root[data-theme="dark"] .nearby-result {border-color:#31455e}
:root[data-theme="dark"] .nearby-result-icon {color:#bddfff;background:#274466}
:root[data-theme="dark"] .nearby-result-body span,:root[data-theme="dark"] .nearby-result-body small {color:#abc2dd}
:root[data-theme="dark"] .nearby-map-link,:root[data-theme="dark"] .nearby-retry {color:#d4edff;background:#25466b;border-color:#4b739d}
:root[data-theme="dark"] .nearby-map-link:hover,:root[data-theme="dark"] .nearby-retry:hover {background:#315a84}
:root[data-theme="dark"] .nearby-result.st-nearby-premium .nearby-map-link{color:#ffe0a1;background:#493922;border-color:#80633a}
:root[data-theme="dark"] .nearby-result.st-nearby-premium .nearby-map-link:hover{background:#5c4929}
@media (max-width:820px) and (orientation:portrait) {
  .nearby-transit-panel {
    top:auto;bottom:calc(96px + env(safe-area-inset-bottom,0px));left:12px;right:12px;width:auto;
    max-height:min(55dvh,460px);border-radius:23px;box-shadow:0 18px 52px #0f22434d;
  }
  .nearby-sheet-handle {display:block;flex:none;width:39px;height:5px;border-radius:999px;background:#c1cee0;margin:9px auto 0}
  .nearby-panel-head {padding:8px 16px 12px}
  .nearby-panel-content {padding:10px 13px 13px}
  .nearby-map-link {min-height:44px}
}
@media (max-width:820px) and (orientation:landscape) {
  .nearby-transit-panel {top:78px;right:68px;max-height:calc(100% - 96px);width:min(330px,calc(100% - 96px))}
}
@media (prefers-reduced-motion:reduce) { .nearby-transit-panel,.nearby-transit-panel * {transition:none!important;animation:none!important} }
