/* 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%;
    padding: 0 !important;
}

/* 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: var(--e-global-color-primary, #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: var(--_primitives---opacity--neutral-darkest-60, rgba(11,0,6,0.6));
    color: var(--e-global-color-primary, #ffffff);
    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: var(--_primitives---opacity--white-20, rgba(255,255,255,0.2));
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: 8px;
}

.wb-claim-zoom__progress-fill {
    height: 100%;
    background: var(--e-global-color-accent, #df006e);
    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;
    }
}

/* ==========================================================================
 * ELEMENTOR EDITOR — widget wrapper / animating state
 * The full-bleed rule on .elementor-widget-claim_zoom_animation (100vw + translateX)
 * breaks inside the editor iframe/column; the block can reflow off-screen when
 * controls change. These rules only apply in the builder (not on the live site).
 *
 * :has(.wb-widget--editor-preview) is in its own rules (not comma-joined with other selectors) so
 * browsers that do not support :has() only drop those lines, not the body.* fallback.
 * body.elementor-editor-active matches when the builder and preview share the same document.
 * ========================================================================== */

/* Admin / same-document builder */
body.elementor-editor-active .elementor-widget-claim_zoom_animation {
    width: 100%;
    max-width: 100% !important;
    left: auto;
    transform: none;
    position: relative;
    min-width: 0;
}

/* Editor placeholder shell (Backbone content_template) — separate rule for :has() support */
.elementor-widget-claim_zoom_animation:has(.wb-widget--editor-preview) {
    width: 100%;
    max-width: 100% !important;
    left: auto;
    transform: none;
    position: relative;
    min-width: 0;
}

body.elementor-editor-active .elementor-widget-claim_zoom_animation .wb-claim-zoom.wb-claim-zoom--animating {
    position: relative !important;
    top: auto;
    left: auto;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    min-height: 0;
    z-index: auto;
}

.elementor-widget-claim_zoom_animation:has(.wb-widget--editor-preview) .wb-claim-zoom.wb-claim-zoom--animating {
    position: relative !important;
    top: auto;
    left: auto;
    width: 100% !important;
    max-width: 100% !important;
    height: auto;
    min-height: 0;
    z-index: auto;
}

body.elementor-editor-active
    .elementor-widget-claim_zoom_animation
    .wb-claim-zoom--animating
    .wb-claim-zoom__content {
    position: relative !important;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
}

.elementor-widget-claim_zoom_animation:has(.wb-widget--editor-preview)
    .wb-claim-zoom--animating
    .wb-claim-zoom__content {
    position: relative !important;
    top: auto;
    left: auto;
    transform: none;
    z-index: auto;
}
