/* VM PROPERTY DUAL GALLERY V7 */

#villa-gallery-main{
    position:relative!important;
    overflow:hidden!important;
    background:#f3f3f0!important;
}

#villa-main-image{
    display:none!important;
}

/* No separate fullscreen control: direct photo click is the entry point. */
#villa-gallery-fullscreen{
    display:none!important;
    visibility:hidden!important;
    pointer-events:none!important;
}

/* Counter moves to the bottom-left. */
#villa-gallery-counter{
    left:14px!important;
    right:auto!important;
    bottom:14px!important;
    z-index:14!important;
}

/* Existing historical button or V5-created button share the same treatment. */
#villa-gallery-video-shortcut,
.vm-dual7-video{
    position:absolute!important;
    right:14px!important;
    bottom:14px!important;
    left:auto!important;
    z-index:15!important;
    display:none;
    align-items:center;
    justify-content:center;
    min-height:30px;
    margin:0!important;
    padding:7px 11px;
    border:0!important;
    border-radius:0!important;
    background:rgba(0,0,0,.64)!important;
    color:#fff!important;
    font:inherit;
    font-size:.80rem;
    font-weight:700;
    line-height:1;
    letter-spacing:.06em;
    text-transform:uppercase;
    white-space:nowrap;
    cursor:pointer!important;
    box-shadow:none!important;
}

#villa-gallery-video-shortcut:hover,
#villa-gallery-video-shortcut:focus-visible,
.vm-dual7-video:hover,
.vm-dual7-video:focus-visible{
    background:rgba(0,0,0,.82)!important;
}

.vm-dual7-viewport{
    position:relative;
    width:100%;
    height:100%;
    overflow:hidden;
    background:#f3f3f0;
    cursor:pointer!important;
    touch-action:pan-y;
}

.vm-dual7-track{
    display:flex;
    align-items:stretch;
    height:100%;
    gap:1mm;
    will-change:transform;
    transform:translate3d(0,0,0);
    transition:transform 360ms cubic-bezier(.22,.61,.36,1);
}

.vm-dual7-track.is-dragging{
    transition:none!important;
}

.vm-dual7-slide{
    appearance:none;
    -webkit-appearance:none;
    position:relative;
    flex:0 0 calc((100% - 1mm)/2);
    display:flex;
    align-items:center;
    justify-content:center;
    height:100%;
    min-width:0;
    margin:0;
    padding:0;
    border:0;
    border-radius:0;
    overflow:hidden;
    background:#f3f3f0;
    cursor:pointer!important;
}

.vm-dual7-slide:focus-visible{
    outline:2px solid #222;
    outline-offset:-3px;
}

.vm-dual7-image{
    display:block;
    width:100%;
    height:100%;
    color:transparent;
    font-size:0;
    max-width:100%;
    max-height:100%;
    object-fit:contain;
    object-position:center;
    pointer-events:none;
    user-select:none;
    -webkit-user-select:none;
    -webkit-user-drag:none;
    background:#f3f3f0;
}

@media (min-width:769px){
    #villa-gallery-main{
        width:min(calc(100vw - 48px),1440px)!important;
        max-width:1440px!important;
        height:clamp(390px,34vw,560px)!important;
        min-height:390px!important;
        margin:26px auto 0!important;
        border-radius:0!important;
    }

    #villa-gallery-prev,
    #villa-gallery-next{
        display:block!important;
        z-index:12!important;
    }

    #villa-gallery-prev{left:14px!important}
    #villa-gallery-next{right:14px!important}
}

@media (max-width:768px){
    #villa-gallery-main{
        width:100vw!important;
        max-width:100vw!important;
        height:clamp(240px,66.6667vw,460px)!important;
        min-height:0!important;
        margin-left:calc(50% - 50vw)!important;
        margin-right:calc(50% - 50vw)!important;
        border-radius:0!important;
        overflow:hidden!important;
        overscroll-behavior-x:contain;
    }

    .vm-dual7-viewport{
        width:100%!important;
        height:100%!important;
        overflow:hidden!important;
        touch-action:pan-y!important;
        overscroll-behavior-x:contain;
        -webkit-tap-highlight-color:transparent;
    }

    .vm-dual7-track{
        gap:0;
        height:100%;
        backface-visibility:hidden;
        -webkit-backface-visibility:hidden;
    }

    .vm-dual7-slide{
        flex:0 0 100%;
        width:100%;
        height:100%;
        backface-visibility:hidden;
        -webkit-backface-visibility:hidden;
        transform:translateZ(0);
    }

    .vm-dual7-image{
        width:100%;
        height:100%;
        object-fit:contain;
        backface-visibility:hidden;
        -webkit-backface-visibility:hidden;
        transform:translateZ(0);
    }

    #villa-gallery-prev,
    #villa-gallery-next{
        display:none!important;
    }

    #villa-gallery-counter{
        left:10px!important;
        bottom:10px!important;
    }

    #villa-gallery-video-shortcut,
    .vm-dual7-video{
        right:10px!important;
        bottom:10px!important;
        min-height:28px;
        padding:6px 9px;
        font-size:.76rem;
    }
}

@media (prefers-reduced-motion:reduce){
    .vm-dual7-track{transition:none!important}
}