/**
 * AboveWP Page Loader CSS
 */

#abovewp-page-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.5s ease-in-out, visibility 0.5s ease-in-out;
}

#abovewp-page-loader.hidden {
    opacity: 0;
    visibility: hidden;
}

.loader-content {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.loader-spinner {
    width: 60px;
    height: 60px;
    margin-bottom: 20px;
    border: 3px solid rgba(0, 115, 170, 0.2);
    border-top-color: #0073aa; /* Default color, will be overridden by JS */
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
}

/* Animation container for SVG and custom images */
.loader-animation {
    width: 150px; /* Default size, will be overridden by inline CSS */
    height: 150px; /* Default size, will be overridden by inline CSS */
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* SVG and Image animations */
.svg-animation img,
.image-animation img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Add rotation animation for SVG if needed */
.svg-animation.rotate img {
    animation: spin 2s linear infinite;
}

/* Add pulse animation for images if needed */
.image-animation.pulse img {
    animation: pulse 2s ease-in-out infinite;
}

.loader-logo {
    max-width: 200px;
    margin: 0 auto;
}

.loader-logo img {
    max-width: 100%;
    height: auto;
}

.loader-logo h2 {
    font-size: 24px;
    color: #333;
    font-weight: 600;
    margin: 0;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .loader-spinner {
        width: 50px;
        height: 50px;
    }
    
    .loader-animation {
        width: 120px;
        height: 120px;
    }
    
    .loader-logo {
        max-width: 150px;
    }
    
    .loader-logo h2 {
        font-size: 20px;
    }
}

/* Optional animation for the logo */
@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.loader-logo img, 
.loader-logo h2 {
    animation: pulse 2s ease-in-out infinite;
} 