.view-toggle {
  display: inline-flex;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-pill);
  padding: 4px;
  margin-bottom: var(--space-3);
  gap: 4px;
}

.view-toggle__btn {
  background: none;
  border: none;
  padding: var(--space-1) var(--space-3);
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 500;
  cursor: pointer;
  color: var(--color-muted);
  transition: all var(--duration-base) var(--ease-elegant);
}

.view-toggle__btn.is-active {
  background: var(--color-ink);
  color: var(--color-paper);
}

.view-panel[hidden] {
  display: none;
}

#property-map {
  width: 100%;
  height: 70vh;
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-soft);
}

/* !important is required to fully override Leaflet's default divIcon box styling under custom pins. */
.leaflet-div-icon {
  background: none !important;
  border: none !important;
}

.property-map__pin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--color-ink);
  color: var(--color-paper);
  font-family: var(--font-body);
  font-size: var(--fs-small);
  font-weight: 600;
  padding: 6px 12px;
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-soft);
  white-space: nowrap;
  transform: translate(-50%, -100%);
  position: relative;
}

.property-map__pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  transform: translateX(-50%);
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 6px solid var(--color-ink);
}

.leaflet-popup-content {
  font-family: var(--font-body);
}

.property-map__popup {
  display: grid;
  gap: var(--space-1);
}

.property-map__popup-image {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
  display: block;
}

.property-map__popup-title {
  margin: 0;
  font-family: var(--font-display);
  font-size: var(--fs-body);
  color: var(--color-ink);
}

.property-map__popup-price {
  margin: 0;
  font-weight: 600;
  color: var(--color-ink);
}

.property-map__popup-link {
  color: var(--color-gold);
  text-decoration: none;
  font-weight: 500;
}

.property-map__popup-link:hover,
.property-map__popup-link:focus-visible {
  text-decoration: underline;
}

/* <768px */
@media (max-width: 767px) {
  #property-map {
    height: 55vh;
  }
}
