.htpg-gallery {
    position: relative;
    width: 100%;
    background: #17242d;
}

.htpg-track {
    display: flex;
    overflow-x: auto;
    direction: ltr;
    touch-action: pan-y pinch-zoom;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}

.htpg-track::-webkit-scrollbar {
    display: none;
}

.htpg-slide {
    flex: 0 0 100%;
    min-width: 0;
    scroll-snap-align: start;
    scroll-snap-stop: always;
    aspect-ratio: var(--htpg-ratio, 4 / 3);
}

.htpg-open {
    appearance: none;
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: zoom-in;
}

.htpg-open img {
    display: block;
    position: static !important;
    width: 100%;
    height: 100%;
    object-fit: cover;
    -webkit-user-drag: none;
    user-select: none;
}

.htpg-nav,
.htpg-position {
    position: absolute;
    z-index: 2;
    color: #fff;
    background: rgba(13, 25, 36, .78);
}

.htpg-nav {
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    font: 22px/1 system-ui, sans-serif;
}

.htpg-prev { left: 10px; }
.htpg-next { right: 10px; }

/* Keep the arrow contrast independent of the photo and Houzez's button colors. */
.htpg-gallery button.htpg-nav {
    color: #fff !important;
    background-color: #0d1924 !important;
}

.htpg-gallery button.htpg-nav:hover,
.htpg-gallery button.htpg-nav:focus-visible {
    background-color: #135784 !important;
}

.htpg-gallery button.htpg-nav:focus-visible {
    outline: 3px solid #fff !important;
    outline-offset: -4px;
}

.htpg-gallery button.htpg-nav:active {
    background-color: #0b3554 !important;
}

.htpg-gallery button.htpg-nav[aria-disabled="true"] {
    color: #e2e8f0 !important;
    background-color: #465360 !important;
}

.htpg-position {
    right: 10px;
    bottom: 10px;
    padding: 4px 10px;
    border-radius: 20px;
    font: 13px/1.4 system-ui, sans-serif;
}

.htpg-track:focus-visible,
.htpg-open:focus-visible,
.htpg-nav:focus-visible {
    outline: 3px solid #fff;
    outline-offset: -4px;
    box-shadow: inset 0 0 0 6px #135784;
}

.htpg-enhanced > .property-banner-trigger,
.htpg-enhanced > .property-image-count {
    display: none !important;
}
