﻿/*

    SHOWREEL BODY

*/

.showreel {
    width: 100%;
    /*max-width: 960px;*/
    height: auto;
    /*max-height: 100%;*/

    margin: auto;
    margin-bottom: 16px;

    /*position: relative;*/

    /*overflow-x: hidden;*/
}

/*

    SHOWREEL FUNCTIONALITY WITHOUT BUTTONS

*/

.showreel-container {
    width: 100%;
    height: auto;

    position: relative;

    overflow-x: hidden;
}

/*

    OVERLAY PSEUDO ELEMENT

*/

.showreel-overlay {
    /*width: 100%;
    height: 100%;

    position: absolute;
    top: 0;
    left: 0;*/

    z-index: 1;
}
    /*

        HOVER VISIBILITY

    */
    .showreel-container .showreel-overlay * {
        visibility: hidden;
        opacity: 0;

        z-index: 1;
    }

        .showreel-container:hover .showreel-overlay * {
            visibility: visible;
            opacity: 1;
        }

    .showreel-item:hover .showreel-overlay-current {
        visibility: visible;
        opacity: 1;
    }

    /*

        OVERLAY ELEMENTS

    */

    .showreel-overlay-toggle {
        padding: 8px;

        position: absolute;
        top: 2%;
        left: 2%;

        visibility: visible !important;
        opacity: 1 !important;

        border-radius: 4px;

        cursor: pointer;

        background-color: rgba(0, 0, 0, 0.5);

        transition-duration: 0.5s;

        z-index: 2;
    }

        .showreel-overlay-toggle * {
            visibility: visible !important;
            opacity: 1 !important;
        }

        .showreel-overlay-toggle .showreel-overlay-play {
            display: none;
        }

        .showreel-overlay-toggle .showreel-overlay-pause {
            display: flex;
        }

    .showreel-overlay-current {
        padding: 8px;

        position: absolute;
        top: 2%;
        right: 2%;

        visibility: hidden;
        opacity: 0;

        border-radius: 4px;

        background-color: rgba(0, 0, 0, 0.5);

        transition-duration: 0.5s;

        z-index: 2;
    }

    .showreel-overlay-retreat, 
    .showreel-overlay-advance {
        padding: 16px;

        position: absolute;
        top: 50%;
        transform: translateY(-50%);

        cursor: pointer;

        font-weight: bold;

        background-color: rgba(0, 0, 0, 0.5);

        transition-duration: 0.5s;
    }

        .showreel-overlay-retreat:hover, 
        .showreel-overlay-advance:hover {
            background-color: rgba(31, 31, 31, 0.7);
        }

    .showreel-overlay-retreat {
        left: 0;

        border-top-right-radius: 8px;
        border-bottom-right-radius: 8px;
    }

    .showreel-overlay-advance {
        right: 0;

        border-top-left-radius: 8px;
        border-bottom-left-radius: 8px;
    }

    .showreel-overlay-caption {
        width: auto;
        width: max-content;
        max-width: 96%;

        padding: 8px;

        position: absolute;
        bottom: 2%;
        left: 50%;
        transform: translateX(-50%);
        /*right: 2%;*/

        font-size: 12px;
        text-align: center;

        border-radius: 4px;

        background-color: rgba(0, 0, 0, 0.5);

        transition-duration: 0.5s;

        z-index: 2;
    }
    
/*

    SHOWREEL IMAGE ITEMS

*/

.showreel-item-container {
    width: auto;
    height: auto;
    
    touch-action: none;

    transform: translateX(0);
    transition-duration: 1s;
    transition-timing-function: ease-in-out;
    /*transition-timing-function: cubic-bezier(0.5, 0, 0, 1);*/

    z-index: 0;
}

    .showreel-item {
        width: auto;
        height: auto;

        display: flex;
        /*flex-direction: column;
        flex-wrap: nowrap;*/

        position: relative;
        float: left;
    }

        .showreel-item img {
            width: 100%;
            /*max-width: 960px;*/
            height: 100%;
            max-height: 75vh;

            object-fit: cover;
        }

/*

    INTERVAL PROGRESS

*/

.showreel-interval-progress-container {
    width: 100%;
    height: 4px;

    position: relative;

    background-color: var(--secondary);
}

    .showreel-interval-progress {
        width: 0;
        height: 100%;

        position: absolute;
        top: 0;
        left: 0;

        background-color: var(--accent);

        /*transition-duration: 0s;*/
        transition-timing-function: linear;

        z-index: 1;
    }

/*

    SHOWREEL BUTTONS

*/

.showreel-button-container {
    width: 100%;
    height: auto;

    margin-top: 8px;
    margin-bottom: 8px;

    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-around;
    /*justify-content: space-evenly;*/
    align-items: center;
}

    .showreel-button {
        width: 32px;
        height: 32px;

        /*margin-left: 8px;
        margin-right: 8px;*/

        border-radius: 100%;

        cursor: pointer;

        background-color: var(--primary);

        transition-duration: 0.5s;
    }

        .showreel-button:hover {
            filter: brightness(125%);
        }

    .showreel-button-active {
        background-color: var(--accent) !important;
    }