.mfp-bg {
    position: fixed;
    inset: 0;
    z-index: 1042;
    overflow: hidden;
    background: #000;
    opacity: .85;
}

.mfp-wrap {
    position: fixed;
    inset: 0;
    z-index: 1043;
    width: 100%;
    height: 100%;
    outline: 0 !important;
    -webkit-backface-visibility: hidden;
}

.mfp-container {
    position: absolute;
    inset: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.mfp-content {
    position: relative;
    z-index: 1045;
    max-width: 100%;
    margin: 0 auto;
    text-align: center;
}

.mfp-figure {
    margin: 0;
    line-height: 0;
}

.mfp-img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: calc(100vh - 80px) !important;
    height: auto;
    margin: 0 auto;
}

.mfp-close {
    position: absolute;
    top: -40px;
    right: -10px;
    z-index: 1046;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font: 32px/44px Arial, sans-serif;
    text-align: center;
    cursor: pointer;
}

.mfp-bottom-bar {
    position: absolute;
    top: 100%;
    left: 0;
    display: flex;
    justify-content: space-between;
    width: 100%;
    margin-top: 8px;
    color: #ccc;
    font: 12px/18px Arial, sans-serif;
}

.mfp-title {
    color: #f3f3f3;
}

.mfp-counter {
    color: #ccc;
    white-space: nowrap;
}

.mfp-arrow {
    position: absolute;
    top: 50%;
    z-index: 1046;
    width: 50px;
    height: 60px;
    margin-top: -30px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #fff;
    font-size: 40px;
    line-height: 60px;
    cursor: pointer;
}

.mfp-arrow-left {
    left: 0;
}

.mfp-arrow-left::before {
    content: "\2039";
}

.mfp-arrow-right {
    right: 0;
}

.mfp-arrow-right::before {
    content: "\203a";
}

.mfp-preloader {
    position: absolute;
    top: 50%;
    right: 8px;
    left: 8px;
    z-index: 1044;
    margin-top: -8px;
    color: #ccc;
    text-align: center;
}

.mfp-s-ready .mfp-preloader,
.mfp-s-error .mfp-preloader,
.mfp-s-ready .mfp-arrow,
.mfp-s-error .mfp-arrow {
    display: none;
}

.mfp-hide {
    display: none !important;
}

html.mfp-helper {
    overflow: hidden;
}

@media (max-width: 600px) {
    .mfp-container {
        padding: 24px;
    }

    .mfp-img {
        max-height: calc(100vh - 48px) !important;
    }

    .mfp-arrow {
        width: 36px;
    }

    .mfp-arrow-left {
        left: -12px;
    }

    .mfp-arrow-right {
        right: -12px;
    }
}
