:root {
    --dt-row-selected: 232, 237, 255; /* Selected row background RGB color */
    --dt-row-selected-text: 255, 255, 255; /* Selected row text color */
    --dt-row-selected-link: 9, 10, 11; /* Link color in selected row */
    --dt-row-stripe: 0, 0, 0; /* Stripe row base color */
    --dt-row-hover: 0, 0, 0; /* Hover row base color */
    --dt-processing: 231, 29, 114;
    --dt-column-ordering: 0, 0, 0; /* Column ordering indicator color */
    --dt-header-align-items: center; /* Header vertical alignment */
    --dt-html-background: white; /* Background color for light mode */
    --dt-row-hover-alpha: 0.035; /* Hover row transparency */
    --dt-row-stripe-alpha: 0.023; /* Stripe row transparency */
    --dt-column-ordering-alpha: 0.019; /* Column ordering transparency */
    --dt-row-selected-stripe-alpha: 0.923; /* Transparency for selected striped row */
    --dt-row-selected-column-ordering-alpha: 0.919; /* Transparency for selected column ordering */
}

/* =====================================================
   Processing loader (appears when loading data)
===================================================== */
div.dt-processing {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200px;
    margin-left: -100px;
    margin-top: -22px;
    text-align: center;
    padding: 2px;
    z-index: 10; /* Display above other elements */
}

div.dt-processing > div:last-child {
    position: relative;
    width: 80px;
    height: 15px;
    margin: 1em auto;
}

div.dt-processing > div:last-child > div {
    position: absolute;
    top: 0;
    width: 13px;
    height: 13px;
    border-radius: 50%; /* Circular shape */
    background: rgb(var(--dt-processing)); /* Ball color */
    animation-timing-function: cubic-bezier(0, 1, 1, 0); /* Smooth animation */
}

/* Loader ball animations */
div.dt-processing > div:last-child > div:nth-child(1) {
    left: 8px;
    animation: datatables-loader-1 0.6s infinite;
}

div.dt-processing > div:last-child > div:nth-child(2),
div.dt-processing > div:last-child > div:nth-child(3) {
    left: 8px;
    animation: datatables-loader-2 0.6s infinite;
}

div.dt-processing > div:last-child > div:nth-child(3) {
    left: 32px;
}

div.dt-processing > div:last-child > div:nth-child(4) {
    left: 56px;
    animation: datatables-loader-3 0.6s infinite;
}

/* Loader keyframes (animation steps) */
@keyframes datatables-loader-1 {
    0% {
        transform: scale(0);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes datatables-loader-2 {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(24px, 0);
    }
}

@keyframes datatables-loader-3 {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(0);
    }
}

/* =====================================================
   Base DataTable structure and formatting
===================================================== */
table.dataTable {
    width: 100%; /* Full width table */
    margin: 0 auto; /* Centered horizontally */
    border-spacing: 0; /* Remove space between cells */
}

table.dataTable thead th,
table.dataTable tfoot th {
    font-weight: bold; /* Bold header/footer text */
}

/* Header cell styles */
table.dataTable > thead > tr > th,
table.dataTable > thead > tr > td {
    padding: 10px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.3); /* Line below headers */
}

table.dataTable > thead > tr > th:active,
table.dataTable > thead > tr > td:active {
    outline: none; /* Remove default focus outline */
}

/* Footer cell styles */
table.dataTable > tfoot > tr > th,
table.dataTable > tfoot > tr > td {
    border-top: 1px solid rgba(0, 0, 0, 0.3);
    padding: 10px 10px 6px;
}

/* Body rows */
table.dataTable > tbody > tr {
    background-color: transparent;
}

table.dataTable > tbody > tr:first-child > * {
    border-top: none;
}

table.dataTable > tbody > tr:last-child > * {
    border-bottom: none;
}

/* Selected row appearance */
table.dataTable > tbody > tr.selected > * {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 0.9);
    color: rgb(var(--dt-row-selected-text));
    border-top: 2px solid #0063CB;
    border-bottom: 2px solid #0063CB;
}

table.dataTable > tbody > tr.selected > *:first-child {
    border-left: 2px solid #0063CB;
}

table.dataTable > tbody > tr.selected > *:last-child {
    border-right: 2px solid #0063CB;
}

table.dataTable > tbody > tr.selected a {
    color: rgb(var(--dt-row-selected-link)); /* Link color in selected row */
}

/* Cell padding */
table.dataTable > tbody > tr > th,
table.dataTable > tbody > tr > td {
    padding: 8px 10px;
}

/* =====================================================
   Optional table styles (borders, striping, hover)
===================================================== */

/* Zebra striping (odd rows only) */
table.dataTable.stripe > tbody > tr:nth-child(odd) > *,
table.dataTable.display > tbody > tr:nth-child(odd) > * {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-stripe), var(--dt-row-stripe-alpha));
}

/* Zebra + selected */
table.dataTable.stripe > tbody > tr:nth-child(odd).selected > *,
table.dataTable.display > tbody > tr:nth-child(odd).selected > * {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), var(--dt-row-selected-stripe-alpha));
}

/* Row hover effect */
table.dataTable.hover > tbody > tr:hover > *,
table.dataTable.display > tbody > tr:hover > * {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-hover), var(--dt-row-hover-alpha));
}

/* Hover effect for already selected row */
table.dataTable.hover > tbody > tr.selected:hover > *,
table.dataTable.display > tbody > tr.selected:hover > * {
    box-shadow: inset 0 0 0 9999px rgba(var(--dt-row-selected), 1) !important;
}

table.dataTable thead th,
table.dataTable tbody td {
    color: inherit !important;
    border-bottom: 1px solid var(--Gray-200, #E4E7EC);
!important;
    border-top: 1px solid var(--Gray-200, #E4E7EC);
!important;
}

/* =====================================================
   pagination
===================================================== */

.dt-paging {
    .dt-paging-button {
        background-color: white;
        min-width: 40px;
        height: 40px;
        border: 1px solid #e5e5e5;
    }

    .first {
        display: none;
    }

    .last {
        display: none;
    }

    .next {
        text-indent: -9999px;
        background-image: url("/components/com_primoacces/assets/svg/pictograms/right_arrow2.svg");
        background-size: 35%;
        background-repeat: no-repeat;
        background-position: center;
        display: inline-block;
        width: 52px;
        height: 40px;
        border: 1px solid #e5e5e5;
        border-top-right-radius: 10px;
        border-bottom-right-radius: 10px;
    }

    .previous {
        text-indent: -9999px;
        background-image: url("/components/com_primoacces/assets/svg/pictograms/left_arrow.svg");
        background-size: 35%;
        background-repeat: no-repeat;
        background-position: center;
        display: inline-block;
        width: 52px;
        height: 40px;
        border: 1px solid #e5e5e5;
        border-top-left-radius: 10px;
        border-bottom-left-radius: 10px;
    }

    .current {
        background-color: #1a2341;
        color: white;
    }

    .ellipsis {
        position: relative;
        margin-right: 1rem;
        margin-left: 1rem;
    }

    .dt-layout-row {
        margin-top: 1rem;
    }
}

.dt-paging {
    display: flex;
    padding: 0.75rem 1.5rem 1rem 1.5rem;
    justify-content: center;
    align-items: center;
    align-self: stretch;
}

/* =====================================================
   search bar
===================================================== */

#dt-search-0,
#dt-search-1,
#dt-search-2,
#dt-search-3,
#dt-search-4,
#dt-search-5,
#dt-search-6,
#dt-search-7 {
    margin-left: 0;
    margin-right: 0;
    width: calc(100% - 1rem);
    border-radius: 4px;
    background-color: #fff;
    border: 2px solid #e5e5e5;
    box-sizing: border-box;
    height: 40px;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    font-size: 14px;
    color: #333334;
    z-index: 13;
    top: 25px;
}
