.select2-results__option[aria-selected="true"],
.select2-results__option[aria-disabled="true"] {
  display: none;
}
.select2-container--disabled .select2-selection {
  background-color: var(--bs-gray-400) !important;
}
#sticky-filters .select2-selection__choice {
  background-color: var(--bs-green);
}

#filters .select2-selection__choice {
  background-color: var(--bs-red);
}
#filters select {
  max-width: 50%;
}
#filters table {
  width: 100%;
}
#filters th {
  text-align: center;
}
#filters td {
  vertical-align: top;
}

#datasheet-tables {
  margin-left: 0;
}

#datasheet .table-wrapper {
  margin-bottom: 20px;
}

#datasheet h3 {
  margin-bottom: 15px;
}

#datasheet table {
  margin-bottom: 0;
  min-width: 100%;
}

#datasheet .edit-enabled table {
  width: max-content;
}

#datasheet .table-wrapper .edit-enabled .input-group {
  display: flex;
  flex-wrap: nowrap; /* Prevent breaking into multiple lines */
  align-items: center;
  min-width: fit-content; /* Prevents excessive shrinking */

}

#datasheet .header-title {
  margin-bottom: 0;
}

#datasheet .clear-row-filters {
  cursor: pointer;
}

#datasheet .reset-row-filters {
  cursor: pointer;
}

.table > tbody > :not(caption) > * > * {
  text-align: center;
}

#datasheet .filters-section {
  margin-bottom: 20px;
}

#datasheet .filter-row:not(:last-child) {
  margin-bottom: 10px;
}

.filter-toggle-buttons {
  align-self: last baseline;
}

#datasheet-tables thead {
  z-index: 0 !important;
}

#datasheet-tables td:focus, td.active-cell {
  border: 3px solid var(--bs-primary) !important;
}

.table-edit-button {
  position: absolute;
  right: 0;
  top: 0;
  padding: 0.3rem;
}

.hidden {
  display: none;
}

td.edit-table-action-bar {
  width: 40px;
}

.scrollable-x {
  overflow-x: auto;
}

.scrollable-y {
  overflow-x: auto;
}

.scrollable {
  overflow: auto;
}

section {
  --bs-table-bg: brown;
  --bs-table-striped-bg: blue;
}

.cursor-pointer {
    cursor: pointer;
}

.hover-highlight:hover {
  color: var(--bs-primary);
}

.table-edit-parent {
  position: relative;
}


/* Adjust the parent container to handle overflow */
#edit-dropdown-parent {
  position: relative;
  overflow: visible; /* Allow overflow to be visible */
}

.scrollable-class {
  overflow-x: auto;
}

.edit-table table td {
  width: auto;
  white-space: nowrap;
}

.v-select {
  background-color: white;
}

tr.table-row-highlight td {
  background-color: var(--bs-primary);
}

tr.table-row-highlight {
  background-color: var(--bs-primary);
}

td.highlight-cell {
  background-color: rgba(var(--bs-primary-rgb), 0.15);
  box-shadow: unset;
}

/* extra */
   /* Ensure custom styles have higher specificity */
 .datasheet-collection .card {
   border: 1px solid #e0e0e0;
   border-radius: 8px;
   box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
   margin-bottom: 20px;
 }
.datasheet-collection .card-header {
  padding-top: 16px;
  padding-bottom: 0px;
  padding-left: 16px;
  padding-right: 16px;
  border-bottom: none;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  background-color: #ffffff; /* set to white */
}
.datasheet-collection .card-title {
  font-size: 1.25rem;
  color: #333;
  margin-bottom: 0;
  font-weight: 600;
}
.datasheet-collection .card-body {
  padding: 0;
}
.datasheet-collection .table-responsive {
  overflow-x: auto;
}
.datasheet-collection .table {
  width: 100%;
  margin-bottom: 1rem;
  color: #212529;
  border-collapse: collapse;
  border-spacing: 0;
}
.datasheet-collection .table thead {
  background-color: transparent;
}
.datasheet-collection .table thead th {
  border-bottom: 2px solid #e0e0e0;
  padding: 12px;
  vertical-align: bottom;
  text-align: left;
  font-weight: 500;
  color: #444;
}
.datasheet-collection .table tbody tr {
  border-bottom: 1px solid #e0e0e0;
}
.datasheet-collection .table tbody tr:last-child {
  border-bottom: none;
}
.datasheet-collection .table tbody td {
  padding: 0.5rem;
  vertical-align: top;
}
.datasheet-collection .table-striped tbody tr:nth-of-type(odd) {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Custom CSS Classes */
.datasheet-collection table.custom-table-class {
  border-radius: 5px;
}
.datasheet-collection table.custom-table-class thead th.custom-header-class{
  background-color: #f8f9fa; /* Standard Bootstrap light grey for header */
  color: #0c3001;
}
.datasheet-collection table.custom-table-class tbody td.custom-cell-class {
  color: #084a91;
}
.datasheet-collection table.custom-table-class  b.custom-footnote-class{
  color: #b81111;
  font-weight: bolder;
}
.datasheet-collection table.custom-table-class  td.custom-footnote-text{
  font-size: 0.8rem;
}
.datasheet-collection table.custom-table-class  span.custom-footnote-index{
  font-size: 1rem;
}

/* Sticky Header */
.datasheet-collection thead.custom-sticky-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background-color: var(--bs-gray-300);
}

:not(.table-transposed) tbody tr:last-child > td {
  border-bottom: unset;
}

:not(.table-transposed) tbody tr td:first-child, :not(.table-transposed) thead tr th:first-child {
  border-left: unset;
}

:not(.table-transposed) tbody tr td:last-child, :not(.table-transposed) thead tr th:last-child {
  border-right: unset;
}

.table-transposed tbody th {
  border-left: unset;
}

.table-transposed tbody tr td:last-child {
  border-right: unset;
}

.table-transposed tbody tr:last-child th, .table-transposed tbody tr:last-child td {
  border-bottom: unset;
}

.datasheet-collection .edit-enabled.table-transposed tfoot tr td:first-child, .datasheet-collection .edit-enabled.table-transposed tfoot tr th:first-child {
  border-left: unset;
}

.datasheet-collection .edit-enabled.table-transposed tfoot tr td:last-child, .datasheet-collection .edit-enabled.table-transposed tfoot tr th:last-child {
  border-right: unset;
}

.datasheet-collection .edit-enabled.table-transposed tfoot tr td, .datasheet-collection .edit-enabled.table-transposed tfoot tr th {
  border-bottom: unset;
  border-top: 1px solid #fff;
}