/* smart-table.css — Styles for the smart-table sorting, column picker, and grouping */

/* ── Toolbar ─────────────────────────────────────────────────────────────── */
.st-toolbar {
  padding: 0.3rem 0;
}

/* ── Sortable headers ─────────────────────────────────────────────────────── */
th.st-sortable {
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
}

th.st-sortable:hover {
  filter: brightness(0.92);
}

th.st-sorted-asc,
th.st-sorted-desc {
  outline: 2px solid rgba(232, 84, 28, 0.45) !important;
  outline-offset: -2px;
}

.st-sort-icon {
  font-size: 0.68em;
  opacity: 0.85;
  vertical-align: middle;
}

/* ── Column drag-to-reorder ──────────────────────────────────────────────── */
th[data-col] {
  cursor: grab;
}

th[data-col]:active {
  cursor: grabbing;
}

th.st-col-dragging {
  opacity: 0.35;
}

th.st-col-drag-over {
  outline: 2px dashed rgba(232, 84, 28, 0.75) !important;
  outline-offset: -2px;
  background-color: rgba(232, 84, 28, 0.08) !important;
}

/* ── Group header rows ────────────────────────────────────────────────────── */
tr.st-group-header {
  background-color: #f1f3f5 !important;
  border-top: 2px solid #dee2e6;
  border-bottom: 1px solid #dee2e6;
}

tr.st-group-header td {
  padding: 0.45rem 0.75rem;
  font-size: 0.83rem;
  color: #495057;
  letter-spacing: 0.01em;
}

/* ── Dark theme overrides ─────────────────────────────────────────────────── */
[data-bs-theme="dark"] tr.st-group-header {
  background-color: #2b2d30 !important;
  border-top-color: #444;
  border-bottom-color: #444;
}

[data-bs-theme="dark"] tr.st-group-header td {
  color: #adb5bd;
}

/* ── Column picker dropdown items ─────────────────────────────────────────── */
.dropdown-menu .st-col-toggle {
  flex-shrink: 0;
}

/* ── Reset button ─────────────────────────────────────────────────────────── */
.st-reset-btn {
  font-size: 0.8rem;
  line-height: 1;
}
