/* ─── Drafter Stats Page ─────────────────────────────────────────────────── */

/* ── Stats table ── */
#stats-head th {
  text-align: center !important;
  border: 1px solid #3a3e3f !important;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  transition: background 0.12s;
}

#stats-head th:hover { background: rgba(98,168,172,0.1); }

#stats-head th.sort-active { color: #fff; }

#stats-body td {
  text-align: center;
  border: 1px solid #2e3233 !important;
  padding: 7px 10px !important;
  font-size: 0.83rem;
}

#stats-body td.cell-left { text-align: left; }

/* ── Rate columns ── */
.rate-col { color: var(--color-accent); }

/* ── Sortable header arrow ── */
.sort-arrow { font-size: 0.7rem; margin-left: 3px; opacity: 0.8; }

/* ── Empty / loading states ── */
.ps-empty-state {
  text-align: center;
  padding: 5rem 1rem;
  color: #444;
}

.ps-empty-state i {
  font-size: 2.5rem;
  margin-bottom: 1rem;
  display: block;
}

.ps-empty-state p {
  font-size: 0.9rem;
  margin: 0;
}

/* ─── Row click / expand ─────────────────────────────────────────────────── */
#stats-body tr[data-row-index] { cursor: pointer; }

#stats-body tr.row-expanded > td {
  background: rgba(98, 168, 172, 0.07) !important;
}

/* ─── Detail / histogram panel ───────────────────────────────────────────── */
/* Loading placeholder (still uses colspan) */
tr.detail-row > td[colspan] {
  padding: 0 !important;
  border: none !important;
}

.spark-panel-loading {
  display: flex;
  align-items: center;
  padding: 14px 18px;
  color: #666;
  font-size: 0.82rem;
  background: rgba(14, 18, 20, 0.95);
}

/* Per-column detail cells */
.detail-cell {
  background: rgba(14, 18, 20, 0.95) !important;
  border-top: none !important;
  border-bottom: 1px solid rgba(98, 168, 172, 0.2) !important;
  vertical-align: middle !important;
  padding: 8px 6px !important;
}

.detail-cell-legend {
  vertical-align: middle !important;
  white-space: nowrap;
}

.detail-cell-chart {
  min-width: 188px;
  vertical-align: top !important;
  padding-top: 6px !important;
}

.detail-cell-empty {
  border-left: none !important;
  border-right: none !important;
}

/* Legend */
.spark-legend {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 0.7rem;
  color: #888;
}

.spark-legend-item {
  display: flex;
  align-items: center;
  gap: 5px;
}

.spark-empty {
  color: #444;
  font-size: 0.75rem;
}
