/* ================================================================
   MAP — map.css
   Google Maps container + InfoWindow popup.
   ================================================================ */

/* --- Container -------------------------------------------------- */
.gmap {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
}

.map-listing {
  height: clamp(300px, 55vh, 520px);
}
.map-fullheight {
  height: calc(100vh - var(--nav-h));
  min-height: 400px;
}

/* --- InfoWindow popup ------------------------------------------- */
.gm-style .gm-style-iw-c {
  padding: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15) !important;
  max-width: 240px !important;
  overflow: hidden !important;
  background: #fff !important;
}

.gm-style .gm-style-iw-d {
  overflow: hidden !important;
  padding: 0 0.875rem 1rem !important;
  max-height: none !important;
}

.gm-style .gm-style-iw-ch {
  display: none;
}

/* Brand accent bar */
.gm-style .gm-style-iw-c::before {
  content: "";
  display: block;
  height: 3px;
  background: var(--red, #e50007);
  border-radius: 12px 12px 0 0;
}

/* Cover image */
.gm-style .gm-style-iw-d img {
  display: block;
  width: 100%;
  height: 120px;
  object-fit: cover;
  border: none;
  padding: 0;
  margin: 0 0 0.75rem;
  background: #f5f5f5;
}

/* Community/showhome logo — small, contained (overrides cover style) */
.gm-style .gm-style-iw-d img.community-logo-gmap {
  width: auto;
  max-width: 120px;
  height: 56px;
  object-fit: contain;
  margin: 0.75rem auto;
  border-radius: 6px;
  background: #fff;
  border: 1px solid var(--gray-light, #efefef);
  padding: 6px;
}

/* Typography */
.gm-style .gm-style-iw-d * {
  font-family: "Inter", system-ui, sans-serif;
  line-height: 1.4;
}

.gm-style .gm-style-iw-d h3,
.gm-style .gm-style-iw-d strong {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--dark, #1a1a1a);
  margin-bottom: 0.25rem;
  display: block;
}

.gm-style .gm-style-iw-d p {
  font-size: 0.75rem;
  color: #6b6b6b;
  margin-bottom: 0.2rem;
}

.gm-style .gm-style-iw-d ul {
  display: none !important;
}

/* CTA — fully self-contained so Google Maps styles can't strip it */
.gm-style .btn-primary,
.gm-style .theme-btn {
  display: block !important;
  width: 100% !important;
  background: var(--red, #e50007) !important;
  border: none !important;
  color: #fff !important;
  border-radius: 6px !important;
  padding: 0.5rem 0.75rem !important;
  margin-top: 0.75rem !important;
  font-size: 0.78rem !important;
  font-weight: 600 !important;
  text-align: center !important;
  text-decoration: none !important;
  cursor: pointer !important;
  letter-spacing: 0.04em !important;
  line-height: 1.4 !important;
}
.gm-style .btn-primary:hover,
.gm-style .theme-btn:hover {
  background: var(--red-dark, #b81219) !important;
  color: #fff !important;
}

/* Tail arrow */
.gm-style .gm-style-iw-tc::after,
.gm-style .gm-style-iw-t::after {
  background: #fff !important;
}

/* Close button */
.gm-style button.gm-ui-hover-effect {
  top: 4px !important;
  right: 4px !important;
  opacity: 0.6 !important;
}
.gm-style button.gm-ui-hover-effect:hover {
  opacity: 1 !important;
}

/* --- Pins ------------------------------------------------------- */
.map-pin {
  background: var(--red, #e50007);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  position: relative;
}

.map-pin::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: var(--red, #e50007);
  border-bottom: none;
}

.map-cluster {
  background: var(--dark, #1a1a1a);
  color: #fff;
  font-family: "Inter", system-ui, sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
}
