/* Shared Laravel and DataTables pagination for every dashboard. */
nav[role="navigation"] {
    max-width: 100%;
}

nav[role="navigation"] .pagination,
.dataTables_wrapper .dataTables_paginate .pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    max-width: 100%;
    margin: 1rem 0 0;
    padding: 0;
    list-style: none;
}

.pagination .page-item {
    flex: 0 0 auto;
    margin: 0 !important;
}

.pagination .page-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto !important;
    min-width: 2.25rem;
    height: 2.25rem;
    min-height: 2.25rem;
    padding: 0.35rem 0.65rem;
    border: 1px solid #dbe3ec;
    border-radius: 0.55rem !important;
    color: #40558f;
    background: #fff;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: none;
}

.pagination .page-link:hover,
.pagination .page-link:focus {
    z-index: 2;
    color: #fff;
    border-color: #40558f;
    background: #40558f;
    box-shadow: 0 0.25rem 0.65rem rgba(64, 85, 143, 0.2);
}

.pagination .page-item.active .page-link {
    z-index: 3;
    color: #fff;
    border-color: #40558f;
    background: #40558f;
}

.pagination .page-item.disabled .page-link {
    color: #98a2b3;
    border-color: #e7ebf0;
    background: #f6f8fa;
    opacity: 0.75;
    pointer-events: none;
}

/* Prevent unstyled Tailwind paginator icons from ever filling the page. */
.pagination .page-link svg,
nav[role="navigation"] svg {
    display: inline-block !important;
    flex: 0 0 1rem;
    width: 1rem !important;
    min-width: 1rem !important;
    max-width: 1rem !important;
    height: 1rem !important;
    min-height: 1rem !important;
    max-height: 1rem !important;
}

.dataTables_wrapper .dataTables_paginate {
    max-width: 100%;
    padding-top: 0.75rem;
    overflow: visible;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    width: auto !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

html[dir="rtl"] nav[role="navigation"] .pagination,
html[dir="rtl"] .dataTables_wrapper .dataTables_paginate .pagination {
    direction: rtl;
}

html[dir="ltr"] nav[role="navigation"] .pagination,
html[dir="ltr"] .dataTables_wrapper .dataTables_paginate .pagination {
    direction: ltr;
}

@media (max-width: 575.98px) {
    nav[role="navigation"] .pagination,
    .dataTables_wrapper .dataTables_paginate .pagination {
        gap: 0.25rem;
    }

    .pagination .page-link {
        min-width: 2rem;
        height: 2rem;
        min-height: 2rem;
        padding: 0.25rem 0.5rem;
        font-size: 0.8125rem;
    }
}
