/* "Where to?" panel (see bus-connect.js). It is a .bus-sheet, so position and size come from bus-arrivals.css. */
.bus-connect[hidden] { display: none; }
.bus-connect-field { display: flex; align-items: center; gap: 8px; margin: 4px 0 8px; padding: 0 12px; min-height: 44px; border: 1px solid var(--nv-line); border-radius: var(--nv-r); background: var(--nv-raised); color: var(--nv-muted); }
.bus-connect-field:focus-within { border-color: var(--nv-accent); outline: 2px solid var(--nv-accent); }
.bus-connect-field input { flex: 1; min-width: 0; min-height: 42px; padding: 0; border: 0; outline: 0; background: transparent; color: var(--nv-ink); font: inherit; font-size: 16px; }
.bus-connect-field input:focus, .bus-connect-field input:focus-visible { outline: 0; box-shadow: none; } /* the field draws the focus ring, not the input inside it */
.bus-connect-note { margin: 8px 0; color: var(--nv-muted); font-size: .8125rem; line-height: 1.45; }
.bus-connect-to { margin: 8px 0 4px; font-size: .875rem; font-weight: 600; line-height: 1.4; }
.bus-connect-body h3 { margin: 12px 0 6px; color: var(--nv-muted); font-size: .75rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; }
.bus-connect-foot { margin: 12px 0 0; color: var(--nv-muted); font-size: .75rem; }

.bus-conn-row { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 6px 0; border: 0; border-bottom: 1px solid var(--nv-line); background: none; color: var(--nv-ink); font: inherit; text-align: left; cursor: pointer; }
.bus-conn-row > span { display: flex; flex-direction: column; min-width: 0; }
.bus-conn-row strong { font-size: .9375rem; line-height: 1.3; overflow-wrap: anywhere; }
.bus-conn-row small { color: var(--nv-muted); font-size: .75rem; }
.bus-conn-chip { flex: none; min-width: 52px; min-height: 30px; display: grid; place-items: center; box-sizing: border-box; padding: 0 8px; border: 2px solid var(--nv-ink); border-radius: var(--nv-r); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.bus-conn-chip.bus-conn-place { min-width: 30px; width: 30px; padding: 0; border: 1px solid var(--nv-line); border-radius: 50%; background: var(--nv-surface); }

.bus-conn-badge { flex: none; min-width: 48px; min-height: 32px; display: grid; place-items: center; box-sizing: border-box; padding: 0 8px; border-radius: var(--nv-r); background: var(--nv-accent); font-size: 1rem; }
.bus-conn-text { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.bus-conn-text strong { font-size: .9375rem; line-height: 1.3; overflow-wrap: anywhere; }
.bus-conn-text small { color: var(--nv-muted); font-size: .75rem; }
.bus-conn-wait { flex: none; max-width: 38%; font-size: .8125rem; font-weight: 700; text-align: right; }
.bus-conn-retry { min-height: 44px; padding: 0 16px; border: 1px solid var(--nv-line); border-radius: var(--nv-r); background: var(--nv-raised); color: var(--nv-ink); font: inherit; font-weight: 600; cursor: pointer; }

/* Back and share sit together at the top right of the card. */
.bus-connect .bus-sheet-head { grid-template-columns: minmax(0, 1fr) 44px 44px; }
.bus-conn-badge-2 { background: var(--nv-ink); color: #fff; }
a.bus-conn-badge { color: var(--nv-ink); font-weight: 700; text-decoration: none; }
a.bus-conn-badge-2 { color: #fff; }
a.bus-conn-badge:hover { filter: brightness(1.08); }
/* "Change here" tag on the map where the first bus ends. */
.bus-change-icon span { position: absolute; left: 0; top: 0; transform: translate(-50%, calc(-100% - 34px)); padding: 2px 8px; border: 1px solid var(--nv-ink); border-radius: var(--nv-r); background: var(--nv-ink); color: #fff; font: 700 11px/1.3 var(--nv-font); white-space: nowrap; }

/* A trip as a timeline: rail on the left (yellow bus, dark bus, dashed walk), stops are tappable rows. */
.bus-trip { margin: 0 0 14px; padding: 10px 12px 6px; border: 1px solid var(--nv-line); border-radius: var(--nv-r); background: var(--nv-raised); }
.bus-trip[aria-current] { border-color: var(--nv-ink); box-shadow: inset 0 0 0 1px var(--nv-ink); }
.bus-trip-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 6px; color: var(--nv-muted); font-size: .8125rem; font-weight: 600; }
.bus-trip-actions { display: flex; gap: 6px; }
.bus-trip .bus-conn-both, .bus-trip .bus-conn-share { width: 36px; height: 36px; display: grid; place-items: center; padding: 0; border: 1px solid var(--nv-ink); border-radius: var(--nv-r); background: var(--nv-ink); color: #fff; cursor: pointer; }
.bus-trip .bus-conn-share { background: #fff; color: var(--nv-ink); }
.bus-trip .bus-conn-both svg, .bus-trip .bus-conn-share svg { width: 18px; height: 18px; }
.bus-trip .bus-conn-both:hover, .bus-trip .bus-conn-both:focus-visible { background: #2a3350; color: #fff; }
.bus-trip .bus-conn-share:hover, .bus-trip .bus-conn-share:focus-visible { background: var(--nv-raised); }
.bus-trip-line { margin: 0; padding: 0; list-style: none; }
.bus-trip-line > li { position: relative; padding-left: 30px; }
.bus-trip-stop::before { content: ""; position: absolute; left: 3px; top: 50%; width: 12px; height: 12px; box-sizing: border-box; margin-top: -6px; border: 3px solid var(--nv-ink); border-radius: 50%; background: #fff; }
.bus-trip-stop button { display: flex; flex-direction: column; align-items: flex-start; width: 100%; min-height: 44px; padding: 4px 8px; border: 0; border-radius: var(--nv-r); background: none; color: var(--nv-ink); font: inherit; text-align: left; cursor: pointer; }
.bus-trip-stop button:hover { background: var(--nv-surface); }
.bus-trip-stop strong { font-size: .9375rem; line-height: 1.3; overflow-wrap: anywhere; }
.bus-trip-stop small { color: var(--nv-muted); font-size: .75rem; }
.bus-trip-ride, .bus-trip-walk { display: flex; align-items: center; gap: 12px; min-height: 52px; padding-top: 4px; padding-bottom: 4px; }
.bus-trip-ride::before, .bus-trip-walk::before { content: ""; position: absolute; left: 7px; top: 0; bottom: 0; width: 0; border-left: 4px solid var(--nv-accent); }
.bus-trip-ride.is-b::before { border-left-color: var(--nv-ink); }
.bus-trip-walk::before { border-left: 3px dotted var(--nv-muted); left: 8px; }
.bus-trip-walk { min-height: 40px; color: var(--nv-muted); font-size: .8125rem; font-weight: 600; }
.bus-trip-ride .bus-conn-badge { margin-left: 8px; }
/* Walk and stop tags on the map. */
.bus-change-icon.is-walk span { border-style: dashed; background: #fff; color: var(--nv-ink); transform: translate(-50%, 25%); }

/* The stop tapped in the trip timeline: a ring and its name on the map. */
.bus-focus-ring { background: none; border: 0; }
.bus-focus-ring span { position: absolute; inset: 0; border: 3px solid var(--nv-ink); border-radius: 50%; background: rgba(233,184,58,.35); box-shadow: 0 0 0 3px #fff; animation: bus-focus-pulse 1.4s var(--nv-ease) 2; }
.bus-focus-ring em { position: absolute; left: 50%; top: 100%; transform: translate(-50%, 6px); padding: 2px 8px; border: 1px solid var(--nv-ink); border-radius: var(--nv-r); background: #fff; color: var(--nv-ink); font: 700 12px/1.3 var(--nv-font); font-style: normal; white-space: nowrap; }
@keyframes bus-focus-pulse { 50% { transform: scale(1.35); } }
@media (prefers-reduced-motion: reduce) { .bus-focus-ring span { animation: none; } }

/* From and To as one pair of fields; the label sits inside each. */
.bus-connect-fields .bus-connect-field { margin: 4px 0; }
.bus-connect-fields { position: relative; margin-bottom: 4px; }
.bus-connect-fields .bus-connect-field { padding-right: 48px; }
.bus-connect-swap { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; display: grid; place-items: center; padding: 0; border: 1px solid var(--nv-line); border-radius: var(--nv-r); background: #fff; color: var(--nv-ink); cursor: pointer; }
.bus-connect-swap:hover { background: var(--nv-raised); }
.bus-connect-tag { flex: none; width: 36px; color: var(--nv-muted); font-size: .75rem; font-weight: 700; }
