/**
 * Marquee Anything Widget Styles
 * Symmetric animation logic
 */

.wml-marquee-anything {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wml-ma-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

.wml-ma-line {
    position: relative;
    width: 100%;
    overflow: hidden;
}

.wml-ma-scroller {
    position: relative;
    width: 100%;
    overflow: hidden;
}

/* Edge blur - only when enabled */
.wml-marquee-anything[data-blur="1"] .wml-ma-scroller {
    mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, white 10%, white 90%, transparent);
}

.wml-ma-track {
    display: flex;
    flex-wrap: nowrap;
    width: max-content;
}

.wml-ma-content {
    display: flex;
    flex-wrap: nowrap;
    flex-shrink: 0;
    align-items: stretch;
}

.wml-ma-item {
    flex: 0 0 auto;
}

.wml-ma-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100px;
    min-width: 300px;
    border: 2px dashed rgba(128, 128, 128, 0.3);
    border-radius: 12px;
    background: rgba(128, 128, 128, 0.05);
}

.wml-ma-placeholder p {
    color: rgba(128, 128, 128, 0.6);
    font-size: 14px;
    margin: 0;
}

/* 
 * Dual-track Seamless Loop Animation
 * Moves an entire block out of view exactly replacing it with its identical sibling
 */
@keyframes wml-marquee-left {
    from {
        transform: translateX(0);
    }
    to {
        transform: translateX(calc(-100% - var(--gap)));
    }
}

@keyframes wml-marquee-right {
    from {
        transform: translateX(calc(-100% - var(--gap)));
    }
    to {
        transform: translateX(0);
    }
}

.wml-ma-content.wml-animate {
    animation: wml-marquee-left var(--animation-duration, 40s) linear infinite;
}

.wml-ma-line[data-direction="right"] .wml-ma-content.wml-animate {
    animation-name: wml-marquee-right;
}

.wml-marquee-anything.wml-pause-hover:hover .wml-ma-content.wml-animate {
    animation-play-state: paused;
}