/* Custom styles goes here */
/* Custom styles goes here */
/* Table Sorting Styles */
.table thead th.sortable {
  cursor: pointer;
  user-select: none;
  position: relative;
  white-space: nowrap;
}
.table thead th.sortable:hover {
  background-color: var(--bs-gray-100);
}
.table thead th.sortable .sort-icon {
  margin-left: 0.5rem;
  font-size: 0.875rem;
  color: var(--bs-gray-500);
  transition: color 0.2s ease;
}
.table thead th.sortable.active .sort-icon {
  color: var(--bs-primary);
}

[data-bs-theme=dark] .table thead th.sortable:hover {
  background-color: var(--bs-gray-800);
}

/* Select2 Multi-Select Styles */
li.select2-selection__choice {
  max-width: 100%;
  overflow: hidden;
  white-space: normal;
}

ul.select2-selection__rendered {
  padding-right: 12px !important;
}

/* Prevent layout shift and show loading state for all selects before Select2 initialization */
select.select2:not(.select2-hidden-accessible) {
  max-height: 38px;
  min-height: 38px;
  overflow: hidden;
  border: 1px solid #d9dee3;
  border-radius: 0.375rem;
  background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s ease-in-out infinite;
  cursor: wait;
  color: transparent;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
}
select.select2:not(.select2-hidden-accessible) option {
  display: none;
}

@keyframes skeleton-loading {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}
/* Dark theme skeleton */
[data-bs-theme=dark] select.select2:not(.select2-hidden-accessible) {
  border-color: #404656;
  background: linear-gradient(90deg, #2b2c40 25%, #404656 50%, #2b2c40 75%);
  background-size: 200% 100%;
}

/* Tagify Styles for Long Text */
.tagify__tag {
  max-width: calc(100% - 20px) !important;
}

.tagify__tag > div {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
