/* Claim Zoom Animation - CSS for scroll-triggered zoom animation */

.elementor-widget-claim_zoom_animation {
    width: 100vw;
    transform: translateX(-50%);
    max-width: unset !important;
    left: 50%;
}

/* Main container */
.wb-claim-zoom { 
    position: relative; 
    width: 100%; 
    min-height: 100vh;
}

/* Component wrapper */
.wb-claim-zoom__component {
    position: sticky;
    width: 100%;
    height: 100vh;
    z-index: 1;
    top: 0;
    overflow: hidden;
}

/* Content container */
.wb-claim-zoom__content {
    position: relative;
    z-index: 2;
}

/* Image wrapper - this is the main animation target */
.wb-claim-zoom__image-wrapper {
    position: relative;
    /* Initial transform origin set to center */
    transform-origin: center center;
    will-change: transform;
    transition: transform 0.1s linear;
    border-radius: 50%;
    flex: none;
    width: 100px;
    aspect-ratio: 1 / 1;
}

/* Main image */
img.wb-claim-zoom__image {
    width: 100%;
    height: auto;
    border-radius: 9999px !important;
    display: block;
    /* Ensure image is crisp during scaling */
    image-rendering: -webkit-optimize-contrast;
    backface-visibility: hidden;
    transform: translateZ(0); /* Force hardware acceleration */
}

/* Decorative circle */
.wb-claim-zoom__circle {
    position: absolute;
    /* Inherit position from original design */
    will-change: transform, opacity;
    transition: all 0.1s linear;
    z-index: 0;
}

/* White overlay that expands during animation */
.wb-claim-zoom__overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    background-color: #ffffff;
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transform-origin: center center;
    will-change: width, height, border-radius;
    transition: all 0.1s linear;
    z-index: 1;
    opacity: 1;
    aspect-ratio: 1/1;
}

/* Animation trigger (invisible) */
.wb-claim-zoom__trigger {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

/* Typography styles (inherit from centralized system) */
.wb-claim-zoom__title {
    /* Styled by centralized typography controls */
    position: relative;
    z-index: 3;
}

.wb-claim-zoom__secondary-title {
    position: relative;
    z-index: 3;
}

.wb-claim-zoom__mobile-title {
    position: relative;
    z-index: 3;
}

/* Animation states */
.wb-claim-zoom--animating {
    /* When animation is active, prevent normal scrolling */
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 9999;
}

.wb-claim-zoom--animating .wb-claim-zoom__content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 10;
}

/* Overlay animation states */
.wb-claim-zoom__overlay--visible {
    opacity: 1;
}

.wb-claim-zoom__overlay--expanding {
    width: 300vw;
    height: 300vh;
    border-radius: 0;
}

/* Debug styles (only visible in WP_DEBUG mode) */
.wb-claim-zoom__debug {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 10px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    z-index: 99999;
    min-width: 150px;
}

.wb-claim-zoom__progress-bar {
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.wb-claim-zoom__progress-fill {
    height: 100%;
    background: #00ff00;
    width: 0%;
    transition: width 0.1s linear;
}

.wb-claim-zoom__debug-info {
    display: flex;
    justify-content: space-between;
    gap: 10px;
}

/* Responsive behavior */
@media (max-width: 768px) {
    .wb-claim-zoom--mobile-disabled {
        /* Disable animation on mobile if configured */
        position: static !important;
        overflow: visible !important;
    }
    
    .wb-claim-zoom--mobile-disabled .wb-claim-zoom__image-wrapper {
        transform: none !important;
    }
    
    .wb-claim-zoom--mobile-disabled .wb-claim-zoom__overlay {
        display: none !important;
    }
    
    .wb-claim-zoom__content{
        flex-wrap: wrap;
    }
}

/* Smooth transitions for non-animating states */
.wb-claim-zoom:not(.wb-claim-zoom--animating) .wb-claim-zoom__image-wrapper {
    transition: 0.2s ease-out;
}

.wb-claim-zoom:not(.wb-claim-zoom--animating) .wb-claim-zoom__overlay {
    transition: all 0.2s ease-out;
}

/* Fallback styles when JavaScript is disabled */
.no-js .wb-claim-zoom__overlay {
    display: none;
}

.no-js .wb-claim-zoom__image-wrapper {
    transform: none;
}

/* Performance optimizations */
.wb-claim-zoom__image-wrapper,
.wb-claim-zoom__circle {
    /* Force GPU acceleration */
    backface-visibility: hidden;
    perspective: 1000px;
    transform: translateZ(0);
}

/* Ensure content is readable during animation */
.wb-claim-zoom--animating .wb-claim-zoom__title,
.wb-claim-zoom--animating .wb-claim-zoom__secondary-title,
.wb-claim-zoom--animating .wb-claim-zoom__mobile-title {
    color: inherit;
    mix-blend-mode: difference;
}

/* Preload state - hide until JavaScript initializes */
/* .wb-claim-zoom[data-animation-enabled="1"]:not(.wb-claim-zoom--initialized) {
    opacity: 0;
    transition: opacity 0.3s ease;
} */

.wb-claim-zoom.wb-claim-zoom--initialized {
    opacity: 1;
} 

.layout488_content {
    display: flex;
    align-items: center;
    overflow: unset;
}

@media screen and (max-width: 768px) {
    .layout488_content {
        flex-direction: column;
    }
}