/* Keep location state next to the map controls, clear of the stop or journey sheet. */
.top-search-container { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; gap:6px; }
.top-search-input-wrapper { min-width:0; }
.top-search-results { grid-column:1 / -1; }
.top-search-input { min-height:44px; font-size:16px; }
.bus-where-to { min-height:44px; padding:0 12px; border:1px solid var(--nv-line); border-radius:var(--nv-r); background:var(--nv-raised); color:var(--nv-ink); font:inherit; font-weight:600; white-space:nowrap; cursor:pointer; }
.bus-where-to:hover { background:var(--nv-surface); }
.bus-where-to:focus-visible,.bus-location-note button:focus-visible,.bus-moved-note:focus-visible { outline:2px solid var(--nv-accent); outline-offset:2px; }
body.nv .bus-map-controls .refresh-button.is-following { background:#2f6fed!important; border-color:#2f6fed!important; color:#fff!important; }
.bus-location-note,.bus-moved-note { position:fixed; right:68px; bottom:calc(24px + env(safe-area-inset-bottom)); z-index:1301; width:max-content; max-width:min(310px,calc(100vw - 92px)); box-sizing:border-box; padding:8px 12px; border:1px solid var(--nv-line); border-radius:var(--nv-r); background:var(--nv-raised); color:var(--nv-ink); font:inherit; font-size:13px; line-height:1.4; }
.bus-location-note button { min-height:44px; padding:0 8px; margin-left:4px; border:0; background:none; color:var(--nv-ink); font:inherit; font-weight:600; text-decoration:underline; cursor:pointer; }
.bus-moved-note { bottom:calc(86px + env(safe-area-inset-bottom)); min-height:44px; text-align:left; cursor:pointer; }
.bus-location-note[hidden],.bus-moved-note[hidden] { display:none; }
.bus-looking-icon { background:none; border:0; }
.bus-looking-pin { position:absolute; left:11px; top:9px; width:22px; height:22px; border:2px solid var(--nv-ink); border-radius:50% 50% 50% 0; transform:rotate(-45deg); background:var(--nv-raised); box-sizing:border-box; }
.bus-looking-pin::after { content:''; position:absolute; inset:5px; border-radius:50%; background:var(--nv-ink); }
.bus-user-dot::after { animation:none!important; opacity:0; }
@media(max-width:767px) {
 .bus-location-note { bottom:calc(var(--bus-sheet-height,48dvh) + 12px); }
 .bus-moved-note { bottom:calc(var(--bus-sheet-height,48dvh) + 78px); }
}
@media(min-width:768px) and (max-width:940px) {
 .top-search-container { grid-template-columns:minmax(0,1fr); }
 .bus-where-to { justify-self:end; }
}
@media(prefers-reduced-motion:no-preference) {
 .refresh-button.bus-locate-invite { animation:bus-locate-invite 1.4s ease-in-out 1; }
 @keyframes bus-locate-invite { 50% { outline:5px solid var(--nv-accent); outline-offset:3px; } }
}

/* Map number pills share the sheet's service colour without competing with stop signs. */
body.nv #map .route-num span { color:var(--route-text,#fff); padding:2px 5px; border-width:1px; box-shadow:0 1px 2px rgba(28,36,56,.2); }

/* Route offers use the shared card; only the coloured service grid is bus-specific. */
.map-pop-wrap .map-pop { overflow-y:auto; overscroll-behavior:contain; }
.map-pop .bus-map-stop-eta { display:block; font-size:.8125rem; white-space:nowrap; }
.bus-map-service-chips { display:grid; grid-template-columns:repeat(auto-fit,minmax(44px,1fr)); gap:6px; width:260px; max-width:100%; }
.bus-map-service-chips .map-pop-btn { flex:none; padding:0 6px; background:var(--c); border-color:var(--c); color:var(--route-text); }
.bus-map-service-chips .map-pop-btn:hover { background:var(--c); filter:brightness(1.08); }
.bus-map-service-chips.is-scrollable { max-height:94px; overflow-y:auto; overscroll-behavior:contain; scrollbar-width:thin; }
.leaflet-popup.bus-user-popup-wrap .leaflet-popup-content-wrapper { border-radius:var(--nv-r); box-shadow:none; }
.bus-user-popup { max-width:min(260px,calc(100vw - 64px)); font:700 .8125rem/1.35 var(--nv-font); white-space:normal; }
