/**
 * Ecomas Global Lazy Load Styles
 * Provides smooth, performant image loading and progressive reveal without layout shifts.
 */

img[loading="lazy"] {
    /* Smooth opacity transition when image finishes downloading */
    transition: opacity 0.25s ease-out;
}

/* Images with data-src waiting to be scrolled into view */
img.lazy-pending {
    opacity: 0;
}

/* Successfully loaded lazy images */
img.lazy-loaded {
    opacity: 1;
}

/* Fallback / error state placeholder */
img.lazy-error {
    opacity: 0.6;
    filter: grayscale(1);
}

/* Accessibility: respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    img[loading="lazy"],
    img.lazy-pending,
    img.lazy-loaded {
        transition: none !important;
        opacity: 1 !important;
    }
}
