#mockup-carousel {
    position: relative;
    max-width: 900px;
}

#carousel {
    position: absolute;
    background: white;
    overflow: hidden;
    width: 97.15%;
    height: 67%;
    left: 1.4%;
    top: 2.2%;
}

.carousel-description {
    height: 2em;
}

#carousel-controls,
#carousel-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: initial;
}

#carousel-content * {
    object-fit: fill;
    height: 100%;
    width: 100%;
}

#carousel-content>* {
    position: absolute;
    transform: translateX(-100%);
}

#carousel-content>*:first-child {
    transform: translateX(0);
}

#carousel-content>.hidden {
    transform: translateX(-100%);
}

#carousel-content>.show-from-left {
    animation: show-from-left .5s;
    animation-fill-mode: forwards;
}

#carousel-content>.hide:has(~.show-from-left),
#carousel-content>.show-from-left~.hide {
    animation: hide-to-right .5s;
    animation-fill-mode: forwards;
}

#carousel-content>.show-from-right {
    animation: show-from-right .5s;
    animation-fill-mode: forwards;
}

#carousel-content>.hide:has(~.show-from-right),
#carousel-content>.show-from-right~.hide {
    animation: hide-to-left .5s;
    animation-fill-mode: forwards;
}

#carousel-controls {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

#carousel-controls>* {
    cursor: pointer;
    font-size: 3em;
    color: white;
    text-shadow: 0 1px 7px rgba(0, 0, 0, .4);
    transition: color .3s, scale .3s;
}

#carousel-controls>*:active {
    color: lightgray;
    scale: .96;
}

.carousel-description {
    text-align: center;
}

@keyframes show-from-right {
    from {
        transform: translateX(100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes show-from-left {
    from {
        transform: translateX(-100%);
    }

    to {
        transform: translateX(0);
    }
}

@keyframes hide-to-right {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(100%);
    }
}

@keyframes hide-to-left {
    from {
        transform: translateX(0);
    }

    to {
        transform: translateX(-100%);
    }
}

