@keyframes quark-marquee {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(-100%, 0, 0); }
}

/* Include the seam gap in each track's width so one animation cycle moves
   exactly to the next copy, without double-spacing children or jumping. */
[data-slot="marquee"] > [data-slot="marquee-track"] {
    box-sizing: border-box;
    padding-right: var(--marquee-gap);
    will-change: transform;
}

[data-slot="marquee"] > [data-slot="marquee-track"] > * {
    flex-shrink: 0;
}

[data-slot="marquee"][data-pause-on-hover="true"]:hover [data-slot="marquee-track"] {
    animation-play-state: paused !important;
}

[data-slot="marquee"]:focus-within [data-slot="marquee-track"] {
    animation-play-state: paused !important;
}

@media (prefers-reduced-motion: reduce) {
    [data-slot="marquee"]:not([data-quark-motion="always"]) {
        overflow-x: auto;
        mask-image: none !important;
    }

    [data-slot="marquee"]:not([data-quark-motion="always"]) > [data-slot="marquee-track"] {
        animation: none !important;
        padding-right: 0;
        will-change: auto;
    }

    [data-slot="marquee"]:not([data-quark-motion="always"]) > [data-slot="marquee-track"][aria-hidden="true"] {
        display: none;
    }
}
