/* https://codepen.io/kevinpowell/pen/BavVLra */

/*<!--
PROGRESSIVELY ENHANCED
If a user has `prefers-reduced-motion: reduced`, there will be no animation
and the items will wrap, instead of being hidden.
If they have not opted for reduced motion, the items will be duplicated with JS
and the duplicated content will have `aria-hidden="true"` to prevent duplicate content
for screen readers.
If a user has JS disabled or it fails for whatever reason, they will get the same
experience as a user with `prefers-reduced-motion: reduced`, so no content is hidden,
and there is no animation.

=== OPTIONS ===
CONTROL SPEED
If you don't assign anything, it will use a default speed.
To change the speed, on the `.scroller`
you can use `data-speed="fast"` or `data-speed="slow"

CONTROL DIRECTION
By default, it will scroll from right to left.
To change the direction, on the `.scroller`
you can use `data-direction="right"` (`data-direction="left" also works, but it is the default)
-->*/

.scroller {
    /* max-width: 600px; */
}

.scroller__inner {
    /*  padding-block: 1rem;
      display: flex;
      flex-wrap: wrap;
      gap: 1rem; */
}

.scroller[data-animated="true"] {
    overflow: hidden;
    -webkit-mask: linear-gradient( 90deg, transparent, white 20%, white 80%, transparent );
    mask: linear-gradient(90deg, transparent, white 20%, white 80%, transparent);
}

    .scroller[data-animated="true"] .scroller__inner {
        /* width: max-content; */
        flex-wrap: nowrap;
        animation: scroll var(--_animation-duration, 40s) var(--_animation-direction, forwards) linear infinite;
    }

.scroller[data-direction="right"] {
    --_animation-direction: reverse;
}

.scroller[data-direction="left"] {
    --_animation-direction: forwards;
}

.scroller[data-speed="fast"] {
    --_animation-duration: 20s;
}

.scroller[data-speed="slow"] {
    --_animation-duration: 60s;
}

@keyframes scroll {
    to {
        transform: translate(calc(-50% - 0.5rem));
    }
}
/*

.tag-list {
    margin: 0;
    padding-inline: 0;
    list-style: none;
}

    .tag-list li {
        padding: 1rem;
        background: var(--clr-primary-400);
        border-radius: 0.5rem;
        box-shadow: 0 0.5rem 1rem -0.25rem var(--clr-primary-900);
    }*/

/* for testing purposed to ensure the animation lined up correctly */
.test {
    background: red !important;
}
