﻿/* -----------------------------------
   Dark Table Theme Scoped to .datatable-dark
----------------------------------- */

/* Table layout */
.datatable-dark table.table-dark {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    background-color: #1e1e1e;
    border-radius: 8px;
    overflow: hidden;
    color: #f0f0f0;
}

    /* Sticky header */
    .datatable-dark table.table-dark thead tr th,
    .datatable-dark table.table-dark thead tr td {
        position: sticky;
        top: 0;
        padding: 5px;
        margin: 0;
        height: 20px;
        border-radius: 10px;
        background-color: #2c2c2c;
        color: #00ffff;
        text-align: left;
    }

    /* Table body cells */
    .datatable-dark table.table-dark tbody td {
        height: 20px;
        padding: 5px;
        margin: 0;
        border-radius: 10px;
        color: #e0e0e0;
    }

    /* Sticky footer */
    .datatable-dark table.table-dark tfoot td {
        position: sticky;
        bottom: 0;
        height: 20px;
        padding: 5px;
        margin: 0;
        font-weight: bold;
        color: #00aaff;
        border-radius: 10px;
    }

    /* Row borders */
    .datatable-dark table.table-dark tbody tr {
        border-bottom: 2px solid #444;
    }

        /* Zebra striping */
        .datatable-dark table.table-dark tbody tr:nth-of-type(odd) {
            background-color: #2a2a2a;
        }

        .datatable-dark table.table-dark tbody tr:nth-of-type(even) {
            background-color: #1f1f1f;
        }

        /* Hover effect */
        .datatable-dark table.table-dark tbody tr:hover {
            background-color: #333;
            cursor: pointer;
        }

        /* Active row highlight */
        .datatable-dark table.table-dark tbody tr.active-row {
            font-weight: bold;
            color: #00bfff;
        }

/* -----------------------------------
   DataTables Components Scoped to .datatable-dark
----------------------------------- */

/* Filter input */
.datatable-dark .dataTables_filter input {
    background-color: #2c2c2c;
    color: #f0f0f0;
    border: 1px solid #00bfff;
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: bold;
}

/* Show entries label */
.datatable-dark .dataTables_length label {
    background-color: #2c2c2c;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: bold;
    color: #f0f0f0;
}

/* Show entries dropdown */
.datatable-dark .dataTables_length select {
    background-color: #1f1f1f;
    color: #f0f0f0;
    border: 1px solid #00bfff;
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: bold;
}

/* Pagination buttons */
.datatable-dark .dataTables_paginate a {
    padding: 6px 10px !important;
    background-color: #2c2c2c !important;
    border: 1px solid #00bfff !important;
    border-radius: 8px;
    color: #00bfff;
    font-weight: 600;
    margin: 0 2px;
    text-decoration: none;
}

    .datatable-dark .dataTables_paginate a:hover {
        background-color: #005f99 !important;
        color: #ffffff !important;
    }

.datatable-dark .dataTables_paginate .pagination > .active > a,
.datatable-dark .dataTables_paginate .pagination > .active > a:focus,
.datatable-dark .dataTables_paginate .pagination > .active > a:hover {
    background-color: #00bfff !important;
    color: #000 !important;
    border-color: #0099cc !important;
    font-weight: bold;
}

/* Processing spinner */
.datatable-dark .dataTables_processing {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 191, 255, 0.85);
    color: #ffffff;
    font-weight: 600;
    padding: 0.75rem 1.25rem;
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    z-index: 1050;
    backdrop-filter: blur(2px);
}

    .datatable-dark .dataTables_processing::before {
        content: "";
        display: inline-block;
        width: 1.5rem;
        height: 1.5rem;
        margin-right: 10px;
        border: 0.25em solid #ffffff;
        border-top: 0.25em solid #0099cc;
        border-radius: 50%;
        animation: spin 0.75s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

