.mfp-gallery.mfp-wrap {
    position: fixed !important;
    width: 100vw !important;
    height: calc(100vh - 120px) !important;
    top: 120px !important;
    left: 0 !important;
    position: fixed !important;
}

@media only screen and (max-width: 989px) {
    .mfp-gallery.mfp-wrap {
        height: calc(100vh - 90px) !important;
        top: 90px !important;
    }
}

.mfp-gallery.mfp-wrap .mfp-content {
    width: 80%;
    height: 100%;
    padding: 2em 0;
    margin: 0 auto;
    overflow: hidden;
}

.mfp-gallery.mfp-wrap .mfp-content .mfp-figure,
.mfp-gallery.mfp-wrap .mfp-content .mfp-figure figure {
    width: 100%;
    height: 100%;
    position: unset;
    overflow: hidden;
}

.mfp-gallery.mfp-wrap .mfp-content .mfp-figure {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.mfp-gallery.mfp-wrap .mfp-content .mfp-figure figure {
    height: unset;
    display: flex;
    flex-direction: column;
}

.mfp-gallery.mfp-wrap .mfp-content .mfp-img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 100% !important;
    padding: 0;
    padding-bottom: 1em;
    display: block;
    object-fit: contain;
    object-position: center;
    overflow: hidden;
}

.mfp-gallery.mfp-wrap .mfp-content .mfp-bottom-bar {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
}

.mfp-gallery.mfp-wrap .mfp-content .mfp-bottom-bar,
.mfp-gallery.mfp-wrap .mfp-content .mfp-bottom-bar .mfp-title,
.mfp-gallery.mfp-wrap .mfp-content .mfp-bottom-bar .mfp-counter {
    margin: 0;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    position: unset;
}

.mfp-gallery.mfp-wrap .mfp-close {
    margin-left: auto;
    margin-bottom: 0.5em;
    opacity: 1;
    display: block;
    position: unset;
    border: solid 0.01em #fff !important;
    cursor: pointer !important;
}

.mfp-gallery.mfp-wrap .mfp-close:hover {
    transform: scale(0.9);
    -webkit-transform: scale(0.9);
}
