/* ===== MLS Gallery (scoped) ===== */
.mls-gallery{display:grid;grid-template-columns:1.7fr 1fr; margin-bottom: 30px; gap:12px;align-items:stretch}
@media (max-width: 992px){.mls-gallery{grid-template-columns:1fr}}
.mls-gallery .mls-main{
  position:relative;overflow:hidden;border-radius:14px;background:#111
}
.mls-gallery .mls-main img{
  width:100%;height:100%;object-fit:cover;display:block;aspect-ratio:16/10
}
@media (min-width: 1200px){.mls-gallery .mls-main img{aspect-ratio:21/13}}

.mls-gallery .mls-thumbs{
  display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:1fr;gap:12px
}
@media (max-width: 992px){
  .mls-gallery .mls-thumbs{display:flex;gap:10px;overflow-x:auto}
  .mls-gallery .mls-thumbs::-webkit-scrollbar{height:8px}
}
.mls-gallery .mls-thumb{
  position:relative; overflow:hidden;padding:0;border:none;background:#000;cursor:pointer
}
.mls-gallery .mls-thumb img{width:100%;height:100%;object-fit:cover;display:block;aspect-ratio:1/1}

/* Last thumb overlay — now includes total photo count */
.mls-gallery .mls-thumb.see-all::after{
  content:"See all " attr(data-total) " photos";
  position:absolute; inset:auto 10px 10px 10px;
  display:flex; justify-content:center; align-items:center;
  padding:10px 12px; border-radius:999px; background:#29b6a5; color:#fff;
  font:600 14px/1.1 system-ui, -apple-system, Segoe UI, Roboto, "Inter", Arial;
  box-shadow:0 6px 18px rgba(0,0,0,.25);
}
/* keep the gradient veil */
.mls-gallery .mls-thumb.see-all::before{
  content:""; position:absolute; inset:0;
  background:linear-gradient(180deg,transparent 30%,rgba(0,0,0,.45));
}

/* on mobile we hide that overlay because you have the top-right pill */
@media (max-width: 992px){
  .mls-gallery .mls-thumb.see-all::after{ display:none; }
}


/* Hide RealtyPress’ default UI after we build ours */
.rps-legacy-hidden{display:none !important}

/* ===== Fullscreen viewer ===== */
/* ===== Fullscreen viewer (clean version) ===== */
.mls-modal{ position:fixed; inset:0; background:rgba(0,0,0,.95); display:none; z-index:9999;
  /* layout vars */
  --railW:140px;          /* thumbnail rail width */
  --railPad:28px;         /* padding from viewport right/top/bottom */
  --ctrlPad:28px;         /* left arrow offset */
  --btnSize:46px;         /* control size */
  --btnBg:rgba(255,255,255,.95);
  --btnFg:#111;
  --btnBorder:rgba(17,17,17,.1);
  --btnShadow:0 6px 18px rgba(0,0,0,.25);
}
.mls-modal.is-open{ display:block; }

/* stage + layout */
.mls-modal .mm-wrap{
  position:relative; height:100%; width:100%;
  display:flex; gap:18px; padding:28px; box-sizing:border-box;
  padding-right: calc(var(--railW) + var(--railPad) + 32px); /* space for rail */
}
.mls-modal .mm-stage{ flex:1 1 auto; display:flex; align-items:center; justify-content:center; min-width:0; }
.mls-modal .mm-stage img{ max-width:100%; max-height:100%; object-fit:contain; border-radius:14px; }

/* rail pinned on right */
.mls-modal .mm-rail{
  position:fixed; right:var(--railPad); top:calc(var(--railPad) + var(--btnSize) + 10px); bottom:var(--railPad);
  width:var(--railW) !important; max-width:var(--railW) !important;
  overflow-y:auto !important; overflow-x:hidden !important;
  display:block !important;
  scrollbar-width:thin; scrollbar-color:rgba(255,255,255,.35) transparent;
}
.mls-modal .mm-rail::-webkit-scrollbar{ width:8px; }
.mls-modal .mm-rail::-webkit-scrollbar-track{ background:transparent; }
.mls-modal .mm-rail::-webkit-scrollbar-thumb{
  background:rgba(255,255,255,.28); border-radius:8px; border:2px solid transparent; background-clip:padding-box;
}
.mls-modal .mm-rail::-webkit-scrollbar-thumb:hover{ background:rgba(255,255,255,.45); }

/* rail thumbs */
.mls-modal .mm-t{ border:none; padding:0; background:#111; border-radius:10px; overflow:hidden; cursor:pointer; opacity:.85; width:100%; }
.mls-modal .mm-t:hover, .mls-modal .mm-t.active{ opacity:1; }
.mls-modal .mm-t img{ display:block; width:100% !important; height:92px !important; object-fit:cover; border-radius:10px; }

/* controls (prev/next/close) */
.mls-modal .mm-close, .mls-modal .mm-prev, .mls-modal .mm-next{
  position:absolute; width:var(--btnSize); height:var(--btnSize);
  border-radius:999px; border:1px solid var(--btnBorder); background:var(--btnBg);
  box-shadow:var(--btnShadow); display:grid; place-items:center; padding:0; cursor:pointer;
  color:transparent; text-indent:-9999px; overflow:hidden; z-index:10005;
  transition:transform .15s ease, box-shadow .2s ease;
}
.mls-modal .mm-close:focus-visible, .mls-modal .mm-prev:focus-visible, .mls-modal .mm-next:focus-visible{
  box-shadow:0 0 0 4px rgba(41,182,165,.35), var(--btnShadow);
}

/* icons (SVG masks) */
.mls-modal .mm-prev::before, .mls-modal .mm-next::before, .mls-modal .mm-close::before{
  content:""; width:20px; height:20px; background:var(--btnFg); display:block;
  mask-size:20px 20px; -webkit-mask-size:20px 20px; mask-repeat:no-repeat; -webkit-mask-repeat:no-repeat; mask-position:center; -webkit-mask-position:center;
}
.mls-modal .mm-prev::before{
  mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>');
  -webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M15.41 7.41 14 6l-6 6 6 6 1.41-1.41L10.83 12z"/></svg>');
}
.mls-modal .mm-next::before{
  mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.59 10 18l6-6-6-6-1.41 1.41L13.17 12z"/></svg>');
  -webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.59 10 18l6-6-6-6-1.41 1.41L13.17 12z"/></svg>');
}
.mls-modal .mm-close::before{
  width:18px; height:18px;
  mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.3 5.71 12 12.01 5.7 5.71 4.29 7.12l6.3 6.3-6.3 6.29 1.41 1.41 6.3-6.29 6.29 6.29 1.41-1.41-6.29-6.29 6.29-6.3z"/></svg>');
  -webkit-mask-image:url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18.3 5.71 12 12.01 5.7 5.71 4.29 7.12l6.3 6.3-6.3 6.29 1.41 1.41 6.3-6.29 6.29 6.29 1.41-1.41-6.29-6.29 6.29-6.3z"/></svg>');
}

/* positions */
.mls-modal .mm-prev{ left:var(--ctrlPad); top:50%; transform:translateY(-50%); }
.mls-modal .mm-next{ right: calc(var(--railW) + var(--railPad) + 20px) !important; top:50%; transform:translateY(-50%); }
.mls-modal .mm-close{ top:var(--railPad) !important; right:var(--railPad) !important; }

.mls-modal .mm-count{
  position:absolute; left:50%; bottom:22px; transform:translateX(-50%);
  background:#fff; padding:8px 14px; border-radius:999px; font-weight:600;
}

/* mobile: hide rail, reset paddings/positions */
@media (max-width:900px){
  .mls-modal .mm-rail{ display:none !important; }
  .mls-modal .mm-wrap{ padding-right:14px; }
  .mls-modal .mm-next{ right:20px !important; }
  .mls-modal .mm-close{ right:20px !important; top:14px !important; }
}

/* lock background scroll when modal is open */
.mls-lock{ overflow:hidden !important; height:100% !important; }


/* Force the chevron/X to be dead-center in the round buttons */
.mls-modal .mm-close,
.mls-modal .mm-prev,
.mls-modal .mm-next{
  position:absolute;             /* already absolute for placement */
  display:block;                 /* avoid grid/line-height interference */
}

.mls-modal .mm-prev::before,
.mls-modal .mm-next::before,
.mls-modal .mm-close::before{
  position:absolute;             /* anchor to the button itself */
  top:50%;
  left:50%;
  transform:translate(-50%, -50%);  /* PERFECT center */
  width:20px; height:20px;          /* icon size (close is 18px if you prefer) */
}

/* optional: make the close a touch smaller to taste */
.mls-modal .mm-close::before{ width:18px; height:18px; }


/* Mobile "View all photos" pill on the main image */
.mls-viewall-mobile{
  position:absolute; top:10px; right:10px;
  padding:8px 12px; border-radius:999px;
  background:#29b6a5; color:#fff; font:600 14px/1.1 system-ui, -apple-system, Segoe UI, Roboto, "Inter", Arial;
  box-shadow:0 6px 18px rgba(0,0,0,.25); border:0; cursor:pointer; z-index:2;
}

/* show the pill only on mobile; hide the thumb overlay on mobile */
@media (min-width: 993px){
  .mls-viewall-mobile{ display:none; }
}
@media (max-width: 992px){
  .mls-gallery .mls-thumb.see-all::after{ display:none; } /* remove duplicate CTA on mobile */
}


/* Desktop: square right edge on the main photo */
@media (min-width: 993px){
  .mls-gallery .mls-main,
  .mls-gallery .mls-main img{
    border-radius: 14px 0 0 14px !important; /* TL TR BR BL */
  }
}








/* ============ Amenities Chip Row ============ */
/* Chip row */
.rps-single-features--chips{
  display:flex; flex-wrap:wrap; gap:10px 12px;
  padding:14px 0 6px;
  border-top:1px solid #eef1f4;
}

/* Chip */
.rps-single-features--chips .rps-single-feature-label-sm{
  --chip-bg:#f7fafc; --chip-border:#e6ebf0; --chip-text:#2b2f36;
  --chip-shadow:0 1px 0 rgba(16,24,40,.05);
  --chip-shadow-hover:0 4px 10px rgba(16,24,40,.08);

  display:inline-flex; align-items:center; gap:8px;
  padding:8px 12px;
  border-radius:999px;
  background:linear-gradient(180deg,#fff 0%,var(--chip-bg) 100%);
  border:1px solid var(--chip-border);
  color:var(--chip-text);
  font-size:13.5px; line-height:1.2;
  box-shadow:var(--chip-shadow);
  transition:transform .15s ease, box-shadow .15s ease, border-color .15s ease;
  white-space:nowrap;
}

.rps-single-features--chips .rps-single-feature-label-sm:hover{
  transform:translateY(-1px);
  box-shadow:var(--chip-shadow-hover);
  background:#fff; border-color:#d7dde3;
}

/* Font-Awesome icon wrapper INSIDE chip */
.rps-single-features--chips .rps-chip-icon{
  width:20px; height:20px;
  border:1px solid #d6dde4; border-radius:6px;
  display:inline-flex; align-items:center; justify-content:center;
  font-size:12px; color:#2c333a;    /* icon color */
  background:#fff;
}

/* compact on mobile */
@media (max-width:768px){
  .rps-single-features--chips{ gap:8px; }
  .rps-single-features--chips .rps-single-feature-label-sm{
    padding:7px 10px; font-size:13px;
  }
}
