/* Full-screen departure board. Navy and green match the site header (--primary-color) and the #0ac700 banner green in app.css. */
:root {
  --primary-color: #07093e;
  --rr-green: #0ac700;
  /* A consistent text scale multiplier; the existing clamp() sizes remain responsive to screen dimensions. */
  --rr-board-type-scale: 1.05;
}
html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  background: var(--primary-color);
  color: #fff;
  font-family: "Segoe UI", system-ui, sans-serif;
}
body { height: 100dvh; }
button, input { font: inherit; color: inherit; }
.pick, .board { min-height: 100%; box-sizing: border-box; }
.pick { display: flex; flex-direction: column; padding: clamp(16px, 3vw, 40px); }
.pick[hidden], .board[hidden] { display: none; }
.pick-label {
  margin: 0 0 12px;
  font-size: calc(clamp(22px, 3vw, 40px) * var(--rr-board-type-scale));
  font-weight: 800;
}
.pick-input {
  width: 100%;
  box-sizing: border-box;
  border: 0;
  border-bottom: 3px solid #fff;
  background: transparent;
  padding: 10px 2px 12px;
  font-size: calc(clamp(20px, 2.6vw, 36px) * var(--rr-board-type-scale));
  font-weight: 700;
  border-radius: 0;
}
.pick-input:focus { outline: none; border-bottom-color: var(--rr-green); }
.pick-list { list-style: none; margin: 18px 0 0; padding: 0; overflow: auto; }
.pick-list button {
  display: flex;
  align-items: baseline;
  gap: 14px;
  width: 100%;
  text-align: left;
  border: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  border-left: 8px solid var(--rr-sp-line, #07093e);
  background: transparent;
  padding: 12px 12px 12px 14px;
  cursor: pointer;
  border-radius: 0;
}
.pick-list button:hover, .pick-list button[aria-selected="true"] { background: rgba(255, 255, 255, 0.1); }
.pick-name { font-size: calc(clamp(18px, 2.2vw, 28px) * var(--rr-board-type-scale)); font-weight: 800; }
.pick-agency { font-size: calc(clamp(13px, 1.4vw, 18px) * var(--rr-board-type-scale)); font-weight: 700; color: #d5d8ea; }
.board {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  overflow: hidden;
  background: var(--primary-color);
}
.stage {
  flex: 1;
  display: flex;
  flex-direction: row;
  min-height: 0;
  min-width: 0;
}
.map-pane {
  flex: 0 0 clamp(280px, 36vw, 560px);
  width: auto;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  position: relative;
  overflow: hidden;
  touch-action: none;
  background: var(--primary-color);
  border-right: 1px solid rgba(255, 255, 255, 0.22);
  border-bottom: 0;
}
.station-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: #e7e1d4;
}
.list-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
}
.change-station {
  position: fixed;
  z-index: 5;
  top: 0;
  left: 0;
  width: 44px;
  height: 44px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: transparent;
  cursor: pointer;
  border-radius: 0;
}
.change-station:hover {
  width: auto;
  height: auto;
  padding: 6px 10px;
  background: var(--rr-green);
  color: var(--primary-color);
  font-size: calc(13px * var(--rr-board-type-scale));
  font-weight: 700;
}
.change-station:hover::after { content: "Change station"; }
.line { display: contents; }
.rows {
  flex: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  min-height: 0;
  opacity: 1;
  transition: opacity 0.4s ease;
}
.rows.is-fading { opacity: 0; }
.cols.row {
  flex: 1 1 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  gap: clamp(12px, 1.6vw, 40px);
  padding: 0 clamp(16px, 2vw, 48px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  overflow: hidden;
}
.time, .mins, .train, .dest, .col-track, .col-equip { font-weight: 800; }
.time, .mins, .col-track, .status { flex: none; }
.train, .dest, .col-equip {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
  white-space: normal;
}
.dest:empty, .col-track:empty, .col-equip:empty { display: none; }
.time, .mins { font-variant-numeric: tabular-nums; }
.line-when {
  display: flex;
  flex: none;
  align-items: baseline;
  gap: clamp(8px, 0.8vw, 18px);
  min-width: 0;
}
.mins:empty { display: none; }
.time {
  font-size: calc(clamp(18px, min(1.7vw, 3.2vh), 48px) * var(--rr-board-type-scale));
  line-height: 0.95;
  white-space: normal;
}
.time-exp, .time-sch { display: block; white-space: nowrap; }
.time-sch {
  margin-top: 0.12em;
  font-size: 0.42em;
  font-weight: 700;
  line-height: 1;
  text-decoration: line-through;
  color: rgba(255, 255, 255, 0.62);
}
.mins { font-size: calc(clamp(16px, min(1.4vw, 2.6vh), 40px) * var(--rr-board-type-scale)); }
.train {
  flex: 1.5 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
  border-left: clamp(6px, 0.55vh, 14px) solid var(--rr-sp-line, #07093e);
  padding: 0 0 0 0.4em;
  line-height: 1.1;
  white-space: normal;
}
.train-name {
  max-width: 100%;
  font-size: calc(clamp(18px, min(1.7vw, 3.2vh), 48px) * var(--rr-board-type-scale));
  line-height: 1.1;
  white-space: normal;
}
.train-sub {
  max-width: 100%;
  margin-top: 0.28em;
  font-size: calc(clamp(13px, min(1.15vw, 1.9vh), 24px) * var(--rr-board-type-scale));
  font-weight: 700;
  line-height: 1.25;
  color: #d7dbeb;
  white-space: normal;
}
.dest { flex: 1 1 0; font-size: calc(clamp(16px, min(1.35vw, 2.4vh), 36px) * var(--rr-board-type-scale)); white-space: normal; }
.col-track, .col-equip { font-size: calc(clamp(20px, min(1.8vw, 3.2vh), 68px) * var(--rr-board-type-scale)); font-weight: 700; }
.col-equip { white-space: nowrap; text-overflow: ellipsis; }
.col-track { flex: none; }
.status {
  flex: none;
  max-width: 100%;
  font-size: calc(clamp(16px, min(1.6vw, 3vh), 60px) * var(--rr-board-type-scale));
  font-weight: 800;
  color: #fff;
  padding: 0.28em 0.5em;
  border-radius: 0;
  white-space: nowrap;
  line-height: 1.1;
}
.st-ok { background: #1e7e34; color: #fff; }
.st-sched { background: #f1f2f2; color: var(--primary-color); }
.st-warn { background: #c25e00; color: #fff; }
.st-late { background: #c0392b; color: #fff; }
.st-gone { background: #3d4454; color: #fff; }
.banner {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 0;
  padding: clamp(4px, 0.6vmin, 8px) clamp(8px, 1.2vw, 14px);
  background: var(--rr-green);
  color: var(--primary-color);
  font-size: calc(clamp(11px, 1.6vmin, 16px) * var(--rr-board-type-scale));
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
}
.banner-text { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
#page-ind[hidden] { display: none; }
@media (max-width: 900px), (orientation: portrait) {
  .line {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    column-gap: 0.55em;
    row-gap: 0.2em;
    width: 100%;
    min-width: 0;
  }
  .cols.row {
    flex-direction: column;
    align-items: stretch;
    justify-content: space-evenly;
    gap: 0;
    padding: 2vh 4.5vw;
  }
  .time, .mins, .train, .dest, .col-track, .col-equip, .status {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
  }
  .train, .dest, .col-track, .col-equip {
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
  }
  .stage { flex-direction: column; }
  .map-pane { flex: 0 0 clamp(90px, 18vh, 160px); width: 100%; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.22); }
  .time, .train-name { font-size: calc(clamp(20px, min(6.4vw, 3.4vh), 40px) * var(--rr-board-type-scale)); }
  .mins { font-size: calc(clamp(16px, min(4.6vw, 2.6vh), 28px) * var(--rr-board-type-scale)); }
  .train-sub { font-size: calc(clamp(13px, min(3.6vw, 1.8vh), 20px) * var(--rr-board-type-scale)); }
  .dest { font-size: calc(clamp(20px, min(6vw, 4vh), 52px) * var(--rr-board-type-scale)); }
  .col-track, .col-equip { font-size: calc(clamp(18px, min(5vw, 3.4vh), 44px) * var(--rr-board-type-scale)); }
  .status { font-size: calc(clamp(16px, min(4.6vw, 3.2vh), 42px) * var(--rr-board-type-scale)); }
  .line-extra { align-items: center; }
  .banner { gap: 6px; padding-left: 6px; padding-right: 6px; font-size: calc(11px * var(--rr-board-type-scale)); }
}
@media (prefers-reduced-motion: reduce) {
  .rows { transition: none; }
}
.empty { padding: 4vh 18px; font-size: calc(clamp(16px, 3vmin, 32px) * var(--rr-board-type-scale)); font-weight: 800; }
@media (prefers-color-scheme: dark) {
  html, body, .board { background: var(--primary-color); color: #fff; }
  .banner { background: var(--rr-green); color: var(--primary-color); }
}
