.acf-airbnb-gallery-wrap,
.acf-airbnb-gallery-wrap * {
    box-sizing: border-box;
}

.acf-airbnb-gallery-wrap {
    --acf-airbnb-gallery-gap: 6px;
    --acf-airbnb-gallery-large-height: 420px;
    --acf-airbnb-gallery-small-height: calc((var(--acf-airbnb-gallery-large-height) - var(--acf-airbnb-gallery-gap)) / 2);
    --acf-airbnb-gallery-radius: 12px;
    --acf-airbnb-gallery-swap-duration: 0.82s;
    --acf-airbnb-gallery-swap-easing: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.acf-airbnb-gallery {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "large top-left top-right"
        "large bottom-left bottom-right";
    gap: var(--acf-airbnb-gallery-gap);
    border-radius: var(--acf-airbnb-gallery-radius);
    overflow: hidden;
    position: relative;
    align-items: stretch;
}

.acf-airbnb-gallery__item {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    display: block;
    position: relative;
    overflow: hidden;
    background: #f3f3f3;
    height: var(--acf-airbnb-gallery-small-height);
    width: 100%;
    min-width: 0;
    border-radius: var(--acf-airbnb-gallery-radius);
    isolation: isolate;
}

.acf-airbnb-gallery__item--large {
    grid-area: large;
    grid-row: span 2;
    height: var(--acf-airbnb-gallery-large-height);
}

.acf-airbnb-gallery__item:nth-of-type(2) {
    grid-area: top-left;
}

.acf-airbnb-gallery__item:nth-of-type(3) {
    grid-area: top-right;
}

.acf-airbnb-gallery__item:nth-of-type(4) {
    grid-area: bottom-left;
}

.acf-airbnb-gallery__item:nth-of-type(5) {
    grid-area: bottom-right;
}

.acf-airbnb-gallery__item img,
.acf-airbnb-mobile-carousel__photo img,
.acf-airbnb-mobile-carousel__thumb img,
.acf-airbnb-lightbox__thumb img {
    width: 100% !important;
    height: 100% !important;
    display: block;
    max-width: none !important;
    max-height: none !important;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover !important;
    object-position: center center !important;
    aspect-ratio: auto !important;
}

.acf-airbnb-gallery__item img,
.acf-airbnb-mobile-carousel__photo img {
    border-radius: inherit;
    z-index: 1;
}

.acf-airbnb-gallery__item img,
.acf-airbnb-mobile-carousel__photo img,
.acf-airbnb-lightbox__image {
    transition: opacity var(--acf-airbnb-gallery-swap-duration) var(--acf-airbnb-gallery-swap-easing), transform var(--acf-airbnb-gallery-swap-duration) var(--acf-airbnb-gallery-swap-easing);
    will-change: opacity, transform;
}

.acf-airbnb-gallery__item img,
.acf-airbnb-mobile-carousel__photo img,
.acf-airbnb-mobile-carousel__thumb img,
.acf-airbnb-lightbox__thumb img {
    position: absolute;
    inset: 0;
}

.acf-airbnb-gallery__item img {
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.acf-airbnb-gallery__item img.acf-airbnb-image-entering,
.acf-airbnb-mobile-carousel__photo img.acf-airbnb-image-entering {
    opacity: 0;
    transform: scale(1.045);
}

.acf-airbnb-image-ghost {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    min-width: 100%;
    min-height: 100%;
    object-fit: cover !important;
    object-position: center center !important;
    border-radius: inherit;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
    transform: scale(1);
    transition: opacity var(--acf-airbnb-gallery-swap-duration) var(--acf-airbnb-gallery-swap-easing), transform var(--acf-airbnb-gallery-swap-duration) var(--acf-airbnb-gallery-swap-easing);
}

.acf-airbnb-image-ghost.is-exiting {
    opacity: 0;
    transform: scale(0.985);
}

.acf-airbnb-gallery__item:hover img {
    transform: scale(1.03);
    opacity: 0.92;
}

.acf-airbnb-lightbox__stage.is-swapping .acf-airbnb-lightbox__image {
    opacity: 0.45;
    transform: scale(1.025);
}

.acf-airbnb-gallery__button {
    position: absolute;
    right: 16px;
    bottom: 16px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #ffffff;
    color: #111111;
    padding: 9px 13px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
    z-index: 2;
    pointer-events: none;
}

.acf-airbnb-gallery__icon {
    font-size: 14px;
    line-height: 1;
}

.acf-airbnb-mobile-carousel {
    display: none;
}

.acf-airbnb-mobile-carousel__main {
    position: relative;
    height: 320px;
    overflow: hidden;
    border-radius: var(--acf-airbnb-gallery-radius);
    background: #f3f3f3;
}

.acf-airbnb-mobile-carousel__photo {
    appearance: none;
    border: 0;
    padding: 0;
    margin: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: pointer;
    background: transparent;
    border-radius: var(--acf-airbnb-gallery-radius);
    position: relative;
    isolation: isolate;
}

.acf-airbnb-mobile-carousel__arrow,
.acf-airbnb-lightbox__arrow,
.acf-airbnb-lightbox__close {
    appearance: none;
    border: 0;
    cursor: pointer;
    font-family: Arial, sans-serif;
}

.acf-airbnb-mobile-carousel__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.92);
    color: #111111;
    font-size: 30px;
    line-height: 1;
    z-index: 3;
}

.acf-airbnb-mobile-carousel__arrow--prev {
    left: 10px;
}

.acf-airbnb-mobile-carousel__arrow--next {
    right: 10px;
}

.acf-airbnb-mobile-carousel__count {
    position: absolute;
    right: 12px;
    bottom: 12px;
    background: rgba(0, 0, 0, 0.68);
    color: #ffffff;
    padding: 5px 9px;
    border-radius: 999px;
    font-size: 13px;
    z-index: 3;
}

.acf-airbnb-mobile-carousel__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    padding-top: 10px;
    -webkit-overflow-scrolling: touch;
}

.acf-airbnb-mobile-carousel__thumb {
    appearance: none;
    border: 2px solid transparent;
    padding: 0;
    margin: 0;
    width: 72px;
    min-width: 72px;
    height: 56px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    opacity: 0.65;
    position: relative;
}

.acf-airbnb-mobile-carousel__thumb.is-active {
    border-color: #111111;
    opacity: 1;
}

.acf-airbnb-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 70px 24px 130px;
}

.acf-airbnb-lightbox.is-open {
    display: flex;
}

.acf-airbnb-lightbox__stage {
    width: 100%;
    height: 100%;
    max-width: 1180px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.acf-airbnb-lightbox__image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    display: block;
}

.acf-airbnb-lightbox__close {
    position: absolute;
    top: 18px;
    right: 22px;
    width: 42px;
    height: 42px;
    border-radius: 999px;
    background: #ffffff;
    color: #111111;
    font-size: 32px;
    line-height: 1;
    z-index: 5;
}

.acf-airbnb-lightbox__arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 999px;
    background: #ffffff;
    color: #111111;
    font-size: 38px;
    line-height: 1;
    z-index: 5;
}

.acf-airbnb-lightbox__arrow--prev {
    left: 22px;
}

.acf-airbnb-lightbox__arrow--next {
    right: 22px;
}

.acf-airbnb-lightbox__bottom {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 18px;
    padding: 0 24px;
    z-index: 6;
}

.acf-airbnb-lightbox__count {
    color: #ffffff;
    text-align: center;
    margin-bottom: 12px;
    font-size: 14px;
}

.acf-airbnb-lightbox__thumbs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    justify-content: center;
    -webkit-overflow-scrolling: touch;
}

.acf-airbnb-lightbox__thumb {
    appearance: none;
    border: 2px solid transparent;
    padding: 0;
    margin: 0;
    width: 76px;
    min-width: 76px;
    height: 58px;
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    background: transparent;
    opacity: 0.55;
    position: relative;
}

.acf-airbnb-lightbox__thumb.is-active {
    border-color: #ffffff;
    opacity: 1;
}

@media (max-width: 1024px) {
    .acf-airbnb-gallery {
        grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
        grid-template-areas:
            "large top"
            "large bottom";
    }

    .acf-airbnb-gallery__item:nth-of-type(2) {
        grid-area: top;
    }

    .acf-airbnb-gallery__item:nth-of-type(3) {
        grid-area: bottom;
    }

    .acf-airbnb-gallery__item:nth-of-type(n + 4) {
        display: none;
    }
}

@media (max-width: 767px) {
    .acf-airbnb-gallery {
        display: none;
    }

    .acf-airbnb-mobile-carousel {
        display: block;
    }

    .acf-airbnb-lightbox {
        padding: 62px 12px 118px;
    }

    .acf-airbnb-lightbox__arrow {
        width: 38px;
        height: 38px;
        font-size: 32px;
    }

    .acf-airbnb-lightbox__arrow--prev {
        left: 10px;
    }

    .acf-airbnb-lightbox__arrow--next {
        right: 10px;
    }

    .acf-airbnb-lightbox__thumbs {
        justify-content: flex-start;
    }
}
