/* Home: trending chips marquee */
.chips-marquee {
    position: relative;
    overflow: hidden;
    width: 100%;
    padding: 6px 0;
    --marquee-speed: 35;
    touch-action: pan-y;
    cursor: grab;
}

.chips-marquee.dragging {
    cursor: grabbing;
    user-select: none;
}

.chips-marquee .marquee__track {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    will-change: transform;
}

@media (prefers-reduced-motion: reduce) {
    .chips-marquee {
        --marquee-speed: 0 !important;
    }
}

.chips-marquee .chip {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 9999px;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1;
    background: rgba(255, 255, 255, .06);
    backdrop-filter: blur(2px);
    cursor: pointer;
    white-space: nowrap;
}

.chips-marquee::before,
.chips-marquee::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    width: 32px;
    pointer-events: none;
}

.chips-marquee::before {
    left: 0;
    background: linear-gradient(to right, rgba(0, 0, 0, .6), transparent);
}

.chips-marquee::after {
    right: 0;
    background: linear-gradient(to left, rgba(0, 0, 0, .6), transparent);
}

@keyframes wm-marquee {
    from {
        transform: translate3d(0, 0, 0);
    }

    to {
        transform: translate3d(calc(-1 * var(--marquee-distance, 1000px)), 0, 0);
    }
}

@media (prefers-reduced-motion: reduce) {
    .chips-marquee .marquee__track {
        animation: none;
    }
}
