/* Wellington County Leaflet map — shared by homepage + community location sections */
.wh-comm-map.elementor-custom-embed,
.elementor-widget-google_maps .elementor-custom-embed.wh-comm-map {
  position: relative;
  padding-bottom: 0 !important;
  height: min(64vh, 560px);
  min-height: 380px;
  overflow: hidden;
}

.wh-comm-map .home-map__frame--embed,
.home-map__frame--embed {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
  background: #e8e4da;
  overflow: hidden;
}

.home-map__leaflet,
.wh-comm-map iframe,
.home-map__frame--embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  background: #e8e4da;
  border: 0;
}

.home-map__leaflet.leaflet-container,
.home-map__leaflet .leaflet-container {
  width: 100%;
  height: 100%;
  font-family: "Montserrat", "Avenir Next", Arial, sans-serif;
  background: #e8e4da;
}

.home-map__leaflet .leaflet-control-attribution {
  font-size: 10px;
  background: rgba(255, 255, 255, 0.85) !important;
  color: #5a544c;
  max-width: 70%;
}

.home-map__leaflet .leaflet-control-zoom a {
  border-radius: 0 !important;
  color: #2f3418 !important;
  width: 34px !important;
  height: 34px !important;
  line-height: 34px !important;
  border-color: rgba(73, 79, 37, 0.18) !important;
}

.wh-map-pin {
  background: transparent;
  border: 0;
}

.wh-map-pin__dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #c3c79d;
  border: 3px solid #fff;
  box-shadow: 0 2px 10px rgba(20, 22, 16, 0.35);
  margin: 0 auto;
}

.wh-map-pin__dot--soon {
  background: #e8c872;
}

.wh-map-pin__dot--active {
  width: 22px;
  height: 22px;
  background: #494f25;
  box-shadow: 0 0 0 6px rgba(73, 79, 37, 0.18), 0 2px 10px rgba(20, 22, 16, 0.35);
}

.wh-map-popup .leaflet-popup-content-wrapper {
  border-radius: 0;
  box-shadow: 0 16px 36px rgba(20, 22, 16, 0.18);
  border: 1px solid rgba(73, 79, 37, 0.12);
}

.wh-map-popup .leaflet-popup-content {
  margin: 18px 18px 16px;
  min-width: 220px;
  font-family: "Montserrat", "Avenir Next", Arial, sans-serif;
}

.wh-map-popup .leaflet-popup-close-button {
  width: 36px !important;
  height: 36px !important;
  font: 22px/36px Georgia, serif !important;
  color: #2f3418 !important;
  top: 4px !important;
  right: 4px !important;
  padding: 0 !important;
}

.wh-map-popup .leaflet-popup-close-button:hover,
.wh-map-popup .leaflet-popup-close-button:focus-visible {
  color: #494f25 !important;
  background: rgba(73, 79, 37, 0.08);
}

.wh-map-popup__town {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: #2f3418;
  margin: 0 28px 6px 0;
  line-height: 1.2;
}

.wh-map-popup__badge {
  display: inline-flex;
  align-items: center;
  font-family: "DM Sans", system-ui, sans-serif;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 5px 9px;
  margin: 0 0 8px;
  background: #494f25;
  color: #f3eee6;
  line-height: 1;
}

.wh-map-popup__meta {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a544c;
  margin: 0 0 12px;
}

.leaflet-container .leaflet-popup-content img.wh-map-popup__photo {
  display: block;
  width: 100%;
  height: 130px;
  object-fit: cover;
  object-position: center 40%;
  margin: 0 0 14px;
  background: #e8e4da;
  outline: 1px solid rgba(0, 0, 0, 0.1);
  outline-offset: -1px;
}

.wh-map-popup__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0;
}
.leaflet-container .wh-map-popup__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 12px 14px;
  box-sizing: border-box;
  width: 100%;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none !important;
  color: #2f3418 !important;
  border: 1px solid rgba(73, 79, 37, 0.28);
  background: #fff !important;
}
.leaflet-container .wh-map-popup__btn:hover,
.leaflet-container .wh-map-popup__btn:focus-visible {
  border-color: #494f25;
  color: #2f3418 !important;
  background: #f5f2ec !important;
  outline: 2px solid #494f25;
  outline-offset: 2px;
}
.leaflet-container .wh-map-popup__btn--solid {
  background: #494f25 !important;
  border-color: #494f25;
  color: #fbfaf7 !important;
}
.leaflet-container .wh-map-popup__btn--solid:hover,
.leaflet-container .wh-map-popup__btn--solid:focus-visible {
  background: #2f3418 !important;
  border-color: #2f3418;
  color: #fbfaf7 !important;
}
.leaflet-container .wh-map-popup__link {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #494f25 !important;
  text-decoration: none !important;
  border-bottom: 1px solid #c3c79d;
}

.leaflet-container .wh-map-popup__link:hover,
.leaflet-container .wh-map-popup__link:focus-visible {
  color: #2f3418 !important;
  outline: 2px solid #494f25;
  outline-offset: 3px;
}

.wh-map-tooltip {
  background: rgba(255, 255, 255, 0.96) !important;
  border: 1px solid rgba(73, 79, 37, 0.16) !important;
  border-radius: 0 !important;
  color: #2f3418 !important;
  font-family: "Montserrat", "Avenir Next", Arial, sans-serif !important;
  font-size: 11px !important;
  font-weight: 700 !important;
  letter-spacing: 0.08em !important;
  text-transform: uppercase !important;
  box-shadow: 0 4px 14px rgba(20, 22, 16, 0.12) !important;
  padding: 4px 8px !important;
  white-space: normal !important;
  text-align: center;
  line-height: 1.25;
  pointer-events: none !important;
}

.leaflet-container.is-popup-open .wh-map-tooltip {
  visibility: hidden !important;
  opacity: 0 !important;
}
.wh-map-tooltip__name { display: block; white-space: nowrap; }
.wh-map-tooltip__town {
  display: block;
  margin-top: 1px;
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: #7a7268;
  white-space: nowrap;
}

.wh-map-tooltip::before {
  border-top-color: rgba(255, 255, 255, 0.96) !important;
}

/* Leaflet 1.9.x uses plus-lighter for Safari tile seams — washes OSM tiles on cream bg */
.home-map__leaflet img.leaflet-tile,
.home-map__leaflet.leaflet-container img.leaflet-tile {
  mix-blend-mode: normal !important;
}

@media (max-width: 900px) {
  /* Desktop left scrim for overlay cards — hide once aside reflows below map */
  .home-map__veil {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .wh-comm-map.elementor-custom-embed,
  .elementor-widget-google_maps .elementor-custom-embed.wh-comm-map {
    height: 52vh;
    min-height: 300px;
    max-height: 420px;
  }
}
