/* Shared property gallery lightbox (tenant websites) */
.ef-lb-open {
  overflow: hidden !important;
}

.ef-lb {
  position: fixed;
  inset: 0;
  z-index: 4000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(0, 0, 0, 0.9);
}

.ef-lb.is-open {
  display: flex;
}

.ef-lb__close,
.ef-lb__nav,
.ef-lb__zoom button {
  border: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

.ef-lb__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  font-size: 1.35rem;
  line-height: 1;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

.ef-lb__close:hover {
  background: rgba(255, 255, 255, 0.28);
}

.ef-lb__zoom {
  position: absolute;
  top: 1rem;
  left: 1rem;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  padding: 0.3rem;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.78);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.ef-lb__zoom button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: 9999px;
  background: transparent;
  color: #fff;
  font-size: 1.1rem;
  line-height: 1;
}

.ef-lb__zoom button:hover {
  background: rgba(255, 255, 255, 0.14);
}

.ef-lb__pct {
  min-width: 3.4rem;
  padding: 0 0.15rem;
  text-align: center;
  color: #f8fafc;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  font-variant-numeric: tabular-nums;
}

.ef-lb__nav {
  position: absolute;
  top: 50%;
  z-index: 8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.5rem;
  height: 3.5rem;
  border-radius: 9999px;
  background: #fff;
  color: #0f172a;
  font-size: 1.75rem;
  line-height: 1;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
  transform: translateY(-50%);
  transition: background 0.15s ease, transform 0.15s ease;
}

.ef-lb__nav:hover {
  background: #eff6ff;
  color: #0b3d91;
  transform: translateY(-50%) scale(1.04);
}

.ef-lb__nav--prev {
  left: max(0.85rem, env(safe-area-inset-left, 0px));
}

.ef-lb__nav--next {
  right: max(0.85rem, env(safe-area-inset-right, 0px));
}

.ef-lb__stage {
  position: relative;
  z-index: 1;
  display: flex;
  width: min(100%, 52rem);
  max-height: 100%;
  flex-direction: column;
  align-items: center;
  padding: 0 4.75rem;
  pointer-events: none;
}

.ef-lb__stage > * {
  pointer-events: auto;
}

.ef-lb__viewport {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(calc(100vw - 7.5rem), 52rem);
  height: min(78vh, 42rem);
  overflow: hidden;
  border-radius: 0.75rem;
  background: #0f172a;
  touch-action: none;
  cursor: zoom-in;
  user-select: none;
}

.ef-lb__viewport.is-zoomed {
  cursor: grab;
}

.ef-lb__viewport.is-dragging {
  cursor: grabbing;
}

.ef-lb__transform {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transform-origin: center center;
  will-change: transform;
}

.ef-lb__img {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  pointer-events: none;
}

.ef-lb__count {
  margin: 0.75rem 0 0;
  padding: 0.35rem 0.85rem;
  border-radius: 9999px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  font-size: 0.8125rem;
  font-weight: 600;
}

.ef-lb__hint {
  margin: 0.45rem 0 0;
  color: rgba(226, 232, 240, 0.75);
  font-size: 0.75rem;
  font-weight: 500;
}

#mainPhoto,
.detail-gallery #mainPhoto {
  cursor: zoom-in;
}

@media (max-width: 640px) {
  .ef-lb__zoom {
    top: 0.75rem;
    left: 0.75rem;
  }
  .ef-lb__close {
    top: 0.75rem;
    right: 0.75rem;
  }
  .ef-lb__nav--prev {
    left: 0.4rem;
  }
  .ef-lb__nav--next {
    right: 0.4rem;
  }
  .ef-lb__nav {
    width: 2.85rem;
    height: 2.85rem;
  }
  .ef-lb__stage {
    padding: 0 2.75rem;
    width: 100%;
  }
  .ef-lb__viewport {
    width: min(calc(100vw - 4.5rem), 100%);
    height: min(70vh, 28rem);
  }
  .ef-lb__hint {
    display: none;
  }
}
