/* Shared photo-only card surface. Controls are siblings of the normal link. */
.rw-card-gallery{position:relative;display:block;min-width:0;isolation:isolate;overflow:hidden;background:var(--paper,#f7f7f5);touch-action:pan-y pinch-zoom}
.rw-card-gallery .card-image-link{display:block;width:100%;height:100%;overflow:hidden;touch-action:pan-y pinch-zoom}
.rw-card-gallery .card-photo{display:block;width:100%;object-fit:cover;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;will-change:transform}
.rw-card-gallery .rw-card-incoming{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;object-fit:cover;visibility:hidden}
.rw-card-gallery .rw-card-arrow{position:absolute;z-index:5;top:calc(50% - 22px);width:44px;height:44px;min-width:44px;padding:0;border:1px solid #ffffffa8;border-radius:50%;background:#20242bc4;color:#fff;font-size:27px;line-height:1;display:grid;place-items:center;cursor:pointer;touch-action:manipulation}
.rw-card-gallery .rw-card-prev{left:4px}.rw-card-gallery .rw-card-next{right:4px}
.rw-card-gallery .rw-card-arrow:disabled{opacity:.35;cursor:default}.rw-card-gallery .rw-card-arrow:focus-visible{outline:3px solid var(--brand,#F47716);outline-offset:2px}
.rw-card-gallery .photo-count{position:absolute;z-index:4;bottom:8px;left:8px;right:auto;top:auto;background:#20242bd9;color:#fff;border:1px solid #ffffff85;border-radius:8px;padding:3px 8px;font-size:12px;line-height:1.5;pointer-events:none}
.rw-card-gallery .rw-card-status{position:absolute;z-index:4;inset:auto 8px 40px;padding:4px 8px;border-radius:6px;background:#fff;color:#25282d;font-size:12px;pointer-events:none}
.rw-card-gallery .rw-card-status:empty{display:none}.rw-card-gallery [hidden]{display:none!important}
.rw-card-gallery.rw-owned-photo{width:100%;height:auto;aspect-ratio:3/2;min-height:0;padding:0}.rw-card-gallery.rw-owned-photo>.card-image-link{position:absolute;inset:0}.rw-card-gallery.rw-owned-photo img{height:100%;object-fit:contain}
.rw-geo-card>.rw-card-gallery{width:112px;height:96px;flex-shrink:0;grid-row:1}.rw-geo-card>.rw-card-gallery img{width:112px;height:96px;margin:0}.rw-geo-card .rw-card-arrow{background:#20242baf}.rw-geo-card .photo-count{font-size:10px;padding:1px 4px;bottom:2px;left:3px}
.home-hero.rw-card-gallery>.card-image-link{position:absolute;inset:0}.home-hero.rw-card-gallery .card-photo{height:100%}.home-hero.rw-card-gallery .hero-caption{pointer-events:none}.home-hero.rw-card-gallery .photo-count{top:12px;bottom:auto}.home-hero.rw-card-gallery .rw-card-arrow{top:calc(45% - 22px)}
@media(prefers-reduced-motion:reduce){.rw-card-gallery img{transition:none!important}}

.rw-card-gallery .type-chip,.rw-card-gallery .cover-badge{z-index:3}
#photo-dialog .lightbox-toolbar button,#photo-dialog .lightbox-prev,#photo-dialog .lightbox-next,.main-photo-wrap .gallery-arrow{min-width:44px;min-height:44px}
#photo-dialog[open]{position:fixed;inset:0;z-index:2000}.main-photo-wrap{overflow:hidden}
.listing-card>.rw-card-gallery .no-photo{height:218px;display:grid;place-items:center;text-align:center;padding:16px;color:var(--muted,#666c73)}
.home-grid .listing-card>.rw-card-gallery .no-photo{height:155px}
@media(max-width:1100px){.listing-card>.rw-card-gallery .no-photo{height:185px}}
@media(max-width:560px){.listing-card>.rw-card-gallery .no-photo,.home-grid .listing-card>.rw-card-gallery .no-photo{height:225px}}
.home-property-card>.rw-card-gallery .no-photo{height:188px}
@media(max-width:680px){.home-property-card>.rw-card-gallery .no-photo{height:210px}}

#photo-dialog.rw-dialog-fallback[open]{display:flex;flex-direction:column;width:100vw;height:100vh;max-width:100vw;max-height:100vh;margin:0;border-radius:0;padding:max(12px,env(safe-area-inset-top)) 12px max(12px,env(safe-area-inset-bottom));background:#111820}

/* The viewport contains only photos; text and controls never enter the track. */
.rw-photo-viewport{display:block;position:absolute!important;overflow:hidden!important;isolation:isolate;contain:paint;pointer-events:none;visibility:hidden;z-index:1;border-radius:inherit;background:#ededeb}
.rw-photo-track{position:absolute!important;display:block;inset:0;width:100%;height:100%;will-change:transform;backface-visibility:hidden;-webkit-backface-visibility:hidden}
.rw-photo-viewport .rw-photo-slide{position:absolute!important;display:block!important;right:auto!important;bottom:auto!important;top:0!important;left:0;width:100%!important;height:100%!important;max-width:none!important;max-height:none!important;margin:0!important;border:0!important;border-radius:0!important;object-fit:contain;background:#ededeb;pointer-events:none;transform:none!important;transition:none!important;animation:none!important;user-select:none;-webkit-user-select:none;-webkit-user-drag:none;visibility:visible}
#photo-dialog .lightbox-stage,#photo-dialog #original-photo,#photo-dialog .rw-photo-viewport,#photo-dialog .rw-photo-track,#photo-dialog .rw-photo-slide{background:#111820}
.rw-card-gallery,.main-photo-wrap,.lightbox-stage{overscroll-behavior-x:contain}
.main-photo-wrap .gallery-counter,.main-photo-wrap .cover-badge,.main-photo-wrap .gallery-arrow,.main-photo-wrap .photo-open-label{z-index:3}
.lightbox-stage .lightbox-prev,.lightbox-stage .lightbox-next{z-index:3}
.rw-gallery-status{position:absolute;z-index:4;bottom:46px;left:12px;right:12px;background:#ffffffeb;color:var(--ink);padding:8px 12px;border-radius:8px;font-size:12px}
.rw-gallery-status:empty{display:none}
@media(hover:none),(pointer:coarse){.listing-card:hover .rw-card-gallery .card-photo{transform:none}}
#rw-map-cards .rw-geo-card>.rw-card-gallery{z-index:2}
