/*body::before {
    content: "DT CUSTOM CSS LOADED";
    position: fixed;
    top: 0;
    left: 0;
    background: red;
    color: white;
    z-index: 99999;
    padding: 4px 8px;
    font-size: 12px;
  }*/


/* =========================================================
   STANDARD DATATABLE SORT INDICATORS
   ↕ default | ↑ asc | ↓ desc
   ========================================================= */

   table.dataTable thead th {
    position: relative;
}

table.dataTable thead th .dt-column-order {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.75rem;
    font-weight: 500;
    color: rgba(255,255,255,0.7);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

table.dataTable thead th:not(.dt-ordering-asc):not(.dt-ordering-desc)
.dt-column-order::before {
    content: "↕";
}

table.dataTable thead th.dt-ordering-asc
.dt-column-order::before {
    content: "↑";
    color: #ffffff;
    text-shadow: 0 0 1px rgba(255,255,255,0.6);
}

table.dataTable thead th.dt-ordering-desc
.dt-column-order::before {
    content: "↓";
    color: #ffffff;
    text-shadow: 0 0 1px rgba(255,255,255,0.6);
}

table.dataTable thead th.dt-orderable-none
.dt-column-order {
    display: none !important;
}

/* =========================================================
   PAGE LENGTH BUTTONS & INFO - MATCH PAGINATION STYLE
   ========================================================= */

/* DataTables info box (Showing X to Y) - matches pagination style */
.dt-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  color: #212529;
  background-color: #e9ecef;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  white-space: nowrap;
  height: 38px;
  margin-right: 8px;
}

/* Page length buttons container - matches pagination style */
.dt-length-buttons {
  display: flex;
  gap: 0;
  background-color: #e9ecef;
  border: 1px solid #dee2e6;
  border-radius: 0.25rem;
  overflow: hidden;
  height: 38px;
}

.dt-length-buttons .page-item {
  margin: 0;
}

.dt-length-buttons .page-link {
  border: none;
  border-radius: 0;
  background-color: transparent;
  color: #212529;
  padding: 0.375rem 0.75rem;
  font-size: 0.875rem;
  line-height: 1.5;
  height: 100%;
  display: flex;
  align-items: center;
  border-right: 1px solid #dee2e6;
}

.dt-length-buttons .page-item:last-child .page-link {
  border-right: none;
}

.dt-length-buttons .page-item.active .page-link {
  background-color: #0d6efd;
  color: #fff;
}

.dt-length-buttons .page-link:hover {
  background-color: #dee2e6;
}

.dt-length-buttons .page-item.active .page-link:hover {
  background-color: #0b5ed7;
}

:root {
  --dt-btn-padding-y: 0.375rem;
  --dt-btn-padding-x: 0.75rem;
  --dt-btn-font-size: 0.875rem;
  --dt-btn-line-height: 1.5;
  --dt-btn-border-radius: 0.375rem;
  --dt-btn-bg: #e9ecef;
  --dt-btn-color: #6c757d;
  --dt-btn-border: #dee2e6;
  --dt-btn-hover-bg: #d3d4d5;
  --dt-btn-active-bg: #0d6efd;
  --dt-btn-active-color: #fff;
  --dt-gap: 0.75rem;
}

/* === Form Select === */
select.form-select {
  padding: var(--dt-btn-padding-y) var(--dt-btn-padding-x);
  border: 0;
  outline: 1px solid #f3f3f3;
  color: #5e5151;
}

.dt-paging .pagination {
  display: flex;
  align-items: center;
  margin-bottom: 0;
  flex-wrap: wrap;
}

/* Mobile devices */
@media (max-width: 767.98px) {
  :root {
    --dt-btn-padding-y: 0.3rem;
    --dt-btn-padding-x: 0.5rem;
    --dt-btn-font-size: 0.75rem;
    --dt-gap: 0.5rem;
  }
    
  .dt-info {
    width: 100%;
    text-align: center;
    justify-content: center;
  }
  
  .dt-length-buttons {
    justify-content: center;
  }
  
  .dt-paging .pagination {
    justify-content: center;
  }
  
  /* Stack column search inputs */
  .column-search-row th {
    padding: 0.25rem;
  }
  
  .column-search {
    font-size: 0.75rem;
    padding: 0.25rem 0.375rem;
  }
}

/* Extra small devices */
@media (max-width: 575.98px) {
  
  /* Hide less important pagination elements on very small screens */
  .dt-paging .page-item:not(.active):not(:first-child):not(:last-child) {
    display: none;
  }
  
  .dt-paging .page-item.active,
  .dt-paging .page-item:first-child,
  .dt-paging .page-item:last-child {
    display: flex;
  }
}

/* Curve top corners of DataTable header */
#example thead tr:first-child th:first-child {
  border-top-left-radius: 12px;
}

#example thead tr:first-child th:last-child {
  border-top-right-radius: 12px;
}

#example {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

/* Prevent header background bleed when using rounded corners */
table.dataTable {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
}

table thead tr:first-child th {
  background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
  color: #fff;
  border: none;
}

table thead tr:first-child th a,
table thead tr:first-child th i {
  color: #fff; /* icons / links white */
}

table.dataTable thead th {
  white-space: nowrap;
}

/* Space between column title text and sorting arrow */
table.dataTable thead th {
  padding-right: 36px !important; /* creates space before arrow */
}