/* Pager under the Top Buys list (js/top-buys-loader.js) */
.feed-footer {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.25rem;
    min-height: 4rem;
    margin: 0.5rem 0 1.5rem;
    color: #64748b;
    font-weight: 600;
    font-size: 0.95rem;
}
.feed-footer--end {
    color: #94a3b8;
    font-weight: 500;
}
.feed-footer--error {
    color: #8a1f17;
}
.feed-footer-btn {
    padding: 0.5rem 1.25rem;
    border-radius: 8px;
    border: 2px solid currentColor;
    background: #fff;
    color: #667eea;
    font-weight: 600;
    cursor: pointer;
}
.feed-footer--error .feed-footer-btn {
    color: #8a1f17;
}
.feed-footer-spinner {
    width: 22px;
    height: 22px;
    border: 3px solid #e2e8f0;
    border-top-color: var(--brand, #667eea);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
/* Prev / page numbers / Next */
.feed-pager {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 0.35rem;
}
.feed-pager .pagination-btn {
    min-width: 2.5rem;
}
.feed-pager-gap {
    padding: 0 0.25rem;
    color: #94a3b8;
}
/* While the next page loads: fade the current one under a spinner. */
#cardsView {
    position: relative;
}
#cardsView.is-loading > * {
    opacity: 0.35;
    pointer-events: none;
    transition: opacity 0.15s;
}
#cardsView.is-loading::after {
    content: "";
    position: absolute;
    top: 3rem;
    left: 50%;
    width: 36px;
    height: 36px;
    margin-left: -18px;
    border: 4px solid #e2e8f0;
    border-top-color: var(--brand, #667eea);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}
@media (max-width: 600px) {
    .feed-pager .pagination-btn {
        flex: 0 0 auto;
        min-width: 2.25rem;
        padding: 0.45rem 0.6rem;
    }
}
@keyframes spin {
    to { transform: rotate(360deg); }
}
/* Long lists: let the browser skip drawing cards that are far off screen. */
#cardsView .opportunity-card {
    content-visibility: auto;
    contain-intrinsic-size: auto 190px;
}
