/* WooCommerce Flexible Checkout Engine - Checkout Loading Effects */

/* Loading Overlay */
.wfce-checkout-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(2px);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    animation: wfce-fade-in 0.2s ease-out;
}

.wfce-checkout-loading-overlay.active {
    display: flex;
}

@keyframes wfce-fade-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Loading Spinner Container */
.wfce-loader-container {
    text-align: center;
    padding: 30px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    min-width: 200px;
}

/* Spinner Animation */
.wfce-spinner {
    width: 50px;
    height: 50px;
    margin: 0 auto 16px;
    border: 4px solid #f3f4f6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: wfce-spin 0.8s linear infinite;
}

@keyframes wfce-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

/* Loading Text */
.wfce-loader-text {
    font-size: 14px;
    font-weight: 500;
    color: #4a5568;
    margin: 0;
}

/* ============================================
   SECTION-SPECIFIC LOADING EFFECTS - DISABLED
   Only main overlay is used for cleaner UX
   ============================================ */

/* Skeleton Lines Animation */
.wfce-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: wfce-skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 4px;
    height: 20px;
    margin-bottom: 10px;
}

@keyframes wfce-skeleton-loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

.wfce-skeleton.short {
    width: 60%;
}

.wfce-skeleton.medium {
    width: 80%;
}

.wfce-skeleton.long {
    width: 100%;
}

/* Payment Methods Skeleton */
.wfce-updating ul.payment_methods li {
    opacity: 0.5;
    animation: wfce-pulse 1.5s ease-in-out infinite;
}

@keyframes wfce-pulse {

    0%,
    100% {
        opacity: 0.5;
    }

    50% {
        opacity: 0.3;
    }
}

/* Alternative: Shimmer Effect */
.wfce-shimmer {
    position: relative;
    overflow: hidden;
}

.wfce-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: wfce-shimmer 1.5s infinite;
}

@keyframes wfce-shimmer {
    0% {
        left: -100%;
    }

    100% {
        left: 100%;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .wfce-loader-container {
        min-width: 160px;
        padding: 24px;
    }

    .wfce-spinner {
        width: 40px;
        height: 40px;
    }

    .wfce-loader-text {
        font-size: 13px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .wfce-checkout-loading-overlay {
        background: rgba(0, 0, 0, 0.7);
    }

    .wfce-loader-container {
        background: #1a202c;
        box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    }

    .wfce-spinner {
        border-color: #2d3748;
        border-top-color: #667eea;
    }

    .wfce-loader-text {
        color: #e2e8f0;
    }

    .wfce-skeleton {
        background: linear-gradient(90deg, #2d3748 25%, #4a5568 50%, #2d3748 75%);
        background-size: 200% 100%;
    }
}