.rt-community-map {
  --rt-community-map-ink: #003f55;
  --rt-community-map-accent: #56c6df;
  --rt-community-map-control: #f3f4f4;
  --rt-community-map-muted: #5f6264;
  --rt-community-map-height: 620px;
  --rt-community-map-heading-font: var(--h3_typography-font-family, "Arial Narrow", Arial, sans-serif);
  --rt-community-map-body-font: var(--body_typography-font-family, Arial, sans-serif);
  width: 100%;
  color: var(--rt-community-map-ink);
  font-family: var(--rt-community-map-body-font);
}

.rt-community-map,
.rt-community-map * {
  box-sizing: border-box;
}

.rt-community-map [hidden] {
  display: none !important;
}

.rt-community-map__sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.rt-community-map__filter-region {
  position: relative;
  z-index: 2;
  background: #fff;
  padding: 22px 20px;
}

.rt-community-map__filters {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 auto;
}

.rt-community-map__filter-heading {
  margin-right: 7px;
  color: var(--rt-community-map-ink);
  font-size: 11px;
  font-weight: 700;
  line-height: 36px;
  white-space: nowrap;
}

.rt-community-map__filter-control {
  position: relative;
  display: block;
  margin: 0;
}

.rt-community-map__filter-control::after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  width: 5px;
  height: 5px;
  border-right: 2px solid var(--rt-community-map-accent);
  border-bottom: 2px solid var(--rt-community-map-accent);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.rt-community-map__filter-control select {
  appearance: none;
  -webkit-appearance: none;
  min-width: 92px;
  height: 36px;
  margin: 0;
  padding: 0 28px 0 12px;
  border: 0;
  border-radius: 0;
  background: var(--rt-community-map-control);
  color: var(--rt-community-map-ink);
  font: inherit;
  font-size: 11px;
  line-height: 36px;
  cursor: pointer;
}

.rt-community-map__filter-control select[data-filter="price"] {
  min-width: 100px;
}

.rt-community-map__filter-control select:disabled {
  opacity: 1;
  color: var(--rt-community-map-ink);
  cursor: default;
}

.rt-community-map__filter-control select:focus-visible,
.rt-community-map__clear:focus-visible,
.rt-community-map-iw__link:focus-visible {
  outline: 3px solid rgba(86, 198, 223, 0.38);
  outline-offset: 2px;
}

.rt-community-map__clear {
  height: 36px;
  margin-left: 2px;
  padding: 0 9px;
  border: 0;
  background: transparent;
  color: #168ca8;
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  line-height: 36px;
  cursor: pointer;
}

.rt-community-map__clear:hover {
  color: var(--rt-community-map-ink);
  text-decoration: underline;
}

.rt-community-map__map-wrap {
  position: relative;
  width: 100%;
  height: var(--rt-community-map-height);
  min-height: 320px;
  overflow: hidden;
  background: #e8eef0;
}

.rt-community-map__map {
  width: 100%;
  height: 100%;
}

.rt-community-map__message {
  position: absolute;
  left: 50%;
  top: 22px;
  z-index: 4;
  transform: translateX(-50%);
  max-width: calc(100% - 40px);
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--rt-community-map-ink);
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14);
}

.rt-community-map__marker {
  position: relative;
  width: 34px;
  height: 42px;
  transform: translateY(-2px);
}

.rt-community-map__marker::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 1px;
  width: 28px;
  height: 28px;
  border: 4px solid var(--rt-community-map-ink);
  border-radius: 50% 50% 50% 0;
  background: #fff;
  transform: rotate(-45deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.18);
}

.rt-community-map__marker::after {
  content: "";
  position: absolute;
  left: 11px;
  top: 9px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--rt-community-map-ink);
}

.rt-community-map__marker.has-image {
  width: auto;
  height: auto;
}

.rt-community-map__marker.has-image::before,
.rt-community-map__marker.has-image::after {
  display: none;
}

.rt-community-map__marker img {
  display: block;
  width: auto;
  height: 44px;
  object-fit: contain;
}

/*
 * Match the Available Homes InfoWindow content while leaving Google's
 * native InfoWindow chrome and close control completely untouched.
 */
.rt-community-map-iw {
  width: 220px;
  color: var(--rt-community-map-ink);
  font-family: var(--rt-community-map-body-font);
}

.rt-community-map-iw__image {
  display: block;
  width: 100%;
  height: 135px;
  object-fit: cover;
}

.rt-community-map-iw__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 10px 2px 2px;
}

.rt-community-map-iw__title {
  font-family: var(--rt-community-map-heading-font);
  font-size: 18px;
  text-transform: uppercase;
}

.rt-community-map-iw__location {
  color: var(--rt-community-map-muted);
  font-size: 13px;
}

.rt-community-map-iw__link {
  color: #168ca8;
  font-weight: 700;
  text-decoration: none;
}

.rt-community-map-iw__link:hover {
  color: var(--rt-community-map-ink);
  text-decoration: underline;
}

@media (max-width: 800px) {
  .rt-community-map__filter-region {
    padding: 16px;
  }

  .rt-community-map__filters {
    justify-content: flex-start;
  }

  .rt-community-map__filter-heading {
    width: 100%;
    margin: 0 0 2px;
    line-height: 1.3;
  }

  .rt-community-map__filter-control {
    flex: 1 1 calc(50% - 4px);
  }

  .rt-community-map__filter-control select {
    width: 100%;
    min-width: 0;
  }

  .rt-community-map__clear {
    margin-left: 0;
  }
}

@media (max-width: 520px) {
  .rt-community-map__map-wrap {
    height: max(480px, var(--rt-community-map-height));
  }
}
