/* Journey planning: transient map surface, shared BustoBus typography and palette. */
#bb-journey-root{position:fixed;inset:0;z-index:1250;pointer-events:none;--j-bg:#fafaf8;--j-card:#fff;--j-text:#0f172a;--j-muted:#64748b;--j-border:#dce1e6;--j-soft:#f1f5f9;--j-link:#b70203}
#bb-journey-root[hidden]{display:none}
html[data-bb-theme=dark] #bb-journey-root{--j-bg:#10161f;--j-card:#18212d;--j-text:#eef3f8;--j-muted:#b4bfcc;--j-border:#3d4d60;--j-soft:#202b38;--j-link:#ff9ba7}
.bb-journey-sheet{position:absolute;bottom:var(--bb-surface-keyboard,0px);left:0;right:0;max-height:max(130px,calc(100% - var(--safe-area-top,0px) - var(--bb-surface-keyboard,0px) - 140px));display:flex;flex-direction:column;pointer-events:auto;background:var(--j-bg);color:var(--j-text);border:1px solid var(--j-border);border-bottom:0;border-radius:24px 24px 0 0;box-shadow:0 -8px 32px rgba(15,23,42,.13);overflow:hidden;animation:bb-journey-in .18s cubic-bezier(.22,1,.36,1)}
.bb-journey-head{padding:17px 18px 13px;display:grid;grid-template-columns:36px minmax(0,1fr) 44px;gap:11px;align-items:center;border-bottom:1px solid var(--j-border);flex:none}
.bb-journey-icon{width:36px;height:36px;display:grid;place-items:center;background:var(--j-soft);border-radius:12px;color:var(--j-muted)}
.bb-journey-head h2{font-size:19px;font-weight:800;letter-spacing:-.025em;line-height:1.25;margin:0}.bb-journey-head p{font-size:11px;color:var(--j-muted);white-space:nowrap;text-overflow:ellipsis;overflow:hidden;margin:4px 0 0}
#bb-journey-root svg,.bb-place-actions svg{width:20px;height:20px;stroke-width:1.9;display:block;flex:none}
.bb-journey-close,.bb-journey-back{width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:14px;background:var(--j-soft);color:var(--j-muted);cursor:pointer}
.bb-journey-scroll{padding:16px 18px 12px;overflow-y:auto;overscroll-behavior:contain;min-height:0;touch-action:pan-y;scrollbar-width:thin}
.bb-journey-fields{border:1px solid var(--j-border);border-radius:17px;background:var(--j-card);overflow:hidden}.bb-journey-field{padding:11px 13px}.bb-journey-field+.bb-journey-field{border-top:1px solid var(--j-border)}
.bb-journey-field label{display:block;color:var(--j-muted);font-size:10px;font-weight:750;letter-spacing:.04em;text-transform:uppercase;margin-bottom:4px}.bb-journey-field input{width:100%;min-height:30px;padding:0;border:0;outline:none;box-shadow:none;background:transparent;color:var(--j-text);font-family:inherit;line-height:1.5;font-size:16px;font-weight:650;overflow:hidden;text-overflow:ellipsis}
.bb-journey-field:focus-within{box-shadow:inset 3px 0 0 #CB0304}.bb-journey-field input::placeholder{color:var(--j-muted);font-weight:500}
.bb-journey-secondary{display:flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:10px 12px;border:1px solid var(--j-border);border-radius:13px;color:var(--j-text);background:var(--j-card);font-size:12px;font-weight:700;cursor:pointer}
.bb-journey-tools{display:flex;gap:8px;margin:11px 0}.bb-journey-tools .bb-journey-secondary{flex:1;min-width:0}.bb-journey-tools span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.bb-journey-time{display:flex;align-items:center;gap:10px;width:100%;min-height:44px;padding:10px 2px;border:0;color:var(--j-muted);background:none;font-size:12px;text-align:left;cursor:pointer}.bb-journey-time span{flex:1}.bb-journey-time>svg:last-child{width:15px;height:15px}
.bb-journey-primary{width:100%;min-height:46px;border:0;border-radius:14px;background:#CB0304;color:#fff;font-size:13px;font-weight:750;padding:12px 16px;cursor:pointer}.bb-journey-primary:disabled,.bb-journey-secondary:disabled{opacity:.5;cursor:wait}
.bb-journey-status{font-size:12px;line-height:1.55;color:var(--j-muted);margin:0 0 11px;overflow-wrap:anywhere}.bb-journey-status:empty{display:none}.bb-journey-status[data-error=true]{color:#b91c1c}html[data-bb-theme=dark] .bb-journey-status[data-error=true]{color:#ff9ba7}
.bb-journey-note{font-size:10px;line-height:1.5;margin:10px 0 0;color:var(--j-muted)}
.bb-journey-footer{flex:none;padding:9px 18px max(14px,calc(var(--safe-area-bottom,0px) - var(--bb-surface-keyboard,0px)));border-top:1px solid var(--j-border);font-size:10px;color:var(--j-muted);line-height:1.5}
.bb-journey-results{display:grid;gap:10px}.bb-journey-result{width:100%;text-align:left;border:1px solid var(--j-border);background:var(--j-card);color:var(--j-text);border-radius:16px;padding:14px;cursor:pointer}.bb-journey-result[aria-pressed=true]{border-color:var(--j-link)}
.bb-journey-result-top{display:flex;align-items:baseline;justify-content:space-between;gap:10px;font-size:17px;font-weight:800;letter-spacing:-.025em}.bb-journey-result-top small{font-size:12px;font-weight:650;letter-spacing:0;color:var(--j-muted)}
.bb-journey-steps{display:flex;align-items:center;flex-wrap:wrap;gap:7px;margin-top:11px}.bb-journey-steps>svg{width:13px!important;height:13px!important;color:var(--j-muted)}
.bb-journey-line{display:inline-flex;gap:5px;align-items:center;border:1px solid var(--j-border);border-left:3px solid var(--line-color,#64748b);border-radius:7px;padding:4px 7px;background:var(--j-soft);color:var(--j-text);font-size:12px;font-weight:750}
.bb-journey-walk{display:flex;align-items:center;gap:4px;font-size:11px;color:var(--j-muted)}.bb-journey-walk svg{width:16px!important;height:16px!important}
.bb-journey-result-meta{font-size:11px;color:var(--j-muted);margin-top:10px;line-height:1.5}
.bb-journey-view-head{display:flex;align-items:center;gap:10px;margin:0 0 14px}.bb-journey-view-head h3{font-size:16px;font-weight:800;margin:0}.bb-journey-view-head h3:focus{outline:none}
.bb-journey-options{display:flex;gap:8px;margin-top:13px}.bb-journey-options button{flex:1}
.bb-journey-timeline{list-style:none;margin:0;padding:0}.bb-journey-timeline li{position:relative;padding:0 0 19px 26px;margin-left:7px;border-left:2px solid var(--j-border)}.bb-journey-timeline li:last-child{border-left-color:transparent;padding-bottom:0}.bb-journey-timeline li::before{content:"";position:absolute;width:10px;height:10px;border-radius:50%;left:-6px;top:4px;background:var(--j-card);border:2px solid var(--line-color,var(--j-muted))}.bb-journey-timeline strong{display:block;font-size:13px;line-height:1.5}.bb-journey-timeline p{font-size:12px;line-height:1.5;color:var(--j-muted);margin:4px 0 0}.bb-journey-timeline time{font-weight:750;color:var(--j-text)}
.bb-journey-suggestions{list-style:none;padding:0;margin:8px 0 0;border-top:1px solid var(--j-border);max-height:184px;overflow-y:auto;overscroll-behavior:contain}.bb-journey-suggestions[hidden]{display:none}.bb-journey-suggestions button{width:100%;display:block;min-height:48px;text-align:left;border:0;border-bottom:1px solid var(--j-border);background:transparent;padding:10px 0;color:var(--j-text);font-size:13px;cursor:pointer}.bb-journey-suggestions button small{display:block;margin-top:3px;font-size:11px;color:var(--j-muted)}.bb-journey-suggestions button[aria-selected=true]{background:var(--j-soft)}
html[data-bb-journey-open=true] #ui-panel{visibility:hidden;pointer-events:none}html[data-bb-journey-open=true] .popover-temporale{z-index:1450}html[data-bb-journey-route=true] #map .linea-trasporto-smussata{opacity:.22!important}
.bb-place-actions-popup .leaflet-popup-content-wrapper{padding:0!important;background:#fff!important;color:#0f172a!important;border:1px solid #dce1e6;border-radius:17px!important;box-shadow:0 7px 24px rgba(15,23,42,.17)!important}.bb-place-actions-popup .leaflet-popup-content{margin:0!important;line-height:1.45!important}.bb-place-actions{padding:15px;min-width:216px;max-width:280px}.bb-place-actions h3{font-family:inherit;font-weight:750;font-size:14px;line-height:1.4;margin:0;overflow-wrap:anywhere}.bb-place-actions p{font-size:11px;color:#64748b;margin:4px 0 13px;overflow-wrap:anywhere}.bb-place-actions-row{display:flex;gap:8px}.bb-place-actions button{min-height:44px;display:flex;align-items:center;justify-content:center;gap:7px;padding:9px 11px;border:1px solid #dce1e6;border-radius:12px;background:#f1f5f9;color:#475569;font-size:12px;font-weight:750;cursor:pointer}.bb-place-actions button[data-primary]{background:#CB0304;color:white;border-color:#CB0304;flex:1}.bb-place-actions button svg{width:17px;height:17px}
html[data-bb-theme=dark] .bb-place-actions-popup .leaflet-popup-content-wrapper{background:#18212d!important;color:#eef3f8!important;border-color:#3d4d60}html[data-bb-theme=dark] .bb-place-actions p{color:#b4bfcc}html[data-bb-theme=dark] .bb-place-actions button:not([data-primary]){background:#202b38;color:#b4bfcc;border-color:#3d4d60}
.bb-journey-origin{background:transparent!important;border:0!important}.bb-journey-origin>span{display:block;padding:5px 9px;background:#fff;border:1px solid #64748b;border-radius:9px;color:#0f172a;font-size:11px;font-weight:750;white-space:nowrap;box-shadow:0 2px 7px rgba(15,23,42,.18)}html[data-bb-theme=dark] .bb-journey-origin>span{background:#18212d;color:#eef3f8;border-color:#91a6bf}
#bb-journey-root button:focus-visible,.bb-place-actions button:focus-visible{outline:3px solid #3b82f6;outline-offset:2px}
@media(min-width:700px){.bb-journey-sheet{left:16px;right:auto;bottom:max(16px,var(--bb-surface-keyboard,0px));width:420px;max-height:max(130px,calc(100% - var(--safe-area-top,0px) - var(--bb-surface-keyboard,0px) - 140px));border-bottom:1px solid var(--j-border);border-radius:23px}.bb-journey-footer{padding-bottom:14px}html[data-bb-journey-open=true] .leaflet-control-attribution{left:auto!important;right:14px!important;transform:none!important;max-width:calc(100vw - 466px)}}
@media(max-height:420px) and (max-width:699px){html[data-bb-journey-open=true] .leaflet-control-posizione{visibility:hidden;pointer-events:none}.bb-journey-sheet{max-height:max(130px,calc(100% - var(--safe-area-top,0px) - var(--bb-surface-keyboard,0px) - 72px))}}
@keyframes bb-journey-in{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:translateY(0)}}
@media(prefers-reduced-motion:reduce){.bb-journey-sheet{animation:none}}

.bb-journey-context{margin:0 0 10px}.bb-journey-options .bb-journey-refresh{flex:0 0 44px;padding:10px}.bb-journey-refresh>span:last-child{display:none}
html[data-bb-journey-open=true] #map-toolbar:has(#temporal-trigger[aria-expanded=true]){z-index:1450}
@media(max-width:699px){html[data-bb-journey-open=true] .leaflet-control-posizione{bottom:calc(var(--bb-surface-panel,40px) + 22px)!important}html[data-bb-journey-open=true] .leaflet-control-attribution{bottom:calc(var(--bb-surface-panel,40px) + 6px)!important}}

html[data-bb-journey-open=true][data-bb-journey-controls=hidden] .leaflet-control-posizione{visibility:hidden;pointer-events:none}
@media(max-height:420px){.bb-journey-footer{display:none}.bb-journey-head{padding:6px 12px}.bb-journey-head p{display:none}}

.bb-journey-sheet{max-height:max(100px,calc(100% - var(--j-top,140px) - var(--bb-surface-keyboard,0px)))}
@media(min-width:700px){.bb-journey-sheet{max-height:max(100px,calc(100% - var(--j-top,140px) - var(--bb-surface-keyboard,0px) - 16px))}}
#bb-journey-root[data-compact=true] .bb-journey-footer{display:none}#bb-journey-root[data-compact=true] .bb-journey-head{padding:6px 12px}#bb-journey-root[data-compact=true] .bb-journey-head p{display:none}
html[data-bb-journey-open=true][data-bb-journey-keyboard=true] #map-toolbar{visibility:hidden}

html[data-bb-journey-open=true] .leaflet-control-posizione{transition:opacity .14s,visibility 0s!important}
/* V43: compact date, common controls and quiet empty state. */
#temporal-calendar[hidden],#temporal-journey-modes[hidden]{display:none!important}
.bb-time-modes{display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;margin-top:16px;background:#f1f5f9;border:1px solid #e2e8f0;border-radius:14px}
.bb-time-modes button{min-height:40px;border:0;background:transparent;color:#64748b;border-radius:10px;font-family:inherit;font-size:12px;font-weight:750;cursor:pointer}.bb-time-modes button[aria-pressed=true]{color:#0f172a;background:white;box-shadow:0 1px 5px #0f172a13}
.bb-time-date{display:flex;align-items:center;gap:10px;width:100%;min-height:48px;margin-top:14px;padding:11px 12px;border:1px solid #e2e8f0;border-radius:14px;background:#f8fafc;color:#334155;font-family:inherit;font-size:13px;font-weight:750;text-align:left;cursor:pointer}.bb-time-date>span{flex:1}.bb-time-date svg{width:19px;height:19px;stroke-width:1.9;flex:none}.bb-time-date .bb-time-chevron{width:16px;height:16px;color:#64748b;transition:transform .14s}.bb-time-date[aria-expanded=true] .bb-time-chevron{transform:rotate(180deg)}
html[data-bb-theme=dark] .bb-time-modes{background:#202b38;border-color:#3d4d60}html[data-bb-theme=dark] .bb-time-modes button{color:#b4bfcc}html[data-bb-theme=dark] .bb-time-modes button[aria-pressed=true]{background:#344256;color:#eef3f8}html[data-bb-theme=dark] .bb-time-date{background:#202b38;color:#eef3f8;border-color:#3d4d60}
.bb-time-date:focus-visible,.bb-time-modes button:focus-visible{outline:3px solid #3b82f6;outline-offset:2px}
.bb-journey-empty{min-height:205px;display:flex;flex-direction:column;justify-content:center;padding:0 0 4px}.bb-journey-empty-copy{font-size:13px;line-height:1.65;color:var(--j-muted);margin:0 0 12px}.bb-journey-empty-actions{display:grid;gap:9px;margin-top:14px}.bb-journey-empty-actions button{width:100%}.bb-journey-empty-actions .bb-journey-primary{background:#CB0304;color:#fff;border-color:#CB0304}
@media(prefers-reduced-motion:reduce){.bb-time-chevron{transition:none}}

html[data-bb-journey-time-open=true] #map-toolbar{visibility:visible!important;z-index:1450}
/* V44 route-specific stops never enter the map decluttering algorithm. */
html[data-bb-journey-route=true] .leaflet-fermate-pane,html[data-bb-journey-route=true] .leaflet-fermateFocus-pane,html[data-bb-journey-route=true] .leaflet-fermateHit-pane{display:none!important}
html[data-bb-journey-route=true] .search-place-marker{visibility:hidden!important;pointer-events:none!important}
.bb-journey-points{display:grid;grid-template-columns:minmax(0,1fr) 44px;align-items:center;gap:8px}
.bb-journey-field-head{display:flex;align-items:center;justify-content:space-between;gap:5px;flex-wrap:wrap}.bb-journey-field-head label{margin:0}.bb-journey-location{display:flex;align-items:center;gap:5px;min-height:44px;padding:4px 0;border:0;background:none;color:var(--j-muted);font-family:inherit;font-size:10.5px;font-weight:700;cursor:pointer}.bb-journey-location svg{width:17px!important;height:17px!important}.bb-journey-location:disabled{opacity:.5;cursor:wait}
.bb-journey-swap{display:grid;place-items:center;width:44px;height:44px;border:1px solid var(--j-border);border-radius:13px;color:var(--j-muted);background:var(--j-card);cursor:pointer}
.bb-journey-route-context{display:flex;align-items:center;justify-content:space-between;gap:8px;margin:0 0 8px}.bb-journey-route-context .bb-journey-context{margin:0}.bb-journey-recalculate{display:flex;align-items:center;gap:5px;flex:none;min-height:44px;padding:5px 0 5px 8px;border:0;background:none;color:var(--j-muted);font-family:inherit;font-size:11px;font-weight:700;cursor:pointer}.bb-journey-recalculate svg{width:16px!important;height:16px!important}
.bb-journey-stop{display:grid!important;place-items:center;background:none!important;border:0!important}.bb-journey-stop-dot{display:block;width:13px;height:13px;box-sizing:border-box;background:#fff!important;border:3px solid var(--line-color,#64748b);border-radius:50%;box-shadow:0 0 0 2px #ffffffd9,0 2px 5px #0f172a26}
html[data-bb-theme=dark] .bb-journey-stop-dot{box-shadow:0 0 0 2px #10161fe6,0 2px 5px #0004}
.bb-journey-endpoint{background:transparent!important;border:0!important}.bb-journey-endpoint-pill{position:relative;display:block;box-sizing:border-box;min-height:28px;padding:5px 9px;background:#fff;color:#0f172a;border:1px solid #64748b;border-radius:9px;box-shadow:0 2px 7px #0f172a29;font-size:11px;line-height:16px;font-weight:750;text-align:center;white-space:nowrap}.bb-journey-endpoint-destination .bb-journey-endpoint-pill{border-color:#CB0304}.bb-journey-endpoint-pill::after{content:'';position:absolute;width:5px;height:5px;bottom:-4px;left:calc(50% - 3px);border-right:1px solid #64748b;border-bottom:1px solid #64748b;transform:rotate(45deg);background:#fff}.bb-journey-endpoint-destination .bb-journey-endpoint-pill::after{border-color:#CB0304}
html[data-bb-theme=dark] .bb-journey-endpoint-pill{background:#18212d;color:#eef3f8;border-color:#91a6bf}html[data-bb-theme=dark] .bb-journey-endpoint-pill::after{background:#18212d;border-color:#91a6bf}html[data-bb-theme=dark] .bb-journey-endpoint-destination .bb-journey-endpoint-pill,html[data-bb-theme=dark] .bb-journey-endpoint-destination .bb-journey-endpoint-pill::after{border-color:#ff9ba7}
html .bb-journey-stop-popup .leaflet-popup-content-wrapper{padding:0!important;background:#fff!important;color:#0f172a!important;border:1px solid #dce1e6;border-radius:15px!important;box-shadow:0 7px 24px #0f172a2b!important}.bb-journey-stop-popup .leaflet-popup-content{margin:0!important}.bb-journey-stop-content{padding:13px 15px}.bb-journey-stop-content strong{display:block;font-size:13px;font-weight:750;line-height:1.45}.bb-journey-stop-content p{display:flex;align-items:center;gap:8px;font-size:11px;margin:9px 0 0}.bb-journey-stop-content .bb-journey-line{color:#0f172a;background:#f1f5f9;border-color:#dce1e6;border-left-color:var(--line-color)}
html[data-bb-theme=dark] .bb-journey-stop-popup .leaflet-popup-content-wrapper{background:#18212d!important;color:#eef3f8!important;border-color:#3d4d60}html[data-bb-theme=dark] .bb-journey-stop-content .bb-journey-line{color:#eef3f8;background:#202b38;border-color:#3d4d60;border-left-color:var(--line-color)}
/* Search destination remains legible on the dark basemap. */
html[data-bb-theme=dark] .search-place-core{background:#fff}
