@import "shared/mixins-and-vars";

.gallery{
    position: relative;
    max-width: 600px;
    margin: auto;
    .slides{
        align-items: center;
        display: flex;
        justify-content: center;
        .slide {
            max-height: 40em;
            max-width: 40em;
            display: none;
            transition: opacity 0.5s ease;
            border-radius: 0.6em;
            @media @mobile, @tablet {
                max-height: 30em;
                max-width: 100%;
            }
        }
        .fig-slide{
            justify-content: center;
            flex-direction: column;
        }
    }
    button{
        border: none;
        background: transparent;

    }

    .thumb-nav-button {
        .enable__is-dark-mode & img {
            filter: invert(100%); 
        }
    }
    .thumbnail-button {
        .enable__is-dark-mode & {
            border: solid 1px @dark-mode-white;
        }
    }
    
    .thumbnail-slider {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-top: 10px;
        .thumbnails{
            display: flex;
            transition: transform 0.5s ease-in-out;
            max-width: calc(100vw - 105px);
            .thumbnail-button{
                width: 60px;
                height: 40px;
                cursor: pointer;
                border-radius: 5px;
                margin-right: 5px;

                &:last-child {
                    margin-right: 0;
                }

                img{
                    width: 100%;
                    height: 100%;
                    border-radius: 5px;
                    &:focus-visible{
                        outline: none;
                    }
                } 
                &:hover{
                    
                    border: .1px solid rgb(41, 41, 41);

                    .enable__is-dark-mode & {
                        border: .38px solid #9a6c6c;
                    }
                }

                &.active{
                    opacity: 1;
                    border: .38px solid #2b2b2b;
                }
                &:hover{
                    opacity: 0.4;
                    border: .1px solid #2b2b2b;
                }
                &:focus-visible{
                    opacity: 1;
                    outline-offset: 2px;

                    .enable__is-dark-mode & {
                        border-color: #fff;
                    }
                }
            }
        }
    }
}
