/* ============================================
   Pagers - All Pagination Styles
   ============================================ */

/* Base Styles */
.cpv-view-footer {
    margin-top: 40px;
    clear: both;
}

/* Results Summary (shared) */
.cpv-results-summary {
    text-align: center;
    margin-bottom: 20px;
    font-size: 14px;
    color: #646970;
}

.cpv-results-summary strong {
    color: #1d2327;
    font-weight: 600;
}

/* View All Link (shared) */
.cpv-view-all-link {
    text-align: center;
    margin-top: 20px;
}

.cpv-view-all-link a {
    display: inline-block;
    padding: 10px 20px;
    background: #f0f0f1;
    color: #2271b1;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cpv-view-all-link a:hover {
    background: #2271b1;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(34, 113, 177, 0.3);
}

/* ============================================
   FULL PAGER (Numbered)
   ============================================ */

.cpv-pagination-full {
    display: flex;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}

.cpv-pagination-full .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    background: #f0f0f1;
    color: #2c3338;
    text-decoration: none;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
}

.cpv-pagination-full .page-numbers:hover {
    background: #fff;
    border-color: #2271b1;
    color: #2271b1;
    transform: translateY(-2px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cpv-pagination-full .page-numbers.current {
    background: #2271b1;
    border-color: #2271b1;
    color: #fff;
    cursor: default;
}

.cpv-pagination-full .page-numbers.current:hover {
    transform: none;
    box-shadow: none;
}

.cpv-pagination-full .page-numbers.dots {
    background: transparent;
    border: none;
    cursor: default;
    pointer-events: none;
}

.cpv-pagination-full .page-numbers.dots:hover {
    transform: none;
    box-shadow: none;
}

.cpv-pagination-full .page-numbers.prev,
.cpv-pagination-full .page-numbers.next {
    font-weight: 600;
}

/* ============================================
   SIMPLE PAGER (Prev/Next)
   ============================================ */

.cpv-pagination-simple {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
}

.cpv-pagination-simple a {
    display: inline-flex;
    align-items: center;
    padding: 10px 24px;
    background: #f0f0f1;
    color: #2c3338;
    text-decoration: none;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.cpv-pagination-simple a:hover {
    background: #fff;
    border-color: #2271b1;
    color: #2271b1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.cpv-pagination-simple .cpv-prev:hover {
    transform: translateX(-3px);
}

.cpv-pagination-simple .cpv-next:hover {
    transform: translateX(3px);
}

.cpv-pagination-simple .cpv-page-count {
    font-size: 14px;
    color: #646970;
    font-weight: 500;
    padding: 0 10px;
}

/* ============================================
   LOAD MORE PAGER (AJAX)
   ============================================ */

.cpv-load-more-wrap {
    text-align: center;
    margin-top: 30px;
}

.cpv-load-count {
    font-size: 14px;
    color: #646970;
    margin-bottom: 15px;
}

.cpv-load-count .cpv-loaded-count,
.cpv-load-count .cpv-total-count {
    font-weight: 600;
    color: #2271b1;
}

.cpv-load-more-button {
    display: inline-block;
    padding: 12px 32px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 4px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(34, 113, 177, 0.2);
}

.cpv-load-more-button:hover:not(:disabled) {
    background: #135e96;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(34, 113, 177, 0.3);
}

.cpv-load-more-button:active:not(:disabled) {
    transform: translateY(0);
    box-shadow: 0 1px 2px rgba(34, 113, 177, 0.2);
}

.cpv-load-more-button.loading {
    opacity: 0.7;
    cursor: wait;
    position: relative;
}

.cpv-load-more-button.loading::after {
    content: '';
    position: absolute;
    right: 12px;
    top: 50%;
    width: 16px;
    height: 16px;
    margin-top: -8px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: cpv-spin 0.6s linear infinite;
}

@keyframes cpv-spin {
    to { transform: rotate(360deg); }
}

.cpv-load-more-button:disabled {
    background: #dcdcde;
    color: #a7aaad;
    cursor: not-allowed;
    box-shadow: none;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 768px) {
    /* Full Pager */
    .cpv-pagination-full .page-numbers {
        min-width: 36px;
        height: 36px;
        padding: 0 10px;
        font-size: 13px;
    }
    
    /* Simple Pager */
    .cpv-pagination-simple {
        gap: 10px;
    }
    
    .cpv-pagination-simple a {
        padding: 8px 16px;
        font-size: 13px;
    }
    
    .cpv-pagination-simple .cpv-page-count {
        display: none;
    }
    
    /* Load More */
    .cpv-load-more-button {
        padding: 10px 24px;
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .cpv-view-footer {
        margin-top: 30px;
    }
    
    .cpv-pagination-full .page-numbers {
        min-width: 32px;
        height: 32px;
        font-size: 12px;
    }
    
    .cpv-results-summary {
        font-size: 13px;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.cpv-pagination-full .page-numbers:focus,
.cpv-pagination-simple a:focus,
.cpv-load-more-button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Skip to content link for screen readers */
.cpv-skip-to-content {
    position: absolute;
    left: -9999px;
    z-index: 999;
}

.cpv-skip-to-content:focus {
    left: 0;
    top: 0;
    background: #2271b1;
    color: #fff;
    padding: 10px;
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .cpv-view-footer,
    .cpv-pagination-full,
    .cpv-pagination-simple,
    .cpv-load-more-wrap {
        display: none !important;
    }
}

/* ============================================
   RTL SUPPORT
   ============================================ */

.rtl .cpv-pagination-simple .cpv-prev:hover {
    transform: translateX(3px);
}

.rtl .cpv-pagination-simple .cpv-next:hover {
    transform: translateX(-3px);
}