@import "../variables"; @import "datatables.net-bs5/css/dataTables.bootstrap5.min.css"; // DataTables Theme Overrides table.dataTable { font-family: $font-family-base; font-size: $font-size-base; color: $gray-800; border-collapse: collapse !important; border-color: $border-color; // Header cells thead { th, td { font-weight: 500; font-size: $font-size-sm; color: $gray-600; background: $gray-100; border-bottom: 1px solid $border-color !important; padding: 0.625rem 0.75rem; white-space: nowrap; } // Sort icons th.sorting, th.sorting_asc, th.sorting_desc { cursor: pointer; &::before, &::after { opacity: 0.4; color: $gray-500; } &.sorting_asc::before, &.sorting_desc::after { opacity: 1; color: $primary; } } } // Body cells tbody { td { padding: 0.625rem 0.75rem; vertical-align: middle; border-top: 1px solid $border-color; } tr { transition: background-color 0.15s; &:hover>td { background-color: rgba($primary, 0.04); &.dtfc-fixed-left, &.dtfc-fixed-right { background-color: mix($primary, $white, 4%); } } &.selected>td { background-color: rgba($primary, 0.1); color: $gray-900; &.dtfc-fixed-left, &.dtfc-fixed-right { background-color: mix($primary, $white, 10%); } } } } // Footer cells tfoot { th, td { border-top: 2px solid $border-color; font-weight: 500; color: $gray-800; } } // Striped rows &.table-striped>tbody>tr:nth-child(odd)>td { background-color: rgba($gray-50, 0.6); &.dtfc-fixed-left, &.dtfc-fixed-right { background-color: mix($gray-50, $white, 60%); } } } // Wrapper lengths control .dataTables_wrapper { font-family: $font-family-base; font-size: $font-size-base; color: $gray-800; // Length (items per page) select .dataTables_length { label { font-size: $font-size-sm; color: $gray-600; display: flex; align-items: center; gap: 0.5rem; } select { font-family: $font-family-base; font-size: $font-size-sm; border: 1px solid $border-color; border-radius: 0.5rem; padding: 0.25rem 2.25rem 0.25rem 0.75rem; /* Increased padding-right for dropdown arrow */ color: $gray-800; background-color: $white; min-width: 80px; /* Force minimum width to prevent cut-off */ &:focus { border-color: $primary; outline: 0; box-shadow: 0 0 0 3px rgba($primary, 0.12); } } } // Search input .dataTables_filter { label { font-size: $font-size-sm; color: $gray-600; display: flex; align-items: center; gap: 0.5rem; } input { font-family: $font-family-base; font-size: $font-size-sm; border: 1px solid $border-color; border-radius: 0.5rem; padding: 0.375rem 0.75rem; color: $gray-800; &:focus { border-color: $primary; outline: 0; box-shadow: 0 0 0 3px rgba($primary, 0.12); } } } // Info text .dataTables_info { font-size: $font-size-sm; color: $gray-500; padding-top: 0.5rem; } // Pagination .dataTables_paginate { .paginate_button { font-family: $font-family-base; font-size: $font-size-sm; border-radius: 0.5rem !important; border: 1px solid transparent !important; color: $gray-800 !important; padding: 0.3rem 0.65rem; transition: all 0.15s; &:hover { background: rgba($primary, 0.08) !important; color: $primary !important; border-color: transparent !important; box-shadow: none !important; } &.current, &.current:hover { background: $primary !important; color: $white !important; border-color: $primary !important; box-shadow: none !important; font-weight: 500; } &.disabled, &.disabled:hover { color: $gray-600 !important; cursor: not-allowed; } } } // Processing indicator .dataTables_processing { font-family: $font-family-base; font-size: $font-size-sm; border: 1px solid $border-color; border-radius: 0.5rem; background: $white; box-shadow: 0 4px 16px rgba($black, 0.15); color: $gray-800; >div:last-child>div { background: $primary; } } } .dt-length { select { min-width: 70px !important; } }