const paginationStyles = document.createElement("style");
paginationStyles.textContent = `
    .pagination-container {
        margin-top: 1.5rem;
        border-top: 1px solid #e9ecef;
        padding-top: 1rem;
    }
    .pagination-ellipsis {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        height: 31px;
        width: 31px;
        padding: 0 5px;
        color: var(--bs-secondary);
        font-weight: bold;
    }
    .btn.disabled {
        cursor: not-allowed;
        opacity: 0.65;
    }
    .pagination-container .btn {
        min-width: 32px;
        height: 32px;
        padding: 0.25rem 0.5rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .pagination-container .btn.btn-primary {
        font-weight: 600;
    }
`;
document.head.appendChild(paginationStyles);

// Make pagination function available globally
window.changePage = function (page) {
    const url = new URL(window.location);
    url.searchParams.set("page", page);
    window.location = url.toString();
};
