.bv-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    justify-content: center;
    margin-top: 32px;
}

/* CB-6 §5.4: the server-rendered pager uses <a> links; same look as the script's buttons. */
.bv-pagination button,
.bv-pagination a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 44px;
    min-height: 44px;
    padding: 0 12px;
    border-radius: var(--bv-radius-sm);
    border: 1px solid var(--bv-border);
    background: var(--bv-surface);
    color: var(--bv-text);
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.bv-pagination button.is-active,
.bv-pagination a.is-active {
    background: var(--bv-primary);
    border-color: var(--bv-primary);
    color: #fff;
}

.bv-pagination button:hover:not(.is-active):not(:disabled),
.bv-pagination a:hover:not(.is-active) {
    border-color: var(--bv-primary);
    color: var(--bv-primary-dark);
}

.bv-pagination button:focus-visible,
.bv-pagination a:focus-visible {
    outline: 2px solid var(--bv-primary);
    outline-offset: 2px;
}

.bv-pagination button:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.bv-pagination__gap {
    min-width: 20px;
    text-align: center;
    color: var(--bv-text-muted);
}

/* Doc 47 D-47-5: numbers on wide screens, "Trang x / y" between the arrows on phones. */
.bv-pagination__status {
    display: none;
    color: var(--bv-text-muted);
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

@media (max-width: 639px) {
    .bv-pagination {
        flex-wrap: nowrap;
        gap: 12px;
    }

    .bv-pagination__page,
    .bv-pagination__gap,
    .bv-pagination__step-label {
        display: none;
    }

    .bv-pagination button.bv-pagination__page,
    .bv-pagination a.bv-pagination__page {
        display: none;
    }

    .bv-pagination__status {
        display: inline;
    }
}
