/* ══════════════════════════════════════════════════════════════
   DuoAppPager — shared pagination component
   ══════════════════════════════════════════════════════════════ */

/* ── Container ─────────────────────────────────────────────── */
.duoapp-pager-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-top: 1px solid #ebebeb;
    background: #fafafa;
    border-radius: 0 0 10px 10px;
    flex-wrap: wrap;
    gap: 10px;
}

/* ── Per-page size selector ────────────────────────────────── */
.duoapp-pager-size {
    display: flex;
    align-items: center;
    gap: 8px;
}

.duoapp-pager-size-label {
    font-size: 12px;
    font-weight: 500;
    color: #999;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    white-space: nowrap;
}

.duoapp-pager-size-pills {
    display: flex;
    gap: 4px;
}

.duoapp-pager-pill {
    padding: 5px 11px;
    border: 1.5px solid #e0e0e0;
    border-radius: 20px;
    background: white;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    color: #555;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
    line-height: 1.2;
}

.duoapp-pager-pill:hover {
    border-color: #003e7e;
    color: #003e7e;
}

.duoapp-pager-pill--active {
    background: #003e7e;
    border-color: #003e7e;
    color: white;
}

.duoapp-pager-pill--active:hover {
    background: #003e7e;
    color: white;
}

/* ── Syncfusion pager spacing ──────────────────────────────── */
.duoapp-pager-sf .e-parentmsgbar {
    padding: 0 12px;
}

/* ── Mobile pager (prev / page X of Y / next) ─────────────── */
.duoapp-pager-mobile {
    display: flex;
    align-items: center;
    gap: 0;
    background: white;
    border: 1.5px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
}

.duoapp-pager-mobile-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: white;
    border: none;
    cursor: pointer;
    color: #003e7e;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}

.duoapp-pager-mobile-btn:active {
    background: #f0f4fa;
}

.duoapp-pager-mobile-btn--disabled {
    color: #ccc;
    cursor: default;
}

.duoapp-pager-mobile-btn--disabled:active {
    background: white;
}

.duoapp-pager-mobile-info {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 0 16px;
    border-left: 1.5px solid #e0e0e0;
    border-right: 1.5px solid #e0e0e0;
    height: 48px;
    min-width: 90px;
    justify-content: center;
}

.duoapp-pager-mobile-current {
    font-size: 16px;
    font-weight: 700;
    color: #003e7e;
    line-height: 1;
}

.duoapp-pager-mobile-sep {
    font-size: 13px;
    color: #aaa;
    margin: 0 1px;
}

.duoapp-pager-mobile-total {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    line-height: 1;
}

/* ── Mobile overrides — card-based redesign ───────────────── */
@media only screen and (max-width: 1023px) {

    /* Pager — inline with content, scrolls normally */
    .duoapp-pager-container {
        position: static;
        z-index: auto;
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px;
        background: #ffffff;
        border-top: 1px solid #E8E9F0;
        border-radius: 0;
        box-shadow: none;
        margin-bottom: 9vh;
    }

    /* Page size — compact horizontal row */
    .duoapp-pager-size {
        flex-direction: row;
        align-items: center;
        gap: 8px;
        flex: 1 1 100%;
        order: 2;
    }

    .duoapp-pager-size-label {
        font-size: 10px;
        font-weight: 600;
        color: #8181A5;
        letter-spacing: 0.05em;
        white-space: nowrap;
    }

    .duoapp-pager-size-pills {
        display: flex;
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
        flex: 1;
    }

    .duoapp-pager-size-pills::-webkit-scrollbar {
        display: none;
    }

    .duoapp-pager-pill {
        padding: 6px 14px;
        font-size: 13px;
        font-weight: 600;
        border-radius: 100px;
        text-align: center;
        border-width: 1.5px;
        border-color: #E8E9F0;
        background: #F7F8FD;
        color: #6B6B8A;
        white-space: nowrap;
        flex-shrink: 0;
        min-height: 34px;
        transition: all 0.15s ease;
    }

    .duoapp-pager-pill:hover {
        border-color: #003e7e;
        color: #003e7e;
    }

    .duoapp-pager-pill--active {
        background: #003e7e;
        border-color: #003e7e;
        color: #ffffff;
        box-shadow: 0 2px 6px rgba(0,62,126,0.2);
    }

    .duoapp-pager-pill--active:hover {
        background: #003e7e;
        color: #ffffff;
    }

    /* Navigation — compact prev/page/next */
    .duoapp-pager-mobile {
        flex: 1 1 100%;
        order: 1;
        justify-content: center;
        border: 1.5px solid #E8E9F0;
        border-radius: 14px;
        background: #ffffff;
        box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    }

    .duoapp-pager-mobile-btn {
        width: 52px;
        height: 48px;
        border-radius: 14px 0 0 14px;
        color: #003e7e;
    }

    .duoapp-pager-mobile-btn:last-child {
        border-radius: 0 14px 14px 0;
    }

    .duoapp-pager-mobile-btn:active {
        background: #F0F4FA;
    }

    .duoapp-pager-mobile-btn--disabled {
        color: #C8C9D8;
    }

    .duoapp-pager-mobile-info {
        flex: 1;
        height: 48px;
        border-left: 1.5px solid #E8E9F0;
        border-right: 1.5px solid #E8E9F0;
        padding: 0 20px;
    }

    .duoapp-pager-mobile-current {
        font-size: 17px;
        font-weight: 700;
        color: #003e7e;
    }

    .duoapp-pager-mobile-sep {
        font-size: 12px;
        color: #8181A5;
        font-weight: 500;
        margin: 0 3px;
    }

    .duoapp-pager-mobile-total {
        font-size: 17px;
        font-weight: 600;
        color: #0F172A;
    }

    /* Hide desktop pager */
    .duoapp-pager-sf {
        display: none;
    }
}
