﻿/* -----------------------------------
   Custom Grey Table Styling (.table-grey)
----------------------------------- */

/* Table layout */
table.table-grey {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Segoe UI', sans-serif;
    font-size: 14px;
    background-color: #f5f5f5;
    border-radius: 8px;
    overflow: hidden;
}

    /* Sticky header */
    table.table-grey thead tr th,
    table.table-grey thead tr td {
        position: sticky;
        top: 0;
        padding: 5px;
        margin: 0;
        height: 20px;
        border-radius: 10px;
        background-color: dimgray;
        color: aqua;
        text-align: left;
    }

    /* Table body cells */
    table.table-grey tbody td {
        height: 20px;
        padding: 5px;
        margin: 0;
        border-radius: 10px;
        color: #212529;
    }

    /* Sticky footer */
    table.table-grey tfoot td {
        position: sticky;
        bottom: 0;
        height: 20px;
        padding: 5px;
        margin: 0;
        font-weight: bold;
        color: blue;
        border-radius: 10px;
    }

    /* Row borders */
    table.table-grey tbody tr {
        border-bottom: 2px solid lightgrey;
    }

        /* Zebra striping */
        table.table-grey tbody tr:nth-of-type(odd) {
            background-color: #e6e6e6;
        }

        table.table-grey tbody tr:nth-of-type(even) {
            background-color: #f9f9f9;
        }

        /* Hover effect */
        table.table-grey tbody tr:hover {
            background-color: #d0d0d0;
            cursor: pointer;
        }

        /* Active row highlight */
        table.table-grey tbody tr.active-row {
            font-weight: bold;
            color: #009879;
        }

/* -----------------------------------
   DataTables Styling Scoped to .table-grey
----------------------------------- */

/* Filter input */
.dataTables_wrapper .dataTables_filter input {
    background-color: #dcdcdc;
    color: #000;
    border: 1px solid #999;
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: bold;
}

/* Show entries label */
.dataTables_wrapper .dataTables_length label {
    background-color: #f0f0f0;
    padding: 6px 10px;
    border-radius: 8px;
    font-weight: bold;
    color: #333;
}

/* Show entries dropdown */
.dataTables_wrapper .dataTables_length select {
    background-color: #dcdcdc;
    color: #000;
    border: 1px solid #999;
    border-radius: 6px;
    padding: 4px 8px;
    font-weight: bold;
}

/* Pagination buttons */
.dataTables_wrapper .dataTables_paginate a {
    padding: 6px 10px !important;
    background-color: #e0e0e0 !important;
    border: 1px solid #999 !important;
    border-radius: 8px;
    color: #333;
    font-weight: 600;
    margin: 0 2px;
    text-decoration: none;
}

    .dataTables_wrapper .dataTables_paginate a:hover {
        background-color: #c0c0c0 !important;
        color: #000 !important;
    }

.dataTables_wrapper .dataTables_paginate .pagination > .active > a,
.dataTables_wrapper .dataTables_paginate .pagination > .active > a:focus,
.dataTables_wrapper .dataTables_paginate .pagination > .active > a:hover {
    background-color: darkgray !important;
    color: blue !important;
    border-color: red !important;
    font-weight: bold;
}

/* Processing spinner */
.dataTables_wrapper .dataTables_processing {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(80, 80, 80, 0.85);
    color: #f0f0f0;
    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);
}

    .dataTables_wrapper .dataTables_processing::before {
        content: "";
        display: inline-block;
        width: 1.5rem;
        height: 1.5rem;
        margin-right: 10px;
        border: 0.25em solid #f0f0f0;
        border-top: 0.25em solid #d3f20b;
        border-radius: 50%;
        animation: spin 0.75s linear infinite;
    }

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


