/* Coach Station POC screens: the shell with its floating switcher, and the database view.
 * Same palette as the boards (packages/display/src/client/display.css). No web fonts. */

html,
body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: #161826;
  color: #e9e9ed;
  font-family: "Inter", "Helvetica Neue", Helvetica, Arial, Roboto, "Liberation Sans", "DejaVu Sans", sans-serif;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

button,
select {
  font: inherit;
  color: #e9e9ed;
  background: #262936;
  border: 1px solid #3a3e52;
  border-radius: 8px;
  min-height: 44px;
  padding: 0 14px;
  cursor: pointer;
}
button:hover,
select:hover {
  background: #31354a;
}
button:focus-visible,
select:focus-visible {
  outline: 3px solid #d2cefd;
  outline-offset: 2px;
}

/* ---------- shell ---------- */

.poc-shell {
  overflow: hidden;
  background: #0b0c12;
}
#frame {
  position: absolute;
  border: 0;
  transform-origin: 0 0;
  background: #161826;
}
/* Boards hide the pointer and need no clicks; the database view scrolls. */
#frame.board {
  pointer-events: none;
}

.switcher {
  position: fixed;
  left: 50%;
  bottom: 16px;
  -webkit-transform: translateX(-50%);
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  align-items: center;
  padding: 8px;
  background: #0b0c12;
  border: 1px solid #3a3e52;
  border-radius: 12px;
  opacity: 0.5;
  font-size: 18px;
  transition: opacity 0.15s;
}
.switcher:hover,
.switcher:focus-within {
  opacity: 1;
}
.switcher button {
  width: 48px;
  padding: 0;
}
.switcher select {
  margin: 0 8px;
  min-width: 190px;
}
.switcher #full,
.switcher #desk {
  margin-left: 8px;
}

/* ---------- database view (light, after the station information palette) ----------
 * paper #F3F5FE, card #FFFFFF, ink #292B31, soft #5B5F70, faint #8A8EA0,
 * rule #DCDFEC, head #E7EAF6, maroon #6D1531. */

.poc-db {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-size: 17px;
  background: #f3f5fe;
  color: #292b31;
}
.poc-db button {
  color: #292b31;
  background: #ffffff;
  border-color: #c9cddd;
}
.poc-db button:hover {
  background: #e7eaf6;
}
.poc-db button:focus-visible {
  outline-color: #6d1531;
}
.db-head {
  display: flex;
  align-items: center;
  padding: 14px 20px;
  background: #ffffff;
  border-bottom: 1px solid #dcdfec;
  flex: 0 0 auto;
}
.db-title {
  flex: 1;
  text-align: center;
}
.db-title h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
}
.db-title p {
  margin: 4px 0 0;
  color: #5b5f70;
  font-size: 15px;
  min-height: 1.2em;
}
.db-head #today {
  margin-right: 10px;
}
.rel {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 10px;
  border-radius: 999px;
  background: #6d1531;
  color: #ffffff;
  font-size: 16px;
  vertical-align: middle;
}

.db-main {
  flex: 1;
  overflow: auto;
  /* Room for the switcher, bottom centre, over the last rows. */
  padding-bottom: 90px;
}
table {
  width: 100%;
  border-collapse: collapse;
  background: #ffffff;
}
th,
td {
  padding: 9px 12px;
  text-align: left;
  border-bottom: 1px solid #dcdfec;
  vertical-align: top;
}
th {
  position: sticky;
  top: 0;
  background: #e7eaf6;
  color: #5b5f70;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}
td.t,
th.t {
  text-align: right;
  white-space: nowrap;
}
td.route {
  font-weight: 700;
}
td.dir,
td.stops {
  color: #5b5f70;
}
td.stops {
  max-width: 340px;
}
tr.done td {
  color: #5b5f70;
}
tr.on-road td {
  background: #e6f6ec;
}
.none,
.exp {
  color: #8a8ea0;
}
.exp {
  font-style: italic;
}

/* Status colours chosen for contrast on white (4.5:1 or better). */
td.st {
  white-space: nowrap;
  font-weight: 600;
}
td.st.on-time {
  color: #17703f;
}
td.st.late {
  color: #9a5a00;
}
td.st.early {
  color: #1f5fae;
}
td.st.cancelled {
  color: #b3262e;
}
td.st.pending,
td.st.unknown {
  color: #5b5f70;
  font-weight: 500;
}

td.dot,
th.dot {
  width: 18px;
  padding-right: 0;
}
.live {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin-top: 5px;
  border-radius: 50%;
  background: #1fae5b;
  box-shadow: 0 0 0 3px rgba(31, 174, 91, 0.25);
}
.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.empty {
  padding: 60px 20px;
  text-align: center;
  color: #5b5f70;
  font-size: 20px;
}
