.phi-card-gallery {
    position: relative;
    isolation: isolate;
}

.phi-photo-arrow, .phi-photo-count {
    display: none;
}

.phi-card-galleries-ready .phi-card-gallery .property-picture {
    touch-action: pan-y pinch-zoom;
}

.phi-card-galleries-ready .phi-photo-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: #183447;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.phi-photo-arrow::before, .phi-photo-arrow::after {
    content: "";
    grid-area: 1 / 1;
}

.phi-photo-arrow::before {
    width: 25px;
    height: 25px;
    border-radius: 50%;
    background: rgb(255 255 255 / 30%);
    
}

.phi-photo-arrow::after {
    width: 8px;
    height: 8px;
    border: solid currentColor;
    border-width: 0 1.8px 1.8px 0;
    filter: drop-shadow(0 0 1px rgb(255 255 255 / 85%));
}

.phi-photo-prev { left: 4px; }
.phi-photo-next { right: 4px; }
.phi-photo-prev::after { transform: translateX(1px) rotate(135deg); }
.phi-photo-next::after { transform: translateX(-1px) rotate(-45deg); }
.phi-photo-arrow:focus-visible { outline: 3px solid #193549; outline-offset: -3px; }
@media (hover: hover) {
    .phi-photo-arrow:hover::before, .phi-photo-arrow:focus-visible::before { background: rgb(255 255 255 / 65%); }
}

.phi-card-galleries-ready .phi-photo-count {
    display: block;
    position: absolute;
    bottom: 10px;
    right: 10px;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgb(255 255 255 / 65%);
    color: #183447;
    font: 600 12px/1.4 system-ui, sans-serif;
    font-variant-numeric: tabular-nums;
    pointer-events: none;
}

.phi-card-galleries-ready .property .phi-photo-arrow {
    opacity: 0;
    pointer-events: none;
}
@media (hover: hover) and (pointer: fine) {
    .phi-card-galleries-ready .property .phi-photo-count { opacity: 0; }
    .phi-card-galleries-ready .property:hover .phi-photo-count,
    .phi-card-galleries-ready .property:has(:focus-visible) .phi-photo-count { opacity: 1; }
    .phi-card-galleries-ready .property:hover .phi-photo-arrow {
        opacity: 1;
        pointer-events: auto;
    }
}
.phi-card-galleries-ready .property:has(:focus-visible) .phi-photo-arrow {
    opacity: 1;
    pointer-events: auto;
}
.phi-card-galleries-ready .phi-card-gallery .property-picture.phi-swipe-ready { touch-action: auto; }
.phi-touch-track {
    position: absolute;
    inset: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
}
.phi-touch-track::-webkit-scrollbar { display: none; }
.phi-touch-slide {
    display: block;
    flex: 0 0 100%;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    scroll-snap-align: start;
    scroll-snap-stop: always;
}
.phi-card-gallery .phi-touch-track img { transform: none; }
.phi-card-gallery .phi-swipe-ready::after { pointer-events: none; }
