/**
 * Add any custom CSS here.
 *
 * This file will be loaded after all other theme stylesheets.
 */

/* Hide order received page content initially to prevent flash */
body.woocommerce-order-received .woocommerce-order,
body.woocommerce-order-received .woocommerce-order-received,
body.woocommerce-order-received .entry-content {
    opacity: 0;
    transition: opacity 0.3s ease-in;
}

/* Show content when loader is removed */
body.woocommerce-order-received.loader-removed .woocommerce-order,
body.woocommerce-order-received.loader-removed .woocommerce-order-received,
body.woocommerce-order-received.loader-removed .entry-content {
    opacity: 1;
}

/* Checkout loading animation styles */
#checkout-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#checkout-loader img {
    max-width: 200px;
    max-height: 150px;
    margin-bottom: 30px;
}

.checkout-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #3498db;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: checkout-spin 1s linear infinite;
    margin-bottom: 30px;
}

.checkout-loading-message {
    margin: 0;
    font-size: 16px;
    color: #999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    text-align: center;
    padding: 0 20px;
    max-width: 600px;
    animation: checkout-pulse 1.5s ease-in-out infinite;
    font-weight: 500;
    letter-spacing: 0.5px;
}

@keyframes checkout-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes checkout-pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

body.checkout-loading {
    overflow: hidden;
}

/* Responsive styles */
@media (max-width: 768px) {
    #checkout-loader img {
        max-width: 150px;
        max-height: 100px;
        margin-bottom: 20px;
    }

    .checkout-loading-message {
        font-size: 14px;
        padding: 0 15px;
    }

    .checkout-spinner {
        width: 40px;
        height: 40px;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .checkout-loading-message {
        font-size: 12px;
        max-width: 90%;
    }
}
