/*
 * DataTables pagination + info — list style (light active cell, plain numbers).
 * Load after: theme-default, datatables.bootstrap5, jquery.dataTables.
 * Covers classic `.paginate_button` and Bootstrap 5 `ul.pagination .page-link`.
 */

.dataTables_wrapper .dataTables_info,
.app-data-ui .dataTables_wrapper .dataTables_info {
    padding-top: 0.65rem;
    font-size: 0.8125rem;
    color: #64748b;
}

.dataTables_wrapper .dataTables_paginate,
.app-data-ui .dataTables_wrapper .dataTables_paginate {
    padding-top: 0.65rem;
}

/* ==========================================================================
   1. Reset <li> containers in Bootstrap / DataTables pagination
   (Eliminates double padding, ghost outer box, and excessive width)
   ========================================================================== */
div.dataTables_wrapper div.dataTables_paginate ul.pagination li,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.paginate_button,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.page-item,
.dataTables_wrapper .pagination li,
.app-data-ui .pagination li,
.card-datatable .pagination li,
ul.pagination li {
    box-sizing: border-box !important;
    padding: 0 !important;
    margin: 0 !important;
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    border-radius: 0 !important;
    min-width: 0 !important;
    box-shadow: none !important;
    list-style: none !important;
}

div.dataTables_wrapper div.dataTables_paginate ul.pagination li.paginate_button.current,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.paginate_button.active,
div.dataTables_wrapper div.dataTables_paginate ul.pagination li.paginate_button.disabled,
ul.pagination li.paginate_button.current,
ul.pagination li.paginate_button.active,
ul.pagination li.paginate_button.disabled,
ul.pagination li.page-item.active,
ul.pagination li.page-item.disabled {
    background: transparent !important;
    background-image: none !important;
    border: none !important;
    box-shadow: none !important;
}

/* ==========================================================================
   2. Container Layout
   ========================================================================== */
div.dataTables_wrapper div.dataTables_paginate ul.pagination,
.dataTables_wrapper .pagination,
.app-data-ui .pagination,
.card-datatable .pagination,
ul.pagination {
    display: inline-flex !important;
    gap: 0.15rem !important;
    flex-wrap: wrap !important;
    margin-bottom: 0 !important;
    align-items: center !important;
    padding-left: 0 !important;
}

/* ==========================================================================
   3. Page Links & Action Items (Base Style)
   ========================================================================== */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-link,
.dataTables_wrapper .pagination .page-link,
.app-data-ui .pagination .page-link,
.card-datatable .pagination .page-link,
ul.pagination .page-link,
.pagination li a,
.pagination li span,
div.dataTables_wrapper div.dataTables_paginate > .paginate_button:not(li) {
    box-sizing: border-box !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 0.8125rem !important;
    font-weight: 500 !important;
    min-width: 1.85rem !important;
    padding: 0.32rem 0.5rem !important;
    line-height: 1.25 !important;
    border-radius: 0.35rem !important;
    color: #334155 !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 1px solid transparent !important;
    box-shadow: none !important;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease !important;
    cursor: pointer !important;
}

/* Previous / Next specific sizing (text without forced min-width) */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.previous .page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.next .page-link,
.pagination .page-item:first-child .page-link,
.pagination .page-item:last-child .page-link,
div.dataTables_wrapper div.dataTables_paginate > .paginate_button.previous,
div.dataTables_wrapper div.dataTables_paginate > .paginate_button.next {
    min-width: auto !important;
    padding: 0.32rem 0.45rem !important;
}

/* ==========================================================================
   4. Inactive / Hover States
   ========================================================================== */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item:not(.active):not(.disabled) .page-link:hover,
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item:not(.active):not(.disabled) .page-link:focus,
.dataTables_wrapper .pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.dataTables_wrapper .pagination .page-item:not(.active):not(.disabled) .page-link:focus,
.app-data-ui .pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.app-data-ui .pagination .page-item:not(.active):not(.disabled) .page-link:focus,
.card-datatable .pagination .page-item:not(.active):not(.disabled) .page-link:hover,
.card-datatable .pagination .page-item:not(.active):not(.disabled) .page-link:focus,
ul.pagination .page-item:not(.active):not(.disabled) .page-link:hover,
ul.pagination .page-item:not(.active):not(.disabled) .page-link:focus,
.pagination li:not(.active):not(.disabled) a:hover,
div.dataTables_wrapper div.dataTables_paginate > .paginate_button:hover:not(.disabled):not(.current) {
    color: #0f172a !important;
    background-color: #f1f5f9 !important;
    border-color: transparent !important;
    box-shadow: none !important;
}

/* ==========================================================================
   5. Active / Current Page State (Light blue rounded box)
   ========================================================================== */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link:hover,
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.active .page-link:focus,
.dataTables_wrapper .pagination .page-item.active .page-link,
.dataTables_wrapper .pagination .page-item.active .page-link:hover,
.dataTables_wrapper .pagination .page-item.active .page-link:focus,
.app-data-ui .pagination .page-item.active .page-link,
.app-data-ui .pagination .page-item.active .page-link:hover,
.app-data-ui .pagination .page-item.active .page-link:focus,
.card-datatable .pagination .page-item.active .page-link,
.card-datatable .pagination .page-item.active .page-link:hover,
.card-datatable .pagination .page-item.active .page-link:focus,
ul.pagination .page-item.active .page-link,
ul.pagination .page-item.active .page-link:hover,
ul.pagination .page-item.active .page-link:focus,
.pagination li.active a,
.pagination li.active span,
div.dataTables_wrapper div.dataTables_paginate > .paginate_button.current,
div.dataTables_wrapper div.dataTables_paginate > .paginate_button.current:hover {
    color: #3d4f8f !important;
    background-color: #e8efff !important;
    background-image: none !important;
    border: 1px solid #c5d4f5 !important;
    border-color: #c5d4f5 !important;
    border-radius: 0.35rem !important;
    box-shadow: none !important;
}

/* ==========================================================================
   6. Disabled State
   ========================================================================== */
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.disabled .page-link,
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.disabled .page-link:hover,
div.dataTables_wrapper div.dataTables_paginate ul.pagination .page-item.disabled .page-link:focus,
.dataTables_wrapper .pagination .page-item.disabled .page-link,
.dataTables_wrapper .pagination .page-item.disabled .page-link:hover,
.dataTables_wrapper .pagination .page-item.disabled .page-link:focus,
.app-data-ui .pagination .page-item.disabled .page-link,
.app-data-ui .pagination .page-item.disabled .page-link:hover,
.app-data-ui .pagination .page-item.disabled .page-link:focus,
.card-datatable .pagination .page-item.disabled .page-link,
.card-datatable .pagination .page-item.disabled .page-link:hover,
.card-datatable .pagination .page-item.disabled .page-link:focus,
ul.pagination .page-item.disabled .page-link,
ul.pagination .page-item.disabled .page-link:hover,
ul.pagination .page-item.disabled .page-link:focus,
.pagination li.disabled a,
.pagination li.disabled span,
div.dataTables_wrapper div.dataTables_paginate > .paginate_button.disabled,
div.dataTables_wrapper div.dataTables_paginate > .paginate_button.disabled:hover,
div.dataTables_wrapper div.dataTables_paginate > .paginate_button.disabled:active {
    color: #94a3b8 !important;
    background-color: transparent !important;
    background-image: none !important;
    border: 1px solid transparent !important;
    border-color: transparent !important;
    box-shadow: none !important;
    opacity: 1 !important;
    cursor: default !important;
}

/* ==========================================================================
   7. Ellipsis (...)
   ========================================================================== */
.dataTables_wrapper .dataTables_paginate .ellipsis,
.pagination .page-item.disabled span.page-link:not([aria-disabled="true"]) {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 1.25rem !important;
    padding: 0.32rem 0.2rem !important;
    color: #64748b !important;
    background: transparent !important;
    border: none !important;
}
