/* shell/public/pages/online-history.css
 * Day-card visual scaffold for /online-history.
 *
 * NOT a v1 code copy — uses our own .oh-* class names (similar concept,
 * different selectors so Online History is module-isolated from Online Today).
 *
 * Mechanics still come from the shared tracker pieces:
 *   - .ot-bar-wrap        (flex sizing tied to --ot-bar-fill-width × --ot-zoom)
 *   - .ot-bar-scaler      (vertical hour ticks via ::before)
 *   - .ot-seg             (per-status segments, including hover tooltips)
 *   - .ot-drag-pan card   (horizontal scroll + click-drag pan + shared scrollbars)
 *   - .ot-hour-markers    (top hour labels)
 *
 * Counters in the header (right-aligned) replace the v2 right-side .ot-nums
 * column. First / Last seen sit alongside the counters and only render when
 * the day has timeline activity.
 */

/* ─── Day card ─────────────────────────────────────────────────────────── */
.oh-day-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--bg1);
  overflow: hidden;
}

/* Transparent variant used ONLY to wrap the top hour-markers row so it
   inherits the same border-width + body padding offsets as a real day
   card. Without this, the labels float ~15px to the left of the bars
   (the offset = 1px border + 14px .oh-day-body padding-left). */
.oh-day-card-markers {
  border-color: transparent !important;
  background: transparent !important;
  margin-bottom: 4px !important;
}
.oh-day-card-markers .oh-day-body {
  padding-top: 0;
  padding-bottom: 0;
  cursor: default;
}

/* Header strip: date + schedule stub on the left, counters on the right. */
.oh-day-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  font-size: 12px;
  font-family: 'DM Mono', monospace;
  flex-wrap: wrap;
}
.oh-day-date {
  font-weight: 700;
  font-size: 13px;
  min-width: 110px;
}
.oh-sched-badge {
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  background: rgba(255,255,255,0.04);
  color: var(--text3);
  border: 1px solid var(--border);
}
.oh-stat-spacer { flex: 1 1 auto; }
.oh-stat {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: var(--text2);
}
.oh-stat b { color: var(--text); font-weight: 700; }
.oh-stat-conf b   { color: var(--green, #4ade80); }
.oh-stat-unconf b { color: var(--yellow, #fbbf24); }
.oh-stat-break b  { color: rgba(255,255,255,0.85); }
.oh-stat-seen     { color: var(--text3); }
.oh-stat-seen b   { color: var(--accent); }

/* Body: global bar always visible; per-platform .oh-day-detail collapses. */
.oh-day-body {
  padding: 8px 14px 10px;
  cursor: pointer;
}
.oh-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  /* Match the row min-width math from .ot-row so labels + bar stay aligned
     even when the card is narrower than 1× zoom. */
  min-width: calc(120px + var(--ot-bar-fill-width, 450px) * var(--ot-zoom, 1));
}
.oh-bar-row-global .ot-bar-wrap { height: 22px; }
.oh-bar-row-plat   .ot-bar-wrap { height: 14px; }

.oh-bar-label {
  width: 110px;
  min-width: 110px;
  font-size: 11px;
  font-family: 'DM Mono', monospace;
  color: var(--text2);
  text-transform: uppercase;
  text-align: right;
  padding-right: 4px;
  font-weight: 600;
}
.oh-bar-label-plat {
  font-weight: 500;
  color: var(--text3);
}
.oh-bar-empty {
  position: absolute;
  top: 2px;
  left: 8px;
  font-size: 9px;
  color: var(--text3);
  opacity: 0.6;
  pointer-events: none;
}

/* Collapsible per-platform stack. CSS-only open/close transition — JS just
   adds/removes .open. max-height jump (1500px) is large enough for a worst
   case of all 4 tracked platforms + future growth, no scrolling inside. */
.oh-day-detail {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}
.oh-day-detail.open {
  max-height: 1500px;
  padding-top: 4px;
}

/* ─── Mobile (≤720px) — same threshold as online-tracker.css ──────────── */
@media (max-width: 720px) {
  .oh-day-head {
    gap: 6px;
    font-size: 11px;
    padding: 8px 10px;
  }
  .oh-day-date { min-width: 0; flex: 1 1 100%; }
  .oh-stat { font-size: 10px; }
  .oh-bar-row { gap: 6px; }
  .oh-bar-label, .oh-bar-label-plat {
    width: 80px; min-width: 80px;
    font-size: 10px;
  }
  .oh-day-body { padding: 8px 10px; }
}
