/**
 * WooCommerce Infinite Scroll - Complete CSS Framework
 */

/* ==========================================================================
   CORE STYLES
   ========================================================================== */

/* Sentinel Element */
.wc-infinite-scroll-sentinel {
    height: 1px !important;
    visibility: hidden !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    background: transparent !important;
    position: relative;
    clear: both;
}

/* Main Container */
.wc-infinite-scroll-container {
    position: relative;
    width: 100%;
    margin: 0 auto;
}

.wc-infinite-scroll-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ==========================================================================
   LOADING STATES
   ========================================================================== */

/* Base Loader Container */
.wc-infinite-scroll-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 3rem 1rem;
    margin: 2rem auto;
    max-width: 600px;
    min-height: 120px;
    transition: all 0.3s ease;
}

.wc-infinite-scroll-loader.loading {
    /*background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);*/
}

/* Loading Content */
.wc-infinite-scroll-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    width: 100%;
}

.wc-infinite-scroll-loading p {
    margin: 0;
    color: #6c757d;
    font-size: 16px;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   ANIMATION TYPES
   ========================================================================== */

/* 1. SPINNER ANIMATION */
.wc-infinite-scroll-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e3e3e3;
    border-top: 4px solid #000000;
    border-radius: 50%;
    animation: wc-spin 1s linear infinite;
}

@keyframes wc-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ==========================================================================
   ERROR HANDLING
   ========================================================================== */

.wc-infinite-scroll-error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    margin-top: 15px;
}

.wc-infinite-scroll-error-content p {
    margin: 0;
    color: #742a2a;
    font-size: 16px;
    font-weight: 500;
    line-height: 1.6;
}

.wc-infinite-scroll-retry-btn {
    background: linear-gradient(135deg, #e53e3e 0%, #c53030 100%);
    color: white;
    padding: .5rem 1rem;
    font-weight: 500;
}

.wc-infinite-scroll-retry-btn:hover {
    background: linear-gradient(135deg, #c53030 0%, #9c2626 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(229, 62, 62, 0.4);
}

.wc-infinite-scroll-retry-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, 0.2);
}

.wc-infinite-scroll-retry-btn:active {
    transform: translateY(0);
}

.wc-infinite-scroll-no-more {
    color: #262626;
    font-style: italic;
    position: relative;
    text-align: center;
    margin-top: 56px;
}

.wc-infinite-scroll-no-more::before {
    content: "✓";
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    background: #09bd5e;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
    text-indent:-2px;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

@media (max-width: 768px) {
    .wc-infinite-scroll-loader {
        padding: 2rem 1rem;
        margin: 1rem;
        min-height: 100px;
    }

    .wc-infinite-scroll-spinner {
        width: 36px;
        height: 36px;
        border-width: 3px;
    }

    .wc-infinite-scroll-loading p {
        font-size: 14px;
    }

    .wc-infinite-scroll-error {
        padding: 2rem 1rem;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .wc-infinite-scroll-loader {
        padding: 1.5rem 0.75rem;
        margin: 0.75rem;
    }

    .wc-infinite-scroll-error {
        padding: 1.5rem 1rem;
        margin: 0.75rem;
    }
}

/* ==========================================================================
   ACCESSIBILITY
   ========================================================================== */

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .wc-infinite-scroll-spinner {
        animation: none;
        border-color: #0073aa;
        border-top-color: transparent;
    }

    .wc-infinite-scroll-skeleton-item::before {
        animation: none;
        background: #e0e0e0;
    }

    .wc-infinite-scroll-dots span {
        animation: none;
    }

    .wc-infinite-scroll-pulse {
        animation: none;
        opacity: 0.8;
    }

    .wc-infinite-scroll-wave span {
        animation: none;
        transform: scaleY(0.6);
    }

    .wc-infinite-scroll-ring div {
        animation: none;
        border-color: #0073aa;
    }

    .wc-infinite-scroll-product,
    .wc-infinite-scroll-product.loaded {
        transition: none;
        opacity: 1;
        transform: none;
    }
}

/* Focus States */
.wc-infinite-scroll-retry-btn:focus-visible {
    outline: 3px solid #4285f4;
    outline-offset: 2px;
}