/* Keep list pagination on one row on narrow screens. DataTables can render
   several page numbers, so only the active number stays visible on mobile. */
@media (max-width: 575.98px) {
    :is(.dt-paging, .dataTables_paginate) {
        width: 100%;
        min-width: 0;
        overflow: visible;
    }

    :is(.dt-paging, .dataTables_paginate) .pagination,
    .dt-paging > nav {
        display: flex !important;
        flex-flow: row nowrap !important;
        align-items: center !important;
        justify-content: center !important;
        gap: 6px !important;
        width: 100%;
        max-width: 100%;
        margin: 12px 0 0 !important;
        padding: 0 !important;
        overflow: visible;
    }

    :is(.dt-paging, .dataTables_paginate) .pagination > .page-item {
        flex: 0 0 40px !important;
        width: 40px;
        margin: 0 !important;
    }

    :is(.dt-paging, .dataTables_paginate) .pagination > .page-item:not(:first-child):not(:nth-child(2)):not(:nth-last-child(2)):not(:last-child):not(.active),
    .dt-paging > nav > .dt-paging-button:not(:first-child):not(:nth-child(2)):not(:nth-last-child(2)):not(:last-child):not(.current),
    .dt-paging > nav > .ellipsis {
        display: none !important;
    }

    :is(.dt-paging, .dataTables_paginate) .pagination > .page-item .page-link,
    .dt-paging > nav > .dt-paging-button {
        box-sizing: border-box;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 40px !important;
        min-width: 40px;
        height: 40px !important;
        margin: 0 !important;
        padding: 0 !important;
        font-size: 14px;
        line-height: 1;
        white-space: nowrap;
    }
}
