.paginationContainer {
    display: flex;
    align-items: center;
    justify-content: center;
}
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    row-gap: 8px;
}
/* Let the page numbers flow in the SAME wrap context as the prev/next arrows.
   Without this the numbers sit in their own nested flex box, so on a narrow
   phone that box grows to full width and bumps the arrows onto separate lines
   (prev above, next below). display: contents dissolves the box: everything
   wraps together as "‹ 1 2 3 … 14 ›" onto tidy centered rows, arrows in flow. */
.paginationElements {
    display: contents;
}
.pageItem {
    margin: 0 5px;
}
.pageLink {
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--color-text-third);
    text-decoration: none;
    padding: 5px 10px;
    height: 34px;
    min-width: 36px;
    border-radius: 10px;
    border: 1px solid var(--color-border);
    background-color: var(--color-bg-alt);
}
.pageItem.active .pageLink {
    border-color: var(--color-border-secondary);
}
.pageItem.pass {
    display: flex;
    align-items: center;
    color: var(--color-text-third);
}

/* Phones: tighten the cells so more fit per row and the wrap stays compact. */
@media (max-width: 480px) {
    .pageItem {
        margin: 0 3px;
    }
    .pageLink {
        height: 32px;
        min-width: 32px;
        padding: 4px 8px;
    }
}
