/**
 * EBVN Manager V2 - Table Styles
 * Styles for data tables and related elements
 */

/* Common Table Styles */
.table-responsive {
  overflow-x: auto;
  border-radius: 0.25rem;
}

/* Table Container Styles - Generic for all data tables */
.data-table-container {
  position: relative;
}

/* Data tables can have these more specific names for template semantics */
.candidate-table-container,
.exam-moment-table-container,
.document-table-container,
.exam-location-table-container {
  position: relative;
}

/* Sortable Column Styles */
th[data-sortable="true"] {
  cursor: pointer;
  user-select: none;
}

th[data-sortable="true"] i {
  opacity: 0.5;
  transition: opacity 0.2s;
}

th[data-sortable="true"]:hover i {
  opacity: 1;
}

/* Active sort indication */
th[data-sortable="true"].sort-asc i,
th[data-sortable="true"].sort-desc i {
  opacity: 1;
}

th[data-sortable="true"].sort-asc i::before {
  content: "\f0de"; /* fa-sort-up */
}

th[data-sortable="true"].sort-desc i::before {
  content: "\f0dd"; /* fa-sort-down */
}

/* Table Actions Column */
.table-actions {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

/* Table Hover & Focus Effects */
.table-hover tbody tr {
  transition: background-color 0.15s ease-in-out;
}

.table-hover tbody tr:hover {
  background-color: rgba(0, 0, 0, 0.02);
}

/* Table header styling */
.table thead th {
  font-weight: 600;
  color: var(--gray-700);
  background-color: var(--light-gray);
  border-bottom: 2px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Empty Table Message */
.table-empty-message {
  text-align: center;
  padding: 2rem;
  color: var(--gray-600);
}

.table-empty-message i {
  font-size: 1.5rem;
  margin-right: 0.5rem;
}

/* Compact Table Styles */
.widget-table.compact {
  font-size: 0.9rem;
}

.widget-table.compact td,
.widget-table.compact th {
  padding: 0.4rem 0.6rem;
}

.widget-table.compact .badge {
  padding: 0.25rem 0.5rem;
  font-size: 0.8rem;
}

.action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  color: var(--gray-600);
  background-color: transparent;
  border: 1px solid var(--gray-300);
  transition: all 0.2s;
}

.action-icon:hover {
  background-color: var(--gray-100);
  color: var(--primary);
  border-color: var(--gray-400);
}

/* Responsive Utilities */
@media (max-width: 768px) {
  .hide-on-mobile {
    display: none !important;
  }
}
