/* ============================================================================
   Dashboard Tables
   ============================================================================ */

.ffmpeg-dashboard-table-wrapper {
  border: 1px solid var(--ffmpeg-border);
  border-radius: var(--ffmpeg-radius-m);
  background: var(--ffmpeg-surface);
  box-shadow: var(--ffmpeg-shadow-soft);
  overflow: hidden;
}

.ffmpeg-dashboard-table-wrapper.is-hidden {
  display: none;
}

.ffmpeg-dashboard-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 0.875rem;
}

.ffmpeg-dashboard-table th,
.ffmpeg-dashboard-table td {
  padding: 0.8rem 1rem;
  text-align: start;
  border-bottom: 1px solid var(--ffmpeg-border);
}

.ffmpeg-dashboard-table th {
  font-weight: 600;
  font-size: 0.72rem;
  color: var(--ffmpeg-text-muted);
  background: var(--ffmpeg-surface-2);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
}

.ffmpeg-dashboard-table tbody tr {
  background: transparent;
}

.ffmpeg-dashboard-table tbody tr:nth-child(even) {
  background: var(--ffmpeg-surface-2);
}

.ffmpeg-dashboard-table tbody tr:hover {
  background: var(--ffmpeg-accent-soft);
}

.ffmpeg-dashboard-table tbody tr.ffmpeg-row--new {
  animation: ffmpeg-row-enter 0.35s ease-out;
  background: var(--ffmpeg-accent-soft);
}

.ffmpeg-dashboard-table tbody tr.ffmpeg-row--updated {
  animation: ffmpeg-row-update 0.9s ease-out;
}

.ffmpeg-dashboard-table a {
  color: var(--ffmpeg-accent);
  text-decoration: none;
  font-weight: 600;
}

.ffmpeg-dashboard-table a:hover {
  color: var(--ffmpeg-accent-hover);
  text-decoration: underline;
}

.ffmpeg-media-id {
  display: inline-block;
  margin-inline-start: 0.5rem;
  color: var(--ffmpeg-text-muted);
  font-size: 0.7rem;
}

.ffmpeg-row-badge {
  display: inline-flex;
  align-items: center;
  margin-inline-start: 0.5rem;
  padding: 0.1rem 0.45rem;
  border-radius: 9999px;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid var(--ffmpeg-border);
}

.ffmpeg-row-badge--new {
  background: var(--ffmpeg-accent-soft);
  color: var(--ffmpeg-accent-badge-text);
  border-color: var(--ffmpeg-accent);
}

.ffmpeg-row-badge--updated {
  background: var(--ffmpeg-warning-bg);
  color: var(--ffmpeg-warning-badge-text);
  border-color: var(--ffmpeg-warning);
}

/* ============================================================================
   Media Table
   ============================================================================ */

.ffmpeg-media-table {
  background: var(--ffmpeg-surface);
  border: 1px solid var(--ffmpeg-border);
  border-radius: var(--ffmpeg-radius-m);
  overflow: hidden;
  box-shadow: var(--ffmpeg-shadow-soft);
}

.ffmpeg-media-table th {
  background: var(--ffmpeg-surface-2);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.75rem;
  letter-spacing: 0.05em;
  color: var(--ffmpeg-text-muted);
  padding: 1rem;
  border-bottom: 1px solid var(--ffmpeg-border);
}

.ffmpeg-media-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--ffmpeg-surface-2);
  vertical-align: middle;
}

.ffmpeg-media-table tr:last-child td {
  border-bottom: none;
}

/* ============================================================================
   Sortable Table Headers
   ============================================================================ */

.ffmpeg-media-table th.sortable {
  user-select: none;
}

.ffmpeg-media-table th.sortable:hover {
  color: var(--ffmpeg-accent);
}

.ffmpeg-media-table th.sortable:focus-visible {
  outline: none;
  box-shadow: var(--ffmpeg-focus-ring);
  border-radius: var(--ffmpeg-radius-s, 6px);
}

.ffmpeg-media-table th.sortable .ffmpeg-sort-indicator {
  font-size: 0.7em;
  opacity: 0.7;
}

.ffmpeg-media-table th.sortable[aria-sort="ascending"] .ffmpeg-sort-indicator,
.ffmpeg-media-table th.sortable[aria-sort="descending"] .ffmpeg-sort-indicator {
  opacity: 1;
}
