/*******************************************************
 *
 * General
 *
 *******************************************************/

.mfp-fade.mfp-bg,
.mfp-fade.mfp-wrap .mfp-content {
    opacity: 0;
    transition: all 0.3s ease-in-out;
}

.mfp-fade.mfp-bg.mfp-ready {
    opacity: 0.95;
}

.mfp-fade.mfp-bg.mfp-removing,
.mfp-fade.mfp-wrap.mfp-removing .mfp-content {
    opacity: 0;
}

.mfp-fade.mfp-wrap.mfp-ready:not(.mfp-removing) .mfp-content {
    opacity: 1;
}

.aios-listings-mobile-gallery-popup .mfp-container {
    padding: 0;
}

.aios-listings-mobile-gallery-popup .mfp-close {
    display: none;
}

.aios-listings-mobile-gallery-popup .mfp-content {
    min-height: 100%;
}

.aios-listings-mobile-gallery-popup-main {
    position: relative;
    display: block;
    max-width: 1440px;
    background: #000;
    margin: 0 auto;
    padding: 48px 24px;
}

.aios-listings-mobile-gallery-popup-header {
    position: sticky;
    z-index: 10;
    top: 16px;
    display: flex;
    align-items: center;
    padding: 0 16px;
}

.aios-listings-mobile-gallery-popup-counter {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: #e4e4e4;
    background: rgba(30, 30, 30, 0.85);
    border-radius: 4px;
    height: 36px;
    padding: 0 16px;
}

.aios-listings-mobile-gallery-popup-close {
    position: relative;
    padding: 6px;
    background: rgba(30, 30, 30, 0.85);
    border-radius: 4px;
    margin-left: auto;
    width: max-content;
}

.aios-listings-mobile-gallery-popup-close svg {
    display: block;
    width: 24px;
    height: 24px;
    color: #fff;
}

.aios-listings-mobile-gallery-popup-list {
    position: relative;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-top: 16px;
}

.aios-listings-mobile-gallery-popup-item {
    position: relative;
    display: block;
}

.aios-listings-mobile-gallery-popup-item:nth-child(3n - 2),
.aios-listings-mobile-gallery-popup-item:nth-child(2):last-child {
    grid-column: 1 / -1;
}

.aios-listings-mobile-gallery-popup-item img {
    display: block;
    width: 100%;
    height: auto;
    max-height: 500px;
    aspect-ratio: 600/300;
    object-fit: cover;
    object-position: center center;
    transition: opacity 0.3s ease-in-out;
}

.aios-listings-mobile-gallery-popup-item img:not(.aios-lazy-entered) {
    opacity: 0;
}

.aios-listings-mobile-gallery-popup-item img.aios-lazy-error {
    object-fit: scale-down;
    padding: 16px;
    background-color: #f1f1f1;
}

.aios-listings-mobile-gallery-button {
    position: absolute;
    z-index: 10;
    bottom: 0;
    right: 0;
    padding: 15px;
    display: none;
}

.aios-listings-mobile-gallery-button svg {
    display: block;
    width: 32px;
    height: 32px;
    color: #fff;
}

/*******************************************************
 *
 * Mobile styles and other media queries
 *
 *******************************************************/

@media only screen and (max-width: 1600px) {}

@media only screen and (max-width: 1440px) {}

@media only screen and (max-width: 1366px) {}

@media only screen and (max-width: 1280px) {}

@media only screen and (max-width: 1199px) {}

@media only screen and (max-width: 991px) {
    .aios-listings-mobile-gallery-button {
        display: block;
    }
}

@media only screen and (max-width: 767px) {}

@media only screen and (max-width: 480px) {
    .aios-listings-mobile-gallery-popup-list {
        grid-template-columns: 1fr;
    }
}