﻿/* 
-----------------------------------------------------------------------------------
   Blue Table Theme Scoped to .datatable-blue

    ----a div is needed with class datatable-blue on top
-----------------------------------------------------------------------------------
*/




/* Table layout */
.datatable-blue table.table-blue {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    background: linear-gradient(to bottom, #f0f4f8, #dbe9f4);
    border-radius: 8px;
    overflow: hidden;
}

    /* Sticky header */
    .datatable-blue table.table-blue thead tr th,
    .datatable-blue table.table-blue thead tr td {
        position: sticky;
        top: 0;
        padding: 5px;
        margin: 0;
        height: 20px;
        border-radius: 10px;
        background-color: #007bff;
        color: #ffffff;
        text-align: left;
    }

    /* Table body cells */
    .datatable-blue table.table-blue tbody td {
        height: 20px;
        padding: 5px;
        margin: 0;
        border-radius: 10px;
        color: #212529;
    }

    /* Sticky footer */
    .datatable-blue table.table-blue tfoot td {
        position: sticky;
        bottom: 0;
        height: 20px;
        padding: 5px;
        margin: 0;
        font-weight: bold;
        color: #0056b3;
        border-radius: 10px;
    }

    /* Row borders */
    .datatable-blue table.table-blue tbody tr {
        border-bottom: 2px solid #cce5ff;
    }

        /* Zebra striping */
        .datatable-blue table.table-blue tbody tr:nth-of-type(odd) {
            background-color: #e9f2fb;
        }

        .datatable-blue table.table-blue tbody tr:nth-of-type(even) {
            background-color: #f8fbff;
        }

        /* Hover effect */
        .datatable-blue table.table-blue tbody tr:hover {
            background-color: #d0e7ff;
            cursor: pointer;
        }

        /* Active row highlight */
        .datatable-blue table.table-blue tbody tr.active-row {
            font-weight: bold;
            color: #007bff;
        }

/* -----------------------------------
   DataTables Components Scoped to .datatable-blue
----------------------------------- */

/* Filter input */
.datatable-blue .dataTables_filter input {
    background-color: #e0f0ff;
    color: #000;
    border: 1px solid #007bff;
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: bold;
}

/* Show entries label */
.datatable-blue .dataTables_length label {
    background-color: #f0f8ff;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: bold;
    color: #333;
}

/* Show entries dropdown */
.datatable-blue .dataTables_length select {
    background-color: #e0f0ff;
    color: #000;
    border: 1px solid #007bff;
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: bold;
}

/* Pagination buttons */
.datatable-blue .dataTables_paginate a {
    padding: 6px 10px !important;
    background-color: #e0f0ff !important; /* Light blue */
    border: 1px solid #007bff !important;
    border-radius: 8px;
    color: #007bff;
    font-weight: 600;
    margin: 0 2px;
    text-decoration: none;
}

    .datatable-blue .dataTables_paginate a:hover {
        background-color: #cce5ff !important; /* Slightly darker blue */
        color: #0056b3 !important;
    }

.datatable-blue .dataTables_paginate .pagination > .active > a,
.datatable-blue .dataTables_paginate .pagination > .active > a:focus,
.datatable-blue .dataTables_paginate .pagination > .active > a:hover {
    background-color: #007bff !important;
    color: #fff !important;
    border-color: #0056b3 !important;
    font-weight: bold;
}

/* Processing spinner */
.datatable-blue .dataTables_processing {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(0, 123, 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-blue .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 #0056b3;
        border-radius: 50%;
        animation: spin 0.75s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}
