/* Listing detail – gallery lightbox, realtor avatar, map */

/* ── Gallery trigger hint ─────────────────────────────────── */
.listing-main-image {
  cursor: zoom-in;
}

.listing-main-image .gallery-open-hint {
  position: absolute;
  bottom: 1rem;
  left: 1rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: rgba(16, 40, 78, 0.82);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 600;
  pointer-events: none;
}

.listing-thumbnail.active-thumb {
  border-color: var(--brand-green, #30caa0);
  box-shadow: 0 0 0 2px rgba(48, 202, 160, 0.35);
}

/* ── Full-screen gallery modal ────────────────────────────── */
.property-gallery-modal {
  z-index: 10050;
}

.property-gallery-modal + .modal-backdrop {
  z-index: 10040;
}

#inquiryModal {
  z-index: 10050;
}

.property-gallery-modal .modal-dialog {
  max-width: min(1100px, 96vw);
  margin: 1rem auto;
}

.property-gallery-modal .modal-content {
  background: #0f172a;
  border: none;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
}

.property-gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.06);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.property-gallery-title {
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.property-gallery-counter {
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.85rem;
  font-weight: 600;
  flex-shrink: 0;
}

.property-gallery-close {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 0.9rem;
  border: none;
  border-radius: 999px;
  background: #fff;
  color: #10284e;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
  flex-shrink: 0;
}

.property-gallery-close:hover {
  background: #f1f5f9;
  transform: scale(1.03);
}

.property-gallery-close i {
  font-size: 1rem;
}

.property-gallery-stage {
  position: relative;
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem 3.5rem;
  background: #0b1220;
}

.property-gallery-image {
  max-width: 100%;
  max-height: 70vh;
  width: auto !important;
  height: auto;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

.property-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #10284e;
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  transition: background 0.2s ease, transform 0.2s ease;
  z-index: 2;
}

.property-gallery-nav:hover {
  background: #30caa0;
  color: #fff;
  transform: translateY(-50%) scale(1.05);
}

.property-gallery-nav.prev { left: 0.85rem; }
.property-gallery-nav.next { right: 0.85rem; }

.property-gallery-footer {
  padding: 0.75rem 1rem 1rem;
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.8rem;
  text-align: center;
}

/* ── Realtor avatar ───────────────────────────────────────── */
.listing-realtor-avatar {
  width: 112px;
  height: 112px;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  overflow: hidden;
  border: 4px solid #30caa0;
  box-shadow: 0 8px 24px rgba(48, 202, 160, 0.22);
  flex-shrink: 0;
  background: #e8edf2;
}

.listing-realtor-avatar img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover;
  object-position: center top;
  display: block;
}

/* ── Map ──────────────────────────────────────────────────── */
.listing-map-card {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(16, 40, 78, 0.08);
  box-shadow: 0 4px 20px rgba(16, 40, 78, 0.06);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.listing-map-card h4 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #10284e;
  margin-bottom: 0.35rem;
}

.listing-map-address {
  color: #64748b;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

#listingMap {
  height: 360px;
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: #e8edf2;
  z-index: 1;
}

.listing-map-loading,
.listing-map-error {
  height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 0.5rem;
  color: #64748b;
  font-size: 0.92rem;
  border-radius: 12px;
  background: #f1f5f9;
}

.listing-map-error a {
  color: #30caa0;
  font-weight: 600;
}

@media (max-width: 768px) {
  .property-gallery-stage {
    min-height: 45vh;
    padding: 1rem 2.75rem;
  }

  .property-gallery-nav {
    width: 40px;
    height: 40px;
  }

  .property-gallery-close span {
    display: none;
  }
}
