/**
 * Infinite Cards Widget Styles
 */

.wml-infinite-cards {
    position: relative;
    width: 100%;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 8px;
}

/* Scroller container with mask */
.wml-ic-scroller {
    position: relative;
    z-index: 20;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, white 20%, white 80%, transparent);
}

/* Scrolling list */
.wml-ic-list {
    display: flex;
    flex-wrap: nowrap;
    gap: 16px;
    padding: 16px 0;
    width: max-content;
    min-width: 100%;
}

/* Individual card item */
.wml-ic-item {
    flex-shrink: 0;
    width: 350px;
    max-width: 100%;
}

/* Make nested bricks elements fill the card */
.wml-ic-item>* {
    width: 100%;
    height: 100%;
}

/* Placeholder style */
.wml-ic-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    min-width: 350px;
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
}

.wml-ic-placeholder p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 14px;
    margin: 0;
}

/* Scroll animation using CSS variables */
@keyframes wml-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.wml-ic-list.wml-animate {
    animation: wml-scroll var(--animation-duration, 40s) linear infinite;
    animation-direction: var(--animation-direction, forwards);
}

.wml-ic-list.wml-animate.wml-pause-hover:hover {
    animation-play-state: paused;
}

/* Responsive */
@media (max-width: 768px) {
    .wml-ic-item {
        width: 300px;
    }

    .wml-infinite-cards {
        min-height: 300px;
    }
}