@use '../_variables';

main{
    max-width: 80em;
    margin: auto;
}

div#details{
    min-height: 24em;
    margin: auto 4em 0 4em;
    
    h2{
        font-size: 300%;
        border-bottom: 0.2em solid;
        margin-left: 2em;
        
        @media only screen and (max-width : 800px){
            margin-left: initial;
            margin-bottom: 0.5em;
            border-bottom: 0.05em solid;
            text-align: center;
        }
    }
   
    p{margin: auto 0.2em;}

    @media only screen and (max-width : 600px) {margin: auto 1em;}
}

div#images{text-align: center;}

img.img, video.img{
    vertical-align: middle;
    max-width: 12em;
    max-height: 14em;
    border: 0.1em solid variables.$primary-brown;
    border-radius: 0.3em;
    margin: 0.5em;
    cursor: pointer;
    position: relative;
    display: inline-block;
}

img.video_play{
    width: 3em;
    height: 3em;
    margin: 0 4.5em 0 -8em;
    z-index: 1;
    position: relative;
}

video.img::-webkit-media-controls{display: none;}

img.img_main{
    max-width: 26em;
    max-height: 21em;
    float: left;
    margin: 0.5em 3em 0.5em 0.5em;

    @media only screen and (max-width : 800px){
        max-width: 100%;
        max-height: 24em;
        float: none;
        margin: 0.5em auto;
        display: block;
    }
}

div#gallery-cover{
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: variables.$darker-brown;
    opacity: 0.4;
    transition: opacity 1s ease-in-out;
    z-index: 2;
}

div#gallery{
    display: none;
    position: fixed;
    top: 5%;
    left: 10%;
    right: 10%;
    bottom: 5%;
    background-color: variables.$background-off-white;
    border: 0.2em solid variables.$primary-brown;
    border-radius: 0.4em;
    transition: opacity 1s ease-in-out;
    text-align: center;
    z-index: 3;
    
    @media only screen and (max-width : 800px) {
        top: 4%;
        bottom: 2%;
        left: 2%;
        right: 2%;
    }
    
    div#gallery-fade{
        background-color: variables.$background-off-white;
        display: none;
        display: block;
        height: calc(100% - 4em);
        width: 100%;
        position: absolute;
        z-index: 6;
        opacity: 0.5;
        transition: opacity 0.2s;
    }

    h3{
        text-align: left;
        font-size: 140%;
        margin: 0.6em;
        max-height: 4em;
        border-bottom: 0.05em solid variables.$primary-brown;

        input[type='button']{
            float: right;
            padding: 0.3em 0.6em;
            margin: -0.3em;
        }
    }
    
    div#gallery-content{
        position: absolute;
        height: calc(100% - 4em);
        width: 100%;
    }
    
    div#gallery-flex{
        display: flex;
        flex-direction: row;
        height: calc(100% - 4em);
        
        @media only screen and (max-width : 800px) {
            flex-direction: column;
        }
        
        div#gallery-flex-img-container{
            flex: 70%;
            padding: 1em;
            text-align: center;
            
            @media only screen and (max-width : 800px) {max-height: 60%;}
    
            img#gallery-img, video#gallery-video{
                
                border: 0.1em solid variables.$primary-brown;
                border-radius: 0.3em;
                max-width: 95%;
                max-height: 100%;
                margin: auto;
                
                @media only screen and (max-width : 800px) {
                    max-width: 95%;
                    margin: 0.2em auto;
                }
            }
        }
        
        p#gallery-text{
            flex: 25%;
            margin: 2% 2% 2% auto;
            background-color: #ddd;
            padding: 0.7em;
            text-align: left;
            border: 0.1em solid variables.$primary-brown;
            border-radius: 0.3em;
            overflow-y: scroll;
            
            @media only screen and (max-width : 800px) {
                margin: auto 2em;
            }
        }
    }
    div#gallery-controls{
        text-align: center;
        margin: 0;
        
        @media only screen and (max-width : 800px) {
            position: absolute;
            bottom: 0;
            width: 100%;
            @media only screen and (max-width : 800px){display: flex}
        }
        
        input[type='button']{
            display: inline-block;
            padding: 1em 1.5em;
            margin: 0.3em 1em;
            @media only screen and (max-width : 800px){flex: 50%}
        }
    }
}
