/* ============================================================================
   PAGER — the one paginator, styled after /support's.

   Six pages had rendered Bootstrap's `.pagination` with their own markup, and
   three of them carried their own "dark mode pagination fix" block on top,
   because Bootstrap's `.page-link` is a fixed white surface that dark mode
   turns into white-on-white. Those three blocks are gone: every colour below
   is a theme token, so the control follows light and dark with no second rule.

   The design is /support's pager (see `support-page.styles.js` — the same
   rules, written there for a shadow root that a global stylesheet cannot
   reach): a range on the left, quiet bordered buttons, and the position on the
   right. Markup comes from `static/js/common/pager.js`.
   ============================================================================ */

.pager {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-top: 0.75rem;
    font-size: 0.85rem;
}

/* "1–20 of 340 jobs". Tabular figures because the numbers change on every
   page and a range that shifts sideways is one nobody can track. */
.pager-range {
    color: rgb(var(--muted-foreground));
    font-variant-numeric: tabular-nums;
}

.pager-nums {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.pager-btn,
.pager-num {
    height: 28px;
    min-width: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.35rem;
    padding: 0 0.5rem;
    border: 1px solid rgb(var(--border));
    border-radius: var(--radius-md);
    background: rgb(var(--card));
    color: rgb(var(--foreground));
    font-size: 0.85rem;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    transition: background 0.12s, border-color 0.12s;
}

.pager-btn:hover:not(:disabled),
.pager-num:hover:not(.is-current) {
    background: rgb(var(--muted));
    border-color: rgb(var(--foreground) / 0.25);
}

/* Disabled is dimmed, not hidden. A Previous button that disappears on page 1
   makes the whole row jump sideways the moment you leave it. */
.pager-btn:disabled {
    color: rgb(var(--muted-foreground));
    cursor: default;
    opacity: 0.55;
}

.pager-num.is-current {
    background: rgb(var(--primary));
    border-color: rgb(var(--primary));
    color: rgb(var(--primary-foreground));
    font-weight: 600;
    cursor: default;
}

/* The elided run. It is not a button and must not look like one. */
.pager-gap {
    padding: 0 0.15rem;
    color: rgb(var(--muted-foreground));
    user-select: none;
}

.pager-right {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    color: rgb(var(--muted-foreground));
}

.pager-size {
    width: auto;
    height: 28px;
    padding-top: 0;
    padding-bottom: 0;
    font-size: 0.8rem;
}

/* Narrow screens: the position and the range are the two things worth keeping
   on one line, so the numbers wrap under them rather than the row scrolling. */
@media (max-width: 640px) {
    .pager-right { margin-left: 0; width: 100%; }
}
