/* Shared pagination: Laravel's custom paginator, Bootstrap pagination and DataTables. */
.pagination-navigation {
    display: flex;
    justify-content: center;
    width: 100%;
    margin: 0 !important;
}

.zPagination-one {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 7px;
    max-width: 100%;
    margin: 0;
    padding: 0;
    list-style: none;
}

.zPagination-one li { margin: 0; padding: 0; }

.zPagination-one li .z-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 11px;
    border: 1px solid var(--theme-border, #e4e7ec);
    border-radius: 12px;
    background: var(--theme-surface, #fff);
    box-shadow: 0 3px 10px rgba(28, 20, 31, .045);
    color: var(--theme-text, #25202a);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none;
    transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.zPagination-one li a.z-link:hover,
.zPagination-one li a.z-link:focus-visible {
    border-color: #c33b91;
    background: rgba(195, 59, 145, .08);
    color: #a31672;
    box-shadow: 0 5px 14px rgba(163, 22, 114, .12);
    transform: translateY(-1px);
}

.zPagination-one li .z-link.active {
    border-color: #a31672;
    background: linear-gradient(135deg, #c13b91, #941569);
    box-shadow: 0 6px 16px rgba(163, 22, 114, .22);
    color: #fff !important;
}

.zPagination-one li .z-link.disabled {
    border-color: var(--theme-border, #e4e7ec);
    background: var(--theme-surface-raised, #f6f5f8);
    box-shadow: none;
    color: var(--theme-muted, #89828d) !important;
    opacity: .62;
}

.zPagination-one li .z-link:focus-visible,
.dataTables_wrapper .dataTables_paginate .paginate_button:focus-visible {
    outline: 3px solid rgba(195, 59, 145, .26);
    outline-offset: 2px;
}

.catalog-pagination { display: flex; justify-content: center; margin-top: 28px; }
.catalog-pagination .pagination-navigation { padding: 0; }

/* Bootstrap-preset views sometimes emit .pagination instead of the shared view. */
html body .pagination { flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 0; }
html body .pagination .page-item { margin: 0; }
html body .pagination .page-link {
    display: grid;
    min-width: 40px;
    min-height: 40px;
    place-items: center;
    padding: 0 11px;
    border: 1px solid var(--theme-border, #e4e7ec);
    border-radius: 12px !important;
    background: var(--theme-surface, #fff);
    box-shadow: 0 3px 10px rgba(28, 20, 31, .045);
    color: var(--theme-text, #25202a);
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
}
html body .pagination .page-link:hover,
html body .pagination .page-link:focus-visible { border-color: #c33b91; background: rgba(195, 59, 145, .08); color: #a31672; }
html body .pagination .page-item.active .page-link { border-color: #a31672; background: #a31672; color: #fff; }
html body .pagination .page-item.disabled .page-link { background: var(--theme-surface-raised, #f6f5f8); color: var(--theme-muted, #89828d); opacity: .62; }

/* DataTables uses anchors and a nested span rather than Bootstrap's markup. */
html body .dataTables_wrapper .dataTables_paginate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    float: none;
    padding: 0;
    text-align: initial;
}
html body .dataTables_wrapper .dataTables_paginate > span { display: flex; flex-wrap: wrap; gap: 6px; }
html body .dataTables_wrapper .dataTables_paginate .paginate_button,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
html.dark body .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html.dark body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    margin: 0 !important;
    padding: 0 10px;
    border: 1px solid var(--theme-border, #e4e7ec) !important;
    border-radius: 11px;
    background: var(--theme-surface, #fff) !important;
    background-image: none !important;
    box-shadow: 0 3px 10px rgba(28, 20, 31, .045) !important;
    color: var(--theme-text, #25202a) !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
}
html body .dataTables_wrapper .dataTables_paginate .paginate_button:not(.disabled):not(.current):hover {
    border-color: #c33b91 !important;
    background: rgba(195, 59, 145, .08) !important;
    background-image: none !important;
    color: #a31672 !important;
}
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    border-color: #a31672 !important;
    background: linear-gradient(135deg, #c13b91, #941569) !important;
    box-shadow: 0 6px 16px rgba(163, 22, 114, .2) !important;
    color: #fff !important;
}
html body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
html body .dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    border-color: var(--theme-border, #e4e7ec) !important;
    background: var(--theme-surface-raised, #f6f5f8) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--theme-muted, #89828d) !important;
    opacity: .62;
}
html body .dataTables_wrapper .dataTables_paginate .ellipsis { padding: 0 2px; color: var(--theme-muted, #89828d); }

/* The responsive members directory renders the shared footer after its card grid. */
html body .alumni-directory .dataTables_paginate {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
    float: none;
    padding: 0;
    text-align: initial;
}
html body .alumni-directory .dataTables_paginate > span { display: flex; flex-wrap: wrap; gap: 6px; }
html body .alumni-directory .dataTables_paginate .paginate_button,
html body .alumni-directory .dataTables_paginate .paginate_button.current,
html body .alumni-directory .dataTables_paginate .paginate_button.current:hover {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    margin: 0 !important;
    padding: 0 10px;
    border: 1px solid var(--theme-border, #e4e7ec) !important;
    border-radius: 11px;
    background: var(--theme-surface, #fff) !important;
    background-image: none !important;
    box-shadow: 0 3px 10px rgba(28, 20, 31, .045) !important;
    color: var(--theme-text, #25202a) !important;
    font-size: 12px;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    text-decoration: none !important;
}
html body .alumni-directory .dataTables_paginate .paginate_button:not(.disabled):not(.current):hover {
    border-color: #c33b91 !important;
    background: rgba(195, 59, 145, .08) !important;
    background-image: none !important;
    color: #a31672 !important;
}
html body .alumni-directory .dataTables_paginate .paginate_button.current,
html body .alumni-directory .dataTables_paginate .paginate_button.current:hover {
    border-color: #a31672 !important;
    background: linear-gradient(135deg, #c13b91, #941569) !important;
    box-shadow: 0 6px 16px rgba(163, 22, 114, .2) !important;
    color: #fff !important;
}
html body .alumni-directory .dataTables_paginate .paginate_button.disabled,
html body .alumni-directory .dataTables_paginate .paginate_button.disabled:hover,
html body .alumni-directory .dataTables_paginate .paginate_button.disabled:active {
    border-color: var(--theme-border, #e4e7ec) !important;
    background: var(--theme-surface-raised, #f6f5f8) !important;
    background-image: none !important;
    box-shadow: none !important;
    color: var(--theme-muted, #89828d) !important;
    opacity: .62;
}
html[data-theme="dark"] body .alumni-directory .dataTables_paginate .paginate_button:not(.disabled):not(.current):hover {
    border-color: #c2308e !important;
    background: rgba(194, 48, 142, .16) !important;
    color: #ff9fd5 !important;
}

html[data-theme="dark"] .zPagination-one li a.z-link:hover,
html[data-theme="dark"] .zPagination-one li a.z-link:focus-visible { background: rgba(242, 138, 201, .12); color: #ff9fd5; }
html[data-theme="dark"] body .pagination .page-link:hover,
html[data-theme="dark"] body .pagination .page-link:focus-visible { background: rgba(242, 138, 201, .12); color: #ff9fd5; }
html[data-theme="dark"] body .dataTables_wrapper .dataTables_paginate .paginate_button:not(.disabled):not(.current):hover {
    border-color: #c2308e !important;
    background: rgba(194, 48, 142, .16) !important;
    color: #ff9fd5 !important;
}

@media (max-width: 767.98px) {
    html body .dataTables_wrapper .dataTables_paginate { justify-content: center; }
    html body .alumni-directory .dataTables_paginate { justify-content: center; }
    .zPagination-one { gap: 5px; }
    .zPagination-one li .z-link,
    html body .pagination .page-link { min-width: 36px; height: 36px; min-height: 36px; border-radius: 10px !important; }
    html body .dataTables_wrapper .dataTables_paginate .paginate_button { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; }
    html body .alumni-directory .dataTables_paginate .paginate_button { min-width: 34px; height: 34px; padding: 0 8px; border-radius: 9px; }
    html body .alumni-directory .dataTables_paginate,
    html body .alumni-directory .dataTables_paginate > span { flex-wrap: nowrap; gap: 4px; }
    html body .alumni-directory .dataTables_paginate .paginate_button,
    html body .alumni-directory .dataTables_paginate .paginate_button.current,
    html body .alumni-directory .dataTables_paginate .paginate_button.current:hover {
        min-width: 30px !important;
        width: 30px;
        height: 32px;
        margin: 0 !important;
        padding: 0 4px;
        border-radius: 9px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .zPagination-one li .z-link { transition: none; }
}
