.map-view {
  display: none;
  height: calc(100vh - 194px);
  margin-top: 16px;
  min-height: 520px;
  overflow: hidden;
  position: relative;
}

.listing-panel.map-open .map-view {
  display: block;
}

.listing-panel.map-open .result-context,
.listing-panel.map-open .villa-grid {
  display: none;
}

.results-map,
.detail-map {
  background: #dfe4de;
  height: 100%;
  width: 100%;
}

.map-close-button {
  align-items: center;
  background: rgba(255, 255, 255, .95);
  border: 1px solid #d8dcd7;
  border-radius: 50%;
  box-shadow: 0 5px 20px rgba(18, 38, 31, .12);
  color: #33443b;
  display: flex;
  height: 36px;
  justify-content: center;
  position: absolute;
  right: 12px;
  top: 12px;
  width: 36px;
  z-index: 3;
}

.map-close-button svg {
  height: 15px;
  width: 15px;
}

.map-note {
  align-items: center;
  backdrop-filter: blur(10px);
  background: rgba(251, 250, 247, .92);
  bottom: 22px;
  color: #607068;
  display: flex;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 9px;
  gap: 7px;
  left: 50%;
  padding: 9px 12px;
  position: absolute;
  transform: translateX(-50%);
  white-space: nowrap;
  z-index: 3;
}

.map-note svg {
  color: #537563;
  height: 14px;
  width: 14px;
}

.villa-map-marker {
  background: white;
  border: 2px solid white;
  border-radius: 12px 12px 12px 4px;
  box-shadow: 0 5px 18px rgba(20, 38, 32, .2);
  color: #183027;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 10px;
  position: relative;
  transition: background 150ms ease, color 150ms ease;
  white-space: nowrap;
}

.map-marker-shell {
  display: block;
}

.map-marker-shell.is-hidden {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.villa-map-marker:hover,
.price-marker-shell:focus-visible .villa-map-marker,
.price-marker-shell.active .villa-map-marker {
  background: #183027;
  color: white;
}

.villa-zone-marker {
  backdrop-filter: blur(8px);
  background: rgba(24, 48, 39, .94);
  border: 2px solid rgba(255, 255, 255, .95);
  border-radius: 15px 15px 15px 5px;
  box-shadow: 0 9px 24px rgba(24, 48, 39, .25);
  color: white;
  cursor: pointer;
  display: grid;
  font-family: "DM Sans", Arial, sans-serif;
  min-width: 104px;
  padding: 9px 10px;
  text-align: left;
  transition: background 150ms ease;
}

.zone-marker-shell:hover .villa-zone-marker,
.zone-marker-shell:focus-visible .villa-zone-marker {
  background: #24483c;
}

.villa-zone-marker strong,
.villa-zone-marker span,
.villa-zone-marker small {
  display: block;
}

.villa-zone-marker strong {
  font-size: 10px;
  line-height: 1.2;
}

.villa-zone-marker span {
  color: #d7c5aa;
  font-size: 10px;
  font-weight: 700;
  margin-top: 4px;
}

.villa-zone-marker small {
  color: rgba(255, 255, 255, .72);
  font-size: 8px;
  margin-top: 2px;
}

.geolibre-zoom-controls {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, .95);
  border: 1px solid rgba(24, 48, 39, .12);
  border-radius: 12px;
  box-shadow: 0 7px 19px rgba(24, 48, 39, .15);
  display: grid;
  overflow: hidden;
  position: absolute;
  right: 12px;
  top: 58px;
  z-index: 4;
}

.geolibre-zoom-controls button {
  align-items: center;
  background: transparent;
  border: 0;
  color: #183027;
  display: flex;
  height: 36px;
  justify-content: center;
  padding: 0;
  width: 36px;
}

.geolibre-zoom-controls button + button {
  border-top: 1px solid rgba(24, 48, 39, .1);
}

.geolibre-zoom-controls button:hover {
  background: #f1f2ee;
}

.geolibre-zoom-controls svg {
  height: 16px;
  width: 16px;
}

.map-zoom-mode,
.map-provider-badge {
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(24, 48, 39, .1);
  box-shadow: 0 5px 14px rgba(24, 48, 39, .1);
  color: #52645b;
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 9px;
  font-weight: 600;
  padding: 7px 10px;
  position: absolute;
  z-index: 3;
}

.map-zoom-mode {
  border-radius: 999px;
  left: 12px;
  top: 12px;
}

.map-zoom-mode--listings {
  background: rgba(245, 248, 245, .95);
  color: #183027;
}

.map-provider-badge {
  bottom: 8px;
  left: 8px;
}

.maplibregl-popup-content {
  border-radius: 0;
  box-shadow: 0 12px 35px rgba(19, 37, 31, .2);
  padding: 0;
}

.map-popup-card {
  color: #18241f;
  display: grid;
  font-family: "DM Sans", Arial, sans-serif;
  grid-template-columns: 86px 1fr;
  min-height: 92px;
  width: 245px;
}

.map-popup-card > img {
  height: 100%;
  object-fit: cover;
  width: 86px;
}

.map-popup-copy {
  display: flex;
  flex-direction: column;
  padding: 10px;
}

.map-popup-copy > span:first-child {
  align-items: center;
  display: flex;
  justify-content: space-between;
}

.map-popup-copy strong {
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 16px;
  font-weight: 400;
}

.map-popup-copy small {
  color: #7b8780;
  font-size: 8px;
}

.map-popup-copy > small {
  margin-top: 5px;
}

.map-popup-copy b {
  font-size: 10px;
  margin-top: auto;
}

.map-popup-copy em {
  color: #8b948f;
  font-size: 7px;
  font-style: normal;
  font-weight: 400;
}

.maplibregl-ctrl-group {
  border-radius: 0;
}

.maplibregl-ctrl-attrib {
  font-family: "DM Sans", Arial, sans-serif;
  font-size: 8px;
}

.location-section .section-heading {
  margin-bottom: 19px;
}

.detail-map {
  height: 350px;
  overflow: hidden;
}

.detail-map-marker {
  align-items: center;
  background: rgba(24, 48, 39, .18);
  border: 1px solid rgba(24, 48, 39, .3);
  border-radius: 50%;
  display: flex;
  height: 58px;
  justify-content: center;
  position: relative;
  width: 58px;
}

.detail-map-marker::before {
  border: 1px solid rgba(24, 48, 39, .25);
  border-radius: 50%;
  content: "";
  height: 78px;
  position: absolute;
  width: 78px;
}

.detail-map-marker span {
  background: #183027;
  border: 3px solid white;
  border-radius: 50%;
  box-shadow: 0 3px 12px rgba(20, 38, 32, .25);
  height: 18px;
  width: 18px;
}

.location-meta {
  display: grid;
  gap: 15px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 14px;
}

.location-meta span {
  align-items: center;
  color: #6c7972;
  display: flex;
  font-size: 9px;
  gap: 7px;
}

.location-meta svg {
  color: #957b5b;
  height: 14px;
  width: 14px;
}

@media (max-width: 900px) {
  .map-view {
    height: calc(100dvh - 205px);
    min-height: 470px;
  }
}

@media (max-width: 640px) {
  .map-view {
    height: calc(100dvh - 190px);
    margin-left: -14px;
    margin-right: -14px;
    min-height: 450px;
  }

  .map-note {
    bottom: 17px;
    font-size: 8px;
    max-width: calc(100% - 30px);
    white-space: normal;
    width: max-content;
  }

  .detail-map {
    height: 285px;
  }

  .map-zoom-mode {
    max-width: calc(100% - 84px);
  }

  .location-meta {
    grid-template-columns: 1fr;
  }
}
