.sort-bar__map {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 34px;
  padding: 0 0.8rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff);
  font-size: 0.82rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.15s;
}
.sort-bar__map i {
  font-size: 0.9rem;
}
.sort-bar__map:hover, .sort-bar__map.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.results-map-col {
  display: none;
}

.results-map-canvas {
  width: 100%;
  height: 100%;
}

@media (min-width: 1200px) {
  body.results-map-open .search-main > .container {
    max-width: min(100%, 1680px);
  }
  body.results-map-open .results-split {
    display: grid;
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
    gap: 1.25rem;
    align-items: start;
  }
  body.results-map-open .results--grid {
    grid-template-columns: 1fr;
  }
  body.results-map-open .results-split__list .rcard-h {
    flex-direction: column;
  }
  body.results-map-open .results-split__list .rcard-h__img {
    width: 100%;
    height: 190px;
    min-height: auto;
  }
  body.results-map-open .results-map-col {
    display: block;
    position: sticky;
    top: var(--rmap-top, 16px);
    height: calc(100vh - var(--rmap-top, 16px) - 16px);
    min-height: 420px;
    border: 1px solid var(--border);
    border-radius: var(--rl);
    overflow: hidden;
    background: var(--bg);
  }
}
html.results-map-fullscreen,
html.results-map-fullscreen body {
  overflow: hidden;
}
html.results-map-fullscreen .results-map-col {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: var(--bg);
}
html.results-map-fullscreen .wa-fab {
  display: none !important;
}

.results-map-close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 5;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.55rem 1rem;
  border: none;
  border-radius: var(--rr);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--ff);
  font-size: 0.84rem;
  font-weight: 700;
  line-height: 1.2;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  cursor: pointer;
}
.results-map-close:hover {
  color: var(--accent);
}

.results-map-busy,
.results-map-note {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 4;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  max-width: calc(100% - 190px);
  padding: 0.55rem 1rem;
  border-radius: var(--rr);
  background: var(--surface);
  color: var(--ink);
  font-size: 0.84rem;
  line-height: 1.3;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.results-map-busy.show,
.results-map-note.show {
  opacity: 1;
  visibility: visible;
}

.results-map-note {
  top: 62px;
  max-width: calc(100% - 28px);
}

.results-map-spinner {
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: results-map-spin 0.8s linear infinite;
}

@keyframes results-map-spin {
  to {
    transform: rotate(360deg);
  }
}
.results-map-pin {
  position: relative;
  padding: 6px 10px;
  margin-bottom: 7px;
  border-radius: 20px;
  background: var(--surface);
  color: var(--ink);
  font-family: var(--ff);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}
.results-map-pin::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -6px;
  margin-left: -6px;
  border: 6px solid transparent;
  border-bottom: 0;
  border-top-color: var(--surface);
  transition: border-color 0.15s ease;
}
.results-map-pin:hover, .results-map-pin.is-hover, .results-map-pin.is-active {
  background: var(--accent);
  color: #fff;
  transform: scale(1.06);
}
.results-map-pin:hover::after, .results-map-pin.is-hover::after, .results-map-pin.is-active::after {
  border-top-color: var(--accent);
}

.results-map-pop {
  display: none;
  position: absolute;
  z-index: 6;
  width: 320px;
  max-height: calc(100% - 24px);
  overflow-y: auto;
  border-radius: var(--rl);
  background: var(--surface);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.2);
}
.results-map-pop.show {
  display: block;
}
.results-map-pop .rcard-g {
  border: none;
}
.results-map-pop .rcard-g:hover {
  transform: none;
  box-shadow: none;
}
.results-map-pop .rcard-g__img {
  height: 170px;
}

.results-map-pop-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.8rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  cursor: pointer;
}

.results-map-pop-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 160px;
}

@media (max-width: 1199px) {
  .results-map-pop {
    left: 12px;
    right: 12px;
    bottom: 12px;
    top: auto;
    width: auto;
    max-width: 480px;
    margin: 0 auto;
    max-height: 62%;
  }
  .results-map-pop .rcard-g__img {
    height: 130px;
  }
}