/* The line pages, such as /septa/bus/57 (story #1528), over site.css and lateness.css. */

.line-hero { padding-top: 32px; }

/* Under the phone header (story #1807), so the line's name shows near the top. */
@media (max-width: 600px) {
  .line-hero { padding-top: 8px; }
}
.line-hero .lede { font-size: 19px; color: var(--ink); max-width: 46em; }
.line-hero .facts { margin-top: 16px; }

.line-page h3 { font-size: 17px; margin: 24px 0 8px; }

.block { display: block; }

/* Detours and alerts, their text exactly as the agency sends it */

.notice {
  background: var(--card);
  border-left: 4px solid var(--late);
  border-radius: 8px;
  padding: 10px 14px;
  margin-bottom: 10px;
}

.line-page .notice h3 { margin: 0 0 4px; }
.notice p { margin: 4px 0 0; }
.notice-text { white-space: pre-line; overflow-wrap: anywhere; margin: 6px 0 0; }

.vehicle .row-fig { line-height: 1.4; }

/* Departures by hour */

.hours { margin: 0; }

.hour {
  display: flex;
  gap: 12px;
  padding: 6px 4px;
  border-bottom: 1px solid var(--line);
}

.hour dt {
  flex: none;
  width: 4.5em;
  font-weight: 700;
}

.hour dd {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-variant-numeric: tabular-nums;
}

.cancelled { text-decoration: line-through; color: var(--muted); }

/* The timepoint table, scrolling sideways on a phone */

.timepoints { margin: 16px 0; }
.timepoints summary { cursor: pointer; font-weight: 600; color: var(--accent); }

.table-scroll {
  overflow-x: auto;
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.timepoints table {
  border-collapse: collapse;
  font-size: 14px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.timepoints th {
  position: sticky;
  top: 0;
  background: var(--card);
  text-align: left;
  font-weight: 600;
  white-space: normal;
  min-width: 7em;
  vertical-align: bottom;
}

.timepoints th, .timepoints td { padding: 6px 10px; border-bottom: 1px solid var(--line); }

.line-lateness .row { gap: 14px; }
.line-lateness .row-name b { display: block; margin-top: 2px; color: var(--accent); }

.line-page .beta-band { margin-top: 36px; }

/* The next departures, first on the page: what most searches for a line want */

.next-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
}

.next-group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.line-page .next-group h3 { margin: 0 0 2px; }
.next-group p { margin: 6px 0 0; }

.next-times { list-style: none; margin: 10px 0 0; padding: 0; }

.next-times li {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 4px 0;
  font-variant-numeric: tabular-nums;
}

.next-times b { font-size: 20px; min-width: 5.5em; }

/* The stop search: matches appear under the box as the rider types. */

.stop-search { display: grid; gap: 6px; margin: 0 0 8px; }
.stop-search label { font-weight: 600; }

.stop-search input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.stop-search input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 45%, transparent);
  border-color: var(--accent);
}

.stop-matches {
  list-style: none;
  margin: 0 0 14px;
  padding: 4px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.stop-matches a {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 10px;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--ink);
  text-decoration: none;
}

.stop-matches a:hover, .stop-matches a:focus-visible { background: color-mix(in srgb, var(--accent) 12%, transparent); }
.stop-matches .match-name { font-weight: 600; }
.stop-matches .small, .no-match, .stop-reset { margin: 0 0 14px; }
.stop-matches .small { margin: 0; }

.tabs.days { margin-top: 4px; }
/* lateness.css's .small sets a top margin for its paragraphs, not for these. */
.next-times .small { margin-top: 0; }

/* Two facts to a row on a phone, so the next buses start on the first screen. */
.line-hero .facts { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); margin-bottom: 0; }
.line-hero .fact { padding: 10px 14px; }
.line-hero .fact b { font-size: 21px; }

/* A rail or metro line's next trains at every station, each way (story #1529) */

.station-board table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  font-variant-numeric: tabular-nums;
}

.station-board th, .station-board td {
  padding: 8px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.station-board thead th { background: var(--card); font-weight: 600; }
.station-board tbody th { font-weight: 600; }
.station-board tbody th { width: 34%; }
.station-board td b { white-space: nowrap; }

/* Questions searches ask about a line */

.line-faq dl { margin: 0; }
.line-faq dt { font-weight: 700; margin-top: 14px; }
.line-faq dd { margin: 4px 0 0; max-width: 46em; }
