/* Bus occupancy. The frame, tiles, tables and controls come from
 * punctuality.css and live_map.css; this is the three colours, the legend
 * swatches and the hour-of-day bars.
 *
 * Teal / amber / dark red are the connectivity page's ramp, for the same
 * reason: it has to read for colour-blind viewers, and lightness falls from
 * "room to sit" to "full" as well. They are repeated as literals in
 * occupancy.js because a MapLibre paint expression cannot read a custom
 * property, so the two lists agree by hand.
 */
.viz-root {
  --occ-seats: #2a9d8f;
  --occ-standing: #e9a23b;
  --occ-full: #9b2226;
}

.map-legend .k i { border-radius: 50%; width: 12px; height: 12px; }
.map-legend .seats i { background: var(--occ-seats); }
.map-legend .standing i { background: var(--occ-standing); }
.map-legend .full i { background: var(--occ-full); }

.occ-h { margin: 32px 0 8px; font-size: 20px; }
.occ-h3 { margin: 24px 0 8px; font-size: 15px; font-weight: 600; }
.occ-scroll { overflow-x: auto; }
table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
.occ-sub { color: var(--ink-soft); font-size: 12px; }

.occ-card { font-size: 12.5px; line-height: 1.45; color: #1f1f1d; }
.occ-card strong { font-size: 13.5px; }
.occ-card .muted { color: #6b6a65; }
.maplibregl-popup-content { padding: 9px 11px; }

/* Hour-of-day bars: 24 columns, height is the share full, a thin stub where
 * there were no reports so an empty hour is not drawn as a zero. */
.occ-hours {
  display: grid;
  grid-template-columns: repeat(24, minmax(0, 1fr));
  gap: 3px;
  align-items: end;
  height: 140px;
  padding-bottom: 18px;
  position: relative;
}
.occ-hours .bar { position: relative; height: 100%; display: flex; align-items: flex-end; }
.occ-hours .bar i { display: block; width: 100%; background: var(--occ-full); border-radius: 2px 2px 0 0; min-height: 2px; }
.occ-hours .bar.none i { background: var(--grid); }
.occ-hours .bar span {
  position: absolute; bottom: -16px; left: 0; right: 0; text-align: center;
  font-size: 10px; color: var(--text-muted);
}

@media (max-width: 640px) {
  .occ-hours .bar:nth-child(even) span { display: none; }
}

.ctl[hidden], .map-toggle-label[hidden] { display: none; }
