/* DataTables Bootstrap 5 Integration Fixes */

/* Consistent table styling */
.dataTables_wrapper .table {
    width: 100% !important;
    margin-bottom: 0;
    border-collapse: collapse;
}

/* Fix header styling */
.dataTables_wrapper .table thead th {
    background-color: #f8f9fa;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 0.75rem;
    vertical-align: middle;
}

/* Fix cell styling */
.dataTables_wrapper .table tbody td {
    padding: 0.75rem;
    vertical-align: middle;
    border-bottom: 1px solid #dee2e6;
}

/* Fix search input styling */
.dataTables_wrapper .dataTables_filter input {
    margin-left: 0.5rem;
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid #d9dee3;
}

/* Fix pagination styling */
.dataTables_wrapper .dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin-left: 2px;
    border-radius: 0.25rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #696cff !important;
    border-color: #696cff !important;
    color: #fff !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #e1e2ff !important;
    border-color: #e1e2ff !important;
    color: #696cff !important;
}

/* Fix info text styling */
.dataTables_wrapper .dataTables_info {
    padding-top: 0.85rem;
    font-size: 0.9375rem;
}

/* Fix length menu styling */
.dataTables_wrapper .dataTables_length select {
    border-radius: 0.25rem;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 0.9375rem;
    border: 1px solid #d9dee3;
    background-position: right 0.75rem center;
}

/* Fix row hover effect */
.dataTables_wrapper .table tbody tr:hover {
    background-color: rgba(105, 108, 255, 0.05);
}

/* Fix table action buttons */
.dataTables_wrapper .table .btn-icon {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Fix responsive display */
@media (max-width: 767.98px) {
    .dataTables_wrapper .dataTables_length,
    .dataTables_wrapper .dataTables_filter {
        text-align: left;
        margin-bottom: 0.5rem;
    }
}

/* Fix for dark mode */
[data-bs-theme="dark"] .dataTables_wrapper .table thead th {
    background-color: #2b2c40;
    color: #a3a4cc;
    border-bottom-color: #444564;
}

[data-bs-theme="dark"] .dataTables_wrapper .table tbody td {
    border-bottom-color: #444564;
}

[data-bs-theme="dark"] .dataTables_wrapper .dataTables_filter input,
[data-bs-theme="dark"] .dataTables_wrapper .dataTables_length select {
    background-color: #2b2c40;
    border-color: #444564;
    color: #a3a4cc;
}
