/* ============================================================================
   pagination.css — numbered pagination component.
   Paired with paginationRender() in includes/pagination.php.
   ============================================================================ */

.aa-pagination {
    margin: 40px 0 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.aa-pagination .aa-pg__list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    align-items: center;
}

.aa-pagination .aa-pg__item {
    display: flex;
    align-items: stretch;
}

.aa-pagination .aa-pg__link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 38px;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #e2dff0;
    border-radius: 8px;
    background: #fff;
    color: #604580;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    user-select: none;
}

.aa-pagination .aa-pg__link:hover {
    background: #faf5ff;
    border-color: #a27dcb;
    color: #4f3669;
}

.aa-pagination .aa-pg__link:focus-visible {
    outline: 2px solid #a27dcb;
    outline-offset: 2px;
}

/* Current page chip */
.aa-pagination .aa-pg__current {
    background: #604580;
    color: #fff;
    border-color: #604580;
    cursor: default;
}
.aa-pagination .aa-pg__current:hover { background: #604580; color: #fff; }

/* Disabled prev/next when on first/last */
.aa-pagination .aa-pg__disabled {
    color: #c9c4d5;
    background: #f8f6fb;
    border-color: #ece4f7;
    cursor: not-allowed;
}
.aa-pagination .aa-pg__disabled:hover { background: #f8f6fb; border-color: #ece4f7; color: #c9c4d5; }

/* Wider prev/next buttons */
.aa-pagination .aa-pg__nav {
    padding: 0 16px;
}

/* "…" gap entry */
.aa-pagination .aa-pg__gap {
    color: #a27dcb;
    padding: 0 4px;
    user-select: none;
    align-self: center;
    font-weight: 700;
}

/* Summary line ("Page 2 of 7") */
.aa-pagination .aa-pg__summary {
    font-size: 12px;
    color: #888;
}

/* Mobile — hide non-current numbered links, keep prev/next/current visible */
@media (max-width: 540px) {
    .aa-pagination .aa-pg__link { min-width: 36px; height: 36px; padding: 0 10px; }
    /* On phones we keep prev, current, next, gap; hide other numbered links */
    .aa-pagination .aa-pg__item .aa-pg__link:not(.aa-pg__nav):not(.aa-pg__current) {
        display: none;
    }
    .aa-pagination .aa-pg__gap { display: none; }
}
