﻿.mm-carousel {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    touch-action: pan-y; /* Let horizontal swipes switch skanimals */
}

.mm-carousel-stage {
    width: 100%;
    max-width: 260px;
    min-height: 120px;
    overflow: hidden;
}

.mm-carousel-item {
    width: 100%;
}

/* Idle float on the shown skanimal; on the child so it doesn't fight the slide-in animation */
.mm-carousel-item > * {
    animation: mm-float 3.2s ease-in-out 0.4s infinite;
}

@keyframes mm-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.mm-carousel-unknown {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 140px;
    border: 2px dashed rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    font-size: 48px;
    font-weight: bold;
    color: rgba(255, 255, 255, 0.25);
    animation: mm-breathe 2s ease-in-out infinite;
}

.mm-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 2;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    border-radius: 50%;
    background: rgba(var(--sc-primary-rgb), 0.15);
    color: var(--sc-primary);
    font-size: 22px;
    cursor: pointer;
    transform: translateY(-50%);
    transition: background-color 0.2s ease, transform 0.15s ease;
}

.mm-carousel-arrow:hover {
    background: rgba(var(--sc-primary-rgb), 0.3);
}

.mm-carousel-left {
    left: 0;
}

.mm-carousel-right {
    right: 0;
}

.mm-carousel-left:active {
    transform: translateY(-50%) translateX(-3px) scale(0.9);
}

.mm-carousel-right:active {
    transform: translateY(-50%) translateX(3px) scale(0.9);
}

.mm-carousel-counter {
    text-align: center;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    color: rgba(255, 255, 255, 0.5);
}

/* Each skanimal is keyed, so these play whenever a new one is shown */
.mm-slide-from-right {
    animation: mm-slide-from-right 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mm-slide-from-left {
    animation: mm-slide-from-left 0.35s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.mm-slide-reveal {
    animation: mm-reveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

@keyframes mm-slide-from-right {
    from {
        opacity: 0;
        transform: translateX(60px) rotate(4deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0);
    }
}

@keyframes mm-slide-from-left {
    from {
        opacity: 0;
        transform: translateX(-60px) rotate(-4deg);
    }
    to {
        opacity: 1;
        transform: translateX(0) rotate(0);
    }
}

@keyframes mm-reveal {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}
