/* Shared list pagination keeps navigation identical across every overview. */
.list-pagination {
    box-sizing: border-box;
    container-type: inline-size;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-width: 0;
    min-height: 50px;
    padding: 8px 16px;
    background: var(--surface);
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.list-pagination-top {
    justify-content: flex-end;
    border-bottom: 1px solid var(--border);
}

.list-pagination-bottom {
    border-top: 1px solid var(--border);
}

.list-pagination-controls {
    display: inline-flex;
    max-width: 100%;
    min-width: 0;
    align-items: stretch;
    overflow: hidden;
    border: 1px solid var(--border-strong);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 1px 2px color-mix(in srgb, var(--shadow-ink) 5%, transparent);
}

.list-pagination-button,
.list-pagination-summary {
    display: inline-flex;
    box-sizing: border-box;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-left: 1px solid var(--border);
}

.list-pagination-button:first-child {
    border-left: 0;
}

.list-pagination-button {
    width: 36px;
    color: var(--text-strong);
    font-size: 17px;
    line-height: 1;
    text-decoration: none;
    transition: background .15s ease, color .15s ease;
}

/* In-place controls keep link geometry without generic action-button movement or shadows. */
button.list-pagination-button {
    padding: 0;
    border-radius: 0;
    background: var(--surface);
    box-shadow: none;
    transform: none;
}

:is(a, button).list-pagination-button:hover,
:is(a, button).list-pagination-button:focus-visible {
    background: var(--hover-surface);
    color: var(--link);
    outline: none;
}

.list-pagination-summary {
    min-width: 112px;
    padding: 0 13px;
    color: var(--muted);
    font-size: 11.5px;
    white-space: nowrap;
}

.list-pagination-button.is-disabled {
    background: var(--surface-subtle);
    color: var(--text-subtle);
    pointer-events: none;
}

/* Narrow containers keep every page control reachable beneath the complete page count. */
@container (max-width: 270px) {
    .list-pagination-controls {
        display: grid;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: 100%;
    }

    .list-pagination-summary {
        grid-column: 1 / -1;
        grid-row: 1;
        min-width: 0;
        border-left: 0;
        border-bottom: 1px solid var(--border);
    }

    .list-pagination-button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 600px) {
    .list-pagination {
        justify-content: center;
        min-height: 46px;
        padding: 6px 10px;
    }
}
