/* DataTables CSS Integration for Bootstrap 5.3 Dark Theme */

/* DataTables Container */
.dataTables_wrapper {
    color: #e2e8f0;
}

/* Search Box */
.dataTables_filter input {
    background-color: rgba(102, 126, 234, 0.05) !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    color: #e2e8f0 !important;
    padding: 0.5rem !important;
    border-radius: 5px !important;
    transition: all 0.3s ease !important;
}

.dataTables_filter input:focus {
    background-color: rgba(102, 126, 234, 0.1) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

/* Length Selector */
.dataTables_length select {
    background-color: rgba(102, 126, 234, 0.05) !important;
    border: 1px solid rgba(102, 126, 234, 0.2) !important;
    color: #e2e8f0 !important;
    padding: 0.5rem !important;
    border-radius: 5px !important;
}

.dataTables_length select:focus {
    background-color: rgba(102, 126, 234, 0.1) !important;
    border-color: rgba(102, 126, 234, 0.4) !important;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25) !important;
}

/* Table Styling */
.dataTables_wrapper .table {
    color: #e2e8f0;
    border-color: rgba(102, 126, 234, 0.1);
}

.dataTables_wrapper .table thead {
    background-color: rgba(102, 126, 234, 0.1);
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

.dataTables_wrapper .table th {
    color: #667eea;
    font-weight: 600;
    padding: 1rem !important;
    border-color: rgba(102, 126, 234, 0.2);
}

.dataTables_wrapper .table tbody td {
    padding: 0.75rem 1rem !important;
    border-color: rgba(102, 126, 234, 0.1);
    vertical-align: middle;
}

.dataTables_wrapper .table tbody tr {
    transition: all 0.3s ease;
    border-bottom: 1px solid rgba(102, 126, 234, 0.1);
}

.dataTables_wrapper .table tbody tr:hover {
    background-color: rgba(102, 126, 234, 0.05);
    box-shadow: inset 0 0 10px rgba(102, 126, 234, 0.05);
}

/* Sorting Headers */
.dataTables_wrapper .table thead .sorting,
.dataTables_wrapper .table thead .sorting_asc,
.dataTables_wrapper .table thead .sorting_desc {
    cursor: pointer;
    background-repeat: no-repeat;
    background-position: center right;
    padding-right: 1.5rem !important;
    background-size: 15px;
}

.dataTables_wrapper .table thead .sorting::after {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    margin-left: 0.5rem;
    background: linear-gradient(to bottom, rgba(102, 126, 234, 0.3) 50%, transparent 50%);
}

.dataTables_wrapper .table thead .sorting_asc::after {
    content: '↑';
    color: #667eea;
    margin-left: 0.5rem;
}

.dataTables_wrapper .table thead .sorting_desc::after {
    content: '↓';
    color: #667eea;
    margin-left: 0.5rem;
}

/* Pagination */
.dataTables_wrapper .dataTables_paginate {
    display: flex;
    justify-content: flex-end;
    margin-top: 1rem;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    display: inline-block;
    padding: 0.5rem 0.75rem;
    margin: 0 0.25rem;
    background-color: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background-color: rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: transparent;
    font-weight: 600;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.25);
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover {
    background-color: rgba(102, 126, 234, 0.1);
    transform: none;
}

/* Info Text */
.dataTables_wrapper .dataTables_info {
    color: #cbd5e0;
    padding: 1rem 0;
    font-size: 0.9rem;
}

/* Processing */
.dataTables_wrapper .dataTables_processing {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    background-color: rgba(15, 20, 25, 0.95);
    padding: 2rem;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #e2e8f0;
}

.dataTables_wrapper .dataTables_processing::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 1rem;
    border: 3px solid rgba(102, 126, 234, 0.3);
    border-top-color: #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive Styling */
@media (max-width: 768px) {
    .dataTables_wrapper {
        font-size: 0.9rem;
    }
    
    .dataTables_wrapper .table th,
    .dataTables_wrapper .table td {
        padding: 0.5rem !important;
    }
    
    .dataTables_wrapper .dataTables_paginate {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .dataTables_wrapper .dataTables_paginate .paginate_button {
        padding: 0.4rem 0.6rem;
        font-size: 0.85rem;
    }
}

/* Empty State */
.dataTables_wrapper .dataTables_empty {
    text-align: center;
    padding: 2rem !important;
    color: #cbd5e0;
}

/* Scrolling */
.dataTables_scrollHeadInner,
.dataTables_scrollFootInner {
    border-bottom: 2px solid rgba(102, 126, 234, 0.2);
}

/* Compact Mode */
.dataTables_wrapper.compact .table th,
.dataTables_wrapper.compact .table td {
    padding: 0.3rem !important;
}

/* Striped Rows */
.dataTables_wrapper .table tbody tr:nth-child(odd) {
    background-color: rgba(102, 126, 234, 0.02);
}

.dataTables_wrapper .table tbody tr:nth-child(even) {
    background-color: transparent;
}
