.universal-sortable-table th[data-table-sort-enabled="true"] {
  cursor: pointer;
  user-select: none;
}

.table-sort-button {
  width: 100%;
  min-width: max-content;
  min-height: 28px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  gap: .38rem;
  border: 0;
  border-radius: 6px;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  text-align: left;
  text-transform: inherit;
  cursor: pointer;
}

.table-sort-button::after {
  min-width: .8rem;
  color: currentColor;
  content: "⇅";
  font-size: .78rem;
  line-height: 1;
  opacity: .38;
  transition: opacity .15s ease, transform .15s ease;
}

.table-sort-button:hover::after { opacity: .8; }
.table-sort-button.is-active::after { opacity: 1; }
.table-sort-button.is-active[data-direction="ascending"]::after { content: "↑"; }
.table-sort-button.is-active[data-direction="descending"]::after { content: "↓"; }

.table-sort-button:focus-visible {
  outline: 2px solid var(--ui-accent-strong, #9fba45);
  outline-offset: 3px;
}

.admin-active .table-sort-button.is-active {
  color: var(--ui-accent-strong, #b9d469);
}

.table-sort-status {
  position: fixed !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

@media (prefers-reduced-motion: reduce) {
  .table-sort-button::after { transition: none; }
}
