/**
 * Preload Image Styles
 * High priority styles to show preload image before site renders
 */

.crombie-preload-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: #ffffff;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

.crombie-preload-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.crombie-preload-container {
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeInPreload 0.3s ease-in;
}

.crombie-preload-image {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    animation: pulsePreload 1.5s ease-in-out infinite;
}

/* Fade in animation for preload appearance */
@keyframes fadeInPreload {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Pulse animation for the image */
@keyframes pulsePreload {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Ensure body doesn't scroll while preload is active */
body.crombie-preload-active {
    overflow: hidden !important;
    height: 100vh;
    position: relative;
}
