.carousel {
    $carouselWidth: 400px;
    $carouselHeight: 300px;

    width: $carouselWidth;
    height: $carouselHeight;
    position: relative;

    .viewport {
        background-color: #111;
        position: absolute;
        width: $carouselWidth;
        height: $carouselHeight;
        top: 0;
        left: 0;
        overflow: hidden;

        .tray {
            width: ($carouselWidth * 2);
            height: $carouselHeight;
            top: 0;
            left: 0;
            position: absolute;
        }
    }

    a.nav {
        position: absolute;
        display: block;
        width: 50px;
        top: 0;
        height: $carouselHeight;
        background-color: rgba(32, 32, 32, 0.5);
        background-repeat: no-repeat;
        background-position: center;
        opacity: 0;
        transition: opacity 0.2s ease-in-out;
        text-indent: -500px;
        overflow: hidden;

        &:active {
            background-color: rgba(16, 16, 16, 0.7);
        }
    }

    a.prev {
        left: 0;
        background-image: url(/static/images/screenshot_nav_left.png);
    }

    a.next {
        right: 0;
        background-image: url(/static/images/screenshot_nav_right.png);
    }

    &:hover .nav {
        opacity: 1;
    }

    .bucket {
        display: inline-block;
        width: $carouselWidth;
        height: $carouselHeight;
        text-align: center;
        vertical-align: middle;
    }

    .mosaic {
        display: flex;
        flex-wrap: wrap;
        height: 100%;
        margin: 0;
        padding: 0;
        width: 100%;

        &__tile {
            height: 50%;
            overflow: hidden;
            position: relative;
            width: 50%;
        }

        &__image {
            height: 100%;
            left: 0;
            object-fit: cover !important;
            position: absolute;
            top: 0;
            width: 100%;

            &.pixelated {
                image-rendering: pixelated;
            }
        }
    }

    .screenshot,
    .video,
    .emulator {
        width: $carouselWidth;
        height: $carouselHeight;
        display: inline-block;
        line-height: $carouselHeight;
        text-align: center;
        vertical-align: middle;
        font-size: 0;

        img {
            margin: auto;
            vertical-align: middle;

            &.pixelated {
                image-rendering: pixelated; // Chrome 41+ and Opera 26+
            }
        }
    }

    .video, .emulator {
        position: relative;

        .play {
            width: 128px;
            height: 96px;
            background-color: rgba(32, 32, 32, 0.6);
            background-image: url(/static/images/play.png);
            background-repeat: no-repeat;
            background-position: center;
            border-radius: 3px;
            position: absolute;
            top: 102px;
            left: 136px;

            &:hover {
                background-color: rgba(0, 0, 0, 0.6);
            }
        }
    }

    .cowbell-player {
        background: #bbb no-repeat center;
        height: 200px;
        padding-top: 100px;

        svg {
            display: block;
            margin: auto;
        }

        &.no-artwork {
            background-image: url(/static/images/sample.png);
        }
    }

    .no_screenshot {
        background: #bbb no-repeat center;
        height: $carouselHeight;
        width: $carouselWidth;

        &.music {
            background-image: url(/static/images/turntable.png);
        }

        p {
            background: no-repeat url(/static/images/camera.png) center 100px;
            margin: 0;
            padding-top: 182px;
            text-align: center;
        }
    }
}
