.wp-scrolling-ticker-wrapper {
    width: 100%;
    overflow: hidden;
    position: relative;
    white-space: nowrap;
    display: flex;
    align-items: center;
}

.wp-scrolling-ticker-content {
    display: flex;
    white-space: nowrap;
    will-change: transform;
    backface-visibility: hidden;
    transform: translateZ(0);
}

.wp-scrolling-ticker-text {
    display: inline-block;
    white-space: nowrap;
    flex-shrink: 0;
    /* Spacing is controlled via Elementor responsive control */
}

/* Smooth scrolling animation */
.wp-scrolling-ticker-wrapper[data-direction="left"] .wp-scrolling-ticker-content {
    animation: scroll-left linear infinite;
}

.wp-scrolling-ticker-wrapper[data-direction="right"] .wp-scrolling-ticker-content {
    animation: scroll-right linear infinite;
}

/* Pause on hover */
.wp-scrolling-ticker-wrapper:hover .wp-scrolling-ticker-content {
    animation-play-state: paused;
}

/* Seamless loop: move exactly one copy width for perfect loop */
/* Move percentage is calculated dynamically based on number of copies */
@keyframes scroll-left {
    0% {
        transform: translateX(0);
    }
    100% {
        transform: translateX(var(--move-percentage, -50%));
    }
}

@keyframes scroll-right {
    0% {
        transform: translateX(var(--move-percentage, -50%));
    }
    100% {
        transform: translateX(0);
    }
}

/* Elementor editor styles */
.elementor-editor-active .wp-scrolling-ticker-content {
    animation-play-state: running;
}
