/* ============================================================
   Lightbox slideshow + apartment filters
   ============================================================ */

/* ---------- Lightbox ---------- */
.lightbox{
  position:fixed;inset:0;z-index:2000;
  background:rgba(31,23,26,.94);backdrop-filter:blur(6px);
  display:none;align-items:center;justify-content:center;
  padding:28px 76px;cursor:zoom-out;
}
.lightbox.open{display:flex}

.lb-stage{
  position:relative;margin:0;cursor:default;
  max-width:100%;max-height:100%;
  display:flex;flex-direction:column;align-items:center;gap:14px;
}
.lb-img{
  max-width:min(1200px,100%);max-height:calc(100vh - 150px);
  width:auto;height:auto;object-fit:contain;
  border-radius:10px;box-shadow:0 30px 80px rgba(0,0,0,.5);
  background:none;
}
@keyframes lbInR{from{opacity:0;transform:translateX(26px)}to{opacity:1;transform:none}}
@keyframes lbInL{from{opacity:0;transform:translateX(-26px)}to{opacity:1;transform:none}}
.lb-img.lb-in-r{animation:lbInR .32s cubic-bezier(.22,.61,.36,1)}
.lb-img.lb-in-l{animation:lbInL .32s cubic-bezier(.22,.61,.36,1)}

.lb-cap{
  display:flex;align-items:center;gap:16px;flex-wrap:wrap;justify-content:center;
  color:rgba(250,246,240,.85);font-family:'Jost',sans-serif;
}
.lb-title{
  font-family:'Cormorant Garamond',Georgia,serif;
  font-size:1.35rem;color:#fff;letter-spacing:.02em;
}
.lb-count{
  font-size:.74rem;letter-spacing:.2em;text-transform:uppercase;
  color:#C39C5E;border:1px solid rgba(195,156,94,.4);
  padding:5px 12px;border-radius:100px;white-space:nowrap;
}

/* controls */
.lb-nav,.lb-close{
  position:absolute;z-index:2;
  background:rgba(74,29,40,.55);border:1px solid rgba(195,156,94,.34);
  border-radius:50%;cursor:pointer;display:grid;place-items:center;
  transition:.28s cubic-bezier(.22,.61,.36,1);
}
.lb-nav svg,.lb-close svg{stroke:#E4C88A;fill:none}
.lb-nav:hover,.lb-close:hover{background:#C39C5E;border-color:#C39C5E;transform:scale(1.06)}
.lb-nav:hover svg,.lb-close:hover svg{stroke:#3A141D}
.lb-nav:focus-visible,.lb-close:focus-visible{outline:2px solid #E4C88A;outline-offset:3px}

.lb-nav{top:50%;transform:translateY(-50%);width:54px;height:54px}
.lb-nav:hover{transform:translateY(-50%) scale(1.06)}
.lb-nav svg{width:24px;height:24px}
.lb-prev{left:16px}
.lb-next{right:16px}
.lb-nav[hidden]{display:none}

.lb-close{top:18px;right:18px;width:46px;height:46px}
.lb-close svg{width:19px;height:19px}

/* Hide the concierge launcher while the lightbox is open */
body.lb-open .cc-launch,body.lb-open .wa-float{opacity:0;pointer-events:none}

/* ---------- Apartment filters ---------- */
.filter-chip{
  font-family:'Jost',sans-serif;
  background:#fff;
}
.filter-chip[aria-pressed="true"]{
  background:var(--maroon,#4A1D28);color:#fff;border-color:var(--maroon,#4A1D28);
}
.filter-chip:focus-visible{outline:2px solid var(--gold,#C39C5E);outline-offset:2px}

.apt-count{
  text-align:center;font-size:.76rem;letter-spacing:.18em;text-transform:uppercase;
  color:var(--gold-deep,#A67C3D);margin:0 0 28px;min-height:1em;
}

.apt-card.apt-hide{display:none}

.apt-empty{
  text-align:center;padding:56px 20px;
}
.apt-empty p{
  font-family:'Cormorant Garamond',Georgia,serif;
  font-size:1.5rem;color:var(--maroon,#4A1D28);margin-bottom:20px;
}
.apt-empty[hidden]{display:none}

#aptMore.is-done{
  opacity:.65;cursor:default;pointer-events:none;
}
#aptMoreWrap[hidden]{display:none}

/* ---------- Mobile ---------- */
@media(max-width:860px){
  /* Arrows stay absolutely positioned over the edges, sized for thumbs.
     Padding gives the image room so the arrows never sit on top of it. */
  .lightbox{padding:14px 62px}
  .lb-img{max-height:calc(100dvh - 180px);border-radius:8px}
  .lb-stage{gap:12px}

  .lb-nav{width:44px;height:44px;background:rgba(74,29,40,.78)}
  .lb-prev{left:8px}
  .lb-next{right:8px}
  .lb-nav svg{width:21px;height:21px}

  .lb-close{
    top:max(14px,env(safe-area-inset-top));right:14px;
    width:46px;height:46px;background:rgba(74,29,40,.78);
  }

  .lb-cap{flex-direction:column;gap:8px}
  .lb-title{font-size:1.12rem;text-align:center;padding:0 6px}
  .lb-count{font-size:.68rem;padding:5px 11px}

  .apt-count{margin-bottom:22px;font-size:.72rem}
  .apt-empty{padding:44px 16px}
  .apt-empty p{font-size:1.3rem}
}

@media(max-width:380px){
  .lb-nav{width:42px;height:42px}
  .lb-nav svg{width:19px;height:19px}
  .lb-title{font-size:1.05rem}
}

@media(prefers-reduced-motion:reduce){
  .lb-img.lb-in-r,.lb-img.lb-in-l{animation:none}
  .lb-nav,.lb-close{transition:none}
}

/* Screen-reader-only announcement for slide changes */
.lb-live{
  position:absolute;width:1px;height:1px;overflow:hidden;
  clip:rect(0 0 0 0);white-space:nowrap;margin:-1px;padding:0;border:0;
}
