/* Use the same controls and theme tokens as the site's other search panels. */
.journey-planner { padding: 16px 24px; color: var(--text-main); font-family: 'DM Sans', sans-serif; font-size: 14px; }
[data-section="journey"] .accordion-close { border: 0; background: transparent; color: inherit; }
.jp-form { display: grid; gap: 12px; }
.jp-intro { margin: 0; font-size: 12px; font-weight: 500; }
.jp-intro span { display: block; color: var(--text-muted); font-size: 12px; font-weight: 400; margin-top: 4px; line-height: 1.5; }
.jp-endpoints { display: grid; grid-template-columns: minmax(0, 1fr) 34px; gap: 12px 8px; align-items: center; }
.jp-field { min-width: 0; display: grid; gap: 6px; grid-column: 1; }
.jp-field:first-child { grid-row: 1; }
.jp-field:last-child { grid-row: 2; }
.jp-swap { grid-column: 2; grid-row: 1 / 3; width: 34px; height: 34px; padding: 0; font-size: 18px; }
.journey-planner label { display: grid; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text-muted); min-width: 0; }
.journey-planner .search-input { box-sizing: border-box; min-width: 0; }
.journey-planner select option { background: var(--surface-solid); color: var(--text-main); }
.journey-planner button:focus-visible, .journey-planner summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.jp-when { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.jp-when > label:first-child { grid-column: 1; }
.jp-when > label:nth-child(2) { grid-row: 2; grid-column: 1; }
.jp-when > label:nth-child(3) { grid-row: 2; grid-column: 2; }
.jp-now { grid-column: 2; grid-row: 1; justify-self: end; min-height: 36px; }
.jp-options { border-top: 1px solid var(--border-glass); border-bottom: 1px solid var(--border-glass); }
.jp-options summary { cursor: pointer; padding: 12px 0; color: var(--text-main); font-size: 13px; font-weight: 500; }
.jp-options summary:hover { color: var(--accent); }
.jp-options-body { display: grid; gap: 12px; padding: 0 0 12px; }
.jp-submit { width: 100%; min-height: 44px; font-weight: 600; }
.jp-submit:disabled { opacity: .65; cursor: wait; }
.jp-status { line-height: 1.5; margin: 12px 0; font-size: 12px; color: var(--text-muted); }
.jp-status:empty { display: none; }
.jp-more { width: 100%; min-height: 42px; margin-top: 12px; font: inherit; font-size: 12px; font-weight: 600; }
.jp-more[hidden] { display: none; }
.jp-more:disabled { opacity: .65; cursor: wait; }
.jp-more-status { margin: 10px 0 0; color: var(--text-muted); font-size: 12px; line-height: 1.5; }
.jp-more-status:empty { display: none; }
.jp-suggestions { padding: 4px; max-height: 230px; overflow-y: auto; border: 1px solid var(--border-glass); border-radius: 8px; background: var(--surface-solid); font-size: 12px; }
.jp-suggestions[hidden] { display: none; }
.jp-suggestions button { display: grid; gap: 4px; width: 100%; border: 1px solid transparent; background: var(--card-bg-soft); color: var(--text-main); text-align: left; padding: 10px; border-radius: 6px; font: inherit; cursor: pointer; }
.jp-suggestions button + button { margin-top: 4px; }
.jp-suggestions button:hover, .jp-suggestions button[aria-selected="true"] { background: var(--hover-bg-strong); border-color: var(--accent); }
.jp-suggestions small, .jp-legs small { color: var(--text-muted); }
.jp-results { display: grid; gap: 10px; container-type: inline-size; }
.jp-journey { border: 1px solid var(--border-glass); background: var(--card-bg-soft); border-radius: var(--radius-md); overflow: hidden; transition: border-color .2s, background .2s; }
.jp-journey:hover, .jp-journey[open] { border-color: var(--accent); }
.jp-journey > summary { display: grid; gap: 12px; padding: 16px; cursor: pointer; list-style: none; }
.jp-journey > summary::-webkit-details-marker { display: none; }
.jp-journey summary:hover { background: var(--hover-bg-strong); }
.jp-times { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: 8px; }
.jp-endpoint { display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; gap: 6px; min-width: 0; }
.jp-endpoint--arrival { align-items: flex-end; text-align: right; }
.jp-time-label { color: var(--text-muted); font-size: 10px; font-weight: 500; }
.jp-times .time-stack { font-family: 'Space Mono', monospace; font-weight: 700; font-variant-numeric: tabular-nums; }
.jp-times .time-actual-item { font-size: 18px; line-height: 1.4; white-space: nowrap; }
.jp-times .time-sched-muted { font-size: 11px; }
.jp-times .delay-small-badge { font-size: 10px; padding: 2px 4px; }
.jp-times .jp-endpoint--arrival .time-stack { align-items: flex-end; }
.jp-time-arrow { display: block; width: 100%; font-size: 14px; line-height: 1; text-align: center; }
.journey-planner .delay-small-badge { margin-left: 2px; }
.journey-planner .time-actual-item { flex-direction: row; align-items: center; gap: 4px; white-space: nowrap; }
.journey-planner .time-stack { flex-direction: column; align-items: flex-start; gap: 2px; font-size: 13px; }
.journey-planner .time-sched-muted { margin-bottom: 0; }
.jp-stops { width: 100%; table-layout: fixed; border-collapse: collapse; border: 0; margin: 4px 0; text-align: left; }
.jp-stop-platform-column { width: 44px; }
.jp-stop-time-column { width: 100px; }
.jp-stops th, .jp-stops td { border: 0; padding: 4px 8px 4px 0; text-align: left; vertical-align: middle; }
.jp-stops td:last-child { padding-right: 0; }
.jp-stop-name { font-weight: 400; overflow-wrap: anywhere; }
.jp-stops .platform-badge { text-align: left; }
.jp-stop-time .time-stack { align-items: flex-start; text-align: left; }
.jp-duration { display: grid; gap: 8px; align-self: end; padding-bottom: 4px; min-width: 56px; color: var(--text-muted); font-size: 11px; text-align: center; white-space: nowrap; }
.jp-meta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; font-size: 11px; }
.jp-transfers { padding: 4px 8px; border-radius: 6px; background: var(--hover-bg-strong); color: var(--text-main); font-weight: 500; }
.jp-transfers--direct { color: var(--success-text, var(--text-main)); }
.jp-day, .jp-route-label { overflow-wrap: anywhere; }
.jp-day { color: var(--text-muted); }
.jp-route-label { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 10px; border-top: 1px solid var(--border-glass); color: var(--text-main); font-size: 11px; font-weight: 500; }
.jp-route-icons { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 7px; min-height: 24px; }
.jp-route-icon { display: inline-flex; align-items: center; justify-content: center; }
.jp-route-icon-arrow { color: var(--text-muted); font-size: 13px; }
.jp-expand-label { display: inline-flex; flex: 0 0 auto; align-items: center; gap: 7px; color: var(--text-muted); }
.jp-route-caret { display: block; flex: 0 0 14px; width: 14px; height: 14px; fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transform-origin: center; transition: transform .2s; }
.jp-journey[open] > summary .jp-route-caret { transform: rotate(180deg); }
.jp-train-title { display: inline-flex; align-items: center; gap: 6px; color: var(--jp-train-color, var(--text-main)); font-weight: 600; vertical-align: middle; }
.jp-train-type-icon { width: 20px; height: 20px; object-fit: contain; flex: 0 0 auto; }
.jp-open-train { flex: 0 0 auto; margin-left: 4px; padding: 3px 6px; border: 1px solid var(--border-glass); border-radius: 6px; background: transparent; color: var(--text-main); font: inherit; font-size: 12px; line-height: 1; cursor: pointer; }
.jp-open-train:hover { border-color: var(--accent); color: var(--accent); background: var(--hover-bg-strong); }
.jp-legs { margin: 0; padding: 0 14px 4px 25px; list-style: none; border-top: 1px solid var(--border-glass); }
.jp-legs li { position: relative; border-left: 1px solid var(--border-glass); padding: 12px 0 14px 12px; line-height: 1.8; font-size: 12px; }
.jp-legs li::before { content: ''; position: absolute; top: 19px; left: -4px; width: 7px; height: 7px; background: var(--accent); border-radius: 50%; }
.jp-leg-heading { display: flex; align-items: baseline; justify-content: space-between; flex-wrap: wrap; gap: 2px 8px; font-weight: 600; margin-bottom: 6px; }
.jp-train-title { max-width: 100%; }
.jp-leg-duration { flex: 0 0 auto; font-size: 11px; color: var(--text-muted); font-weight: 400; white-space: nowrap; }
.jp-legs > .jp-transfer-time { border: 0; padding: 2px 0 8px 12px; color: var(--text-muted); font-size: 11px; line-height: 1.4; }
.jp-legs > .jp-transfer-time::before { display: none; }
.jp-legs b { margin-right: 6px; font-family: 'Space Mono', monospace; }
.jp-legs .jp-live { color: var(--success-text); }
.jp-actions { display: flex; justify-content: center; padding: 10px 14px 14px; border-top: 1px solid var(--border-glass); }
.jp-ticket { display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 13px; border: 1px solid var(--accent); border-radius: 8px; background: var(--accent); color: var(--surface-solid); font-family: inherit; font-size: 12px; font-weight: 700; text-decoration: none; cursor: pointer; }
.jp-ticket:hover { filter: brightness(1.08); }
.jp-ticket--disabled, .jp-ticket--disabled:hover { border-color: #68717d; background: #68717d; color: #e2e8f0; cursor: not-allowed; filter: none; opacity: .7; }
.jp-ticket:focus-visible { outline: 2px solid var(--text-main); outline-offset: 2px; }
html:not([data-theme="light"]) .jp-when input { color-scheme: dark; }
@container (max-width: 290px) {
  .jp-journey > summary { padding: 12px; }
  .jp-times { gap: 6px; }
  .jp-times .time-actual-item { font-size: 15px; gap: 2px; }
  .jp-times .delay-small-badge { font-size: 9px; padding: 2px 3px; margin-left: 0; }
  .jp-duration { min-width: 44px; font-size: 10px; }
}
@media (max-width: 768px) { .journey-planner { padding: 12px 20px; } }
@media (prefers-reduced-motion: reduce) { .journey-planner * { transition: none !important; } }
