/* Arrival displays (docs/next/CONTRACT.md §7). Tokens from ui.css only.
   The landing time is an estimate. Red is never "late"; amber stays selection and caution. */
.arv { padding: 8px 12px 10px; min-width: 0; }
.arv .k { font: 500 11px var(--sans); letter-spacing: .04em; color: var(--text-4); }
.arv-line { margin: 2px 0 0; font: 500 13px var(--sans); color: var(--text); }
.arv-z, .arv-note, .arv-cov, .arv-why, .arv-within, .arv-name { margin: 2px 0 0; font: 400 12px var(--sans); color: var(--text-3); }
.arv-z { font-family: var(--mono); }
.arv-name { color: var(--text-2); }
.arv-cov { color: var(--text-4); }
.arv-card { padding: 8px 0 2px; }
.arv-card .k { margin-bottom: 2px; }
/* under the route bar: one wrapped line, kicker first, the UTC time and the note after it */
.arv-top { padding: 6px 0 2px; }
.arv-top .arv-time { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 8px; row-gap: 0; min-width: 0; }
.arv-top .k { margin: 0; }
.arv-top .arv-line, .arv-top .arv-z, .arv-top .arv-note, .arv-top .arv-within, .arv-top .arv-why { margin: 0; }
.arv-top .arv-note { flex-basis: 100%; color: var(--text-4); font-size: 11px; }
.eta.arv .arv-line { font: 400 13px var(--sans); color: var(--text-2); }
.eta.arv .arv-within { font: 400 12px var(--sans); color: var(--text-3); margin: 4px 0 0; }

.arv-host, .arv, .arv-rows { max-width: 100%; min-width: 0; }
.arv-rows { display: flex; flex-direction: column; gap: 2px; margin-top: 6px; }
.arv-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: 10px; row-gap: 0; align-items: center;
  width: 100%; margin: 0; padding: 4px 2px;
  border: 0; border-radius: var(--r-ctl);
  background: transparent; color: var(--text);
  text-align: left; font: inherit; min-width: 0;
}
button.arv-row { cursor: pointer; }
button.arv-row:hover { background: var(--surface-hi); }
button.arv-row:focus-visible { outline: 2px solid var(--text); outline-offset: 0; }
.arv-row .id { grid-column: 1; grid-row: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arv-row .cs { font: 600 13px var(--mono); }
.arv-row .ty { font: 400 12px var(--mono); color: var(--text-2); margin-left: 6px; }
.arv-row .meta { grid-column: 1; grid-row: 2; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 12px var(--sans); color: var(--text-2); }
.arv-row .tm { grid-column: 2; grid-row: 1 / span 2; justify-self: end; text-align: right; font: 500 13px var(--mono); color: var(--text); }
.arv-row .tm small { display: block; font: 400 11px var(--mono); font-weight: 400; color: var(--text-4); }
.arv-row .why { grid-column: 1 / -1; grid-row: 3; text-align: left; font: 400 12px var(--sans); color: var(--text-3); overflow-wrap: anywhere; }

#t-arrivals { flex: none; max-height: 168px; overflow: auto; overscroll-behavior: contain; background: var(--panel); border-bottom: 1px solid var(--line); min-width: 0; }
#t-arrivals[hidden] { display: none; }
.tier-tablet #t-arrivals { margin: 0 12px 8px; max-height: 160px; border: 1px solid var(--line); border-radius: var(--r-card); }
@media (max-width: 699px) {
  #t-arrivals { order: 4; margin: 8px 12px 0; max-height: 148px; border: 1px solid var(--line); border-radius: var(--r-card); }
}
@media (pointer: coarse) {
  .arv-row { min-height: 44px; }
}
