/* body {
    position: fixed;
} */

main {
    position: relative;
}

#mwc-modal {
    display: none;

    position: absolute;
    left: 0;
    right: 0;
    height: 100%;
    background: #000;
}

.mwc-modal-inner {
    max-height: 100%;
    display: grid;
    grid-template-columns: 1fr;
    color: #c6beee;
}

.mwc-modal-sidebar {
    grid-area: mwc-modal-sidebar;
    display: none;
}

.mwc-modal-main {
    grid-area: mwc-modal-main;
}

.mwc-modal-main {
    display: grid;
    grid-template-columns: auto 1fr auto;
    grid-template-rows: auto 1fr;
    grid-template-areas:
        "arrow-left artwork-title arrow-right"
        "image image image"
        "caption caption caption";
    align-items: center;
    justify-items: center;
    gap: 1em 0;
    padding: 2em 1.5rem;
}

.mwc-modal-main .artwork-title {
    font-size: 1.3em;
    font-weight: 200;
    text-transform: uppercase;
    letter-spacing: 0.15em;
}

.mwc-modal-main .caption {
    grid-area: caption;

    display: flex;
    flex-direction: column;
    gap: 1em 0;
    align-items: center;
}

.mwc-modal-main img {
    grid-area: image;

    width: auto;
    border: 2px solid #455a64;
    border: 2px solid #c6beee;
    padding: 0.6em;
}

.mwc-modal-main .share-buttons {
    grid-area: share-buttons;
}

.mwc-modal-inner .arrow {
    padding: 0;
    background: none;
}

.mwc-modal-inner .arrow-left {
    grid-area: arrow-left;
}

.mwc-modal-inner .arrow-right {
    grid-area: arrow-right;
}

.mwc-modal-inner .artwork-title {
    grid-area: artwork-title;
}

.mwc-modal-inner .caption {
    letter-spacing: initial;
}

.mwc-modal-inner .artiste-name {
    font-size: 1.1em;
}


@media (min-width: 992px) {

    .mwc-modal-inner {
        height: 100%;
        grid-template-columns: 12em 1fr auto;
        grid-template-areas: "mwc-modal-sidebar mwc-modal-main mwc-modal-close";
    }

    .mwc-modal-close {
        grid-area: mwc-modal-close;
    }

    #mwc-modal-close {
        display: block;
        padding: 1em;
        color: #c6beee;
        background: rgb(255 255 255 / 4%);
    }

    .mwc-modal-sidebar {
        height: 100%;
        max-height: 100%;
        overflow: hidden;

        display: grid;
        grid-template-columns: repeat(auto-fit, 75px);
        width: -webkit-fill-available;
        width: -moz-available;

        justify-self: flex-start;
        align-content: start;
        /* flex-direction: column;
        flex-wrap: wrap; */

        background: #0e0e0e;
        padding: 1em;
        gap: 0.5em;
        justify-content: center;
        background: rgb(255 255 255 / 4%);
    }

    .artwork-thumbnail {
        /* height: 20%;
        width: 50%; */
    }

    .mwc-modal-sidebar img {
        /* height: 100%;
        object-fit: cover; */
        /* height: 120px; */
        height: 65px;
        width: auto;
    }

    .mwc-modal-main {
        display: grid;
        justify-self: center;
        height: 100%;
        max-height: 100%;

        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto 1fr;
        grid-template-areas:
            "artwork-title image"
            "caption image"
            "share-buttons image";
        align-items: start;
        justify-items: center;
        gap: 3em 2.4em;
        padding: 2em 1.5rem;
    }

    
    .mwc-modal-main .artwork-title {
        justify-self: center;
        text-align: center;
        font-size: 1.8rem;
    }

    .page-template-template-page-photo-gallery .mwc-modal-inner .caption {
        display: flex;
        justify-self: center;
        /* width: 75%; */
        align-items: center;
        font-size: 1.2em;
    }

    .page-template-template-page-photo-gallery .mwc-modal-main .share-buttons {
        display: flex;
        justify-self: center;
        flex-wrap: wrap;
        padding: 0.5rem 0.8rem;
    }

    .mwc-modal-main img {
        justify-self: start;
        height: 100%;
        max-height: 100%;
        object-fit: cover;
    }

    .mwc-modal-main .arrow-left,
    .mwc-modal-main .arrow-right {
        display: none;
    }
}

@media (min-width: 1400px) {

    .mwc-modal-sidebar img {
        height: 75px;
    }
}