/* Route planner */

.route { padding-block: 28px 64px; }
.route h1 { margin: 0; font-size: clamp(28px, 5vw, 38px); line-height: 1.1; font-weight: 700; letter-spacing: -.03em; }

.plan { margin-top: 20px; }
.plan-stops { position: relative; display: grid; gap: 8px; padding-right: 52px; }
.plan-field { margin-top: 0; }
.plan-field:focus-within { z-index: 6; }
.plan-tag { flex: none; width: 3em; color: var(--text-3); font-size: 13px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; }
.swap { position: absolute; top: 50%; right: 0; margin-top: -20px; }

.plan-when { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.plan-when select, .plan-when input {
  height: 40px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
}
.plan-go {
  height: 40px;
  margin-left: auto;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 14.5px;
  font-weight: 600;
}
.plan-go:hover { opacity: .88; }

.trips { margin-top: 24px; }
.t-head { margin: 0 0 12px; font-size: 17px; font-weight: 650; overflow-wrap: anywhere; }
.t-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.t-trip {
  position: relative;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 2px var(--shadow), 0 12px 32px -26px var(--shadow);
}
.t-trip.new { animation: rise .3s var(--ease) both; animation-delay: calc(min(var(--i, 0), 10) * 30ms); }
.t-trip:hover { border-color: var(--border-strong); }
.t-trip:has(.t-link:focus-visible) { outline: 2px solid var(--text); outline-offset: 2px; }
.t-trip.gone { opacity: .55; }
.t-link {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 16px;
  padding: 14px 18px;
  color: inherit;
  text-decoration: none;
}
.t-link:focus-visible { outline: none; }
/* The whole card opens the journey mode, but for its button. */
.t-link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.t-actions { display: flex; justify-content: flex-end; margin-top: -6px; padding: 0 18px 14px; }
.t-take {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--text);
  color: var(--bg);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.t-take:hover { opacity: .88; }
.t-take:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
.t-times { font-size: 20px; font-variant-numeric: tabular-nums; }
.t-times b { font-weight: 700; }
.t-times .delay { font-size: 13px; }
.t-arrow { margin: 0 8px; color: var(--text-3); }
.t-meta { align-self: center; color: var(--text-2); font-size: 14px; text-align: right; }
.t-when { grid-column: 2; grid-row: 2; align-self: center; color: var(--text-2); font-size: 13px; font-weight: 600; text-align: right; }
.t-legs { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; grid-row: 2; }
.t-legs .badge { min-width: 38px; height: 24px; padding: 0 7px; border-radius: 6px; font-size: 12.5px; }
.t-legs .badge.sbahn { border-radius: 999px; }
.t-walk { display: inline-grid; place-items: center; width: 24px; height: 24px; color: var(--text-2); }
.t-walk .icon { width: 16px; height: 16px; }
.t-sep { color: var(--text-3); font-size: 13px; }
.t-board { grid-column: 1 / -1; color: var(--text-2); font-size: 13px; }
.t-trip.cancelled .t-times { color: var(--text-2); text-decoration: line-through; }
.gone { color: var(--text-2); text-decoration: line-through; }

.t-more {
  display: block;
  width: 100%;
  margin: 10px 0;
  padding: 10px;
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  background: none;
  color: var(--text-2);
  font-size: 14px;
  font-weight: 560;
}
.t-more:hover:not(:disabled) { background: var(--surface); color: var(--text); }

.t-list.skeleton .t-trip { height: 92px; background: linear-gradient(90deg, var(--surface-2) 25%, var(--hover) 50%, var(--surface-2) 75%); background-size: 300% 100%; animation: shimmer 1.3s linear infinite; }
.t-list.skeleton span { display: none; }

@media (max-width: 520px) {
  .t-link { padding: 12px 14px; }
  .t-actions { padding: 0 14px 12px; }
  .t-times { font-size: 18px; }
  .plan-go { width: 100%; margin-left: 0; }
}
