.coco-map-price-marker,
.coco-map-group-marker {
  background: transparent;
  border: 0;
}

.coco-map-pin-shell {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.coco-map-pin-origin {
  position: absolute;
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #124a3e;
  box-shadow: 0 0 0 2px #124a3e;
  transform: translate(-50%, -50%);
  opacity: 0;
  pointer-events: none;
}

.coco-map-price-marker:focus-visible .coco-map-pin-origin,
.coco-map-price-marker.is-selected .coco-map-pin-origin {
  opacity: 1;
}

@media (hover: hover) {
  .coco-map-price-marker:hover .coco-map-pin-origin {
    opacity: 1;
  }
}

.coco-map-price-pin {
  --pin-background: #171a1a;
  --pin-foreground: #fff;
  --pin-accent: currentColor;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 77px;
  max-width: 100%;
  min-height: 29px;
  gap: 3px;
  padding: 5px 8px;
  border: 1px solid #fff;
  border-radius: 11px;
  background: var(--pin-background);
  color: var(--pin-foreground);
  box-shadow: 0 2px 7px #172b293b;
  white-space: nowrap;
}

.coco-map-price-pin[data-band="opportunity"] {
  --pin-background: #146449;
}

.coco-map-price-pin[data-band="good"] {
  --pin-background: #d1ebd8;
  --pin-foreground: #18472d;
  border-color: #77ac88;
}

.coco-map-price-pin[data-band="fair"] {
  --pin-background: #f6d982;
  --pin-foreground: #322605;
}

.coco-map-price-pin-approximate {
  border-style: dashed;
}

.coco-map-price-pin::after {
  position: absolute;
  bottom: -4px;
  left: calc(50% - 3px);
  width: 6px;
  height: 6px;
  border-right: inherit;
  border-bottom: inherit;
  background: inherit;
  transform: rotate(45deg);
  content: "";
}

.coco-map-pin-shell[data-dock="above"] .coco-map-price-pin {
  align-self: end;
  margin-bottom: 5px;
}

.coco-map-pin-shell[data-dock="below"] .coco-map-price-pin {
  align-self: start;
  margin-top: 5px;
}

.coco-map-pin-shell[data-dock="below"] .coco-map-price-pin::after {
  top: -4px;
  bottom: auto;
  transform: rotate(225deg);
}

.coco-map-pin-shell[data-dock="left"] .coco-map-price-pin {
  justify-self: end;
  margin-right: 5px;
}

.coco-map-pin-shell[data-dock="right"] .coco-map-price-pin {
  justify-self: start;
  margin-left: 5px;
}

.coco-map-pin-shell:is([data-dock="left"], [data-dock="right"]) .coco-map-price-pin::after {
  top: calc(50% - 3px);
  bottom: auto;
}

.coco-map-pin-shell[data-dock="left"] .coco-map-price-pin::after {
  right: -4px;
  left: auto;
  transform: rotate(-45deg);
}

.coco-map-pin-shell[data-dock="right"] .coco-map-price-pin::after {
  left: -4px;
  transform: rotate(135deg);
}

.coco-map-pin-shell[data-dock="detached"] .coco-map-price-pin::after {
  display: none;
}

.coco-map-pin-top,
.coco-map-pin-comparison {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  max-width: 100%;
}

.coco-map-pin-comparison-value,
.coco-map-pin-simple .coco-map-pin-comparison-text {
  display: none;
}

.coco-map-pin-simple .coco-map-pin-comparison-value {
  display: inline;
}

.coco-map-pin-simple .coco-map-price-pin {
  padding: 3px 4px;
  min-width: 56px;
  min-height: 22px;
  gap: 1px;
}

.coco-map-pin-simple .coco-map-pin-top {
  gap: 3px;
}

.coco-map-pin-simple .coco-map-pin-top b {
  font-size: 11px;
  overflow: visible;
}

.coco-map-pin-simple .coco-map-pin-star {
  flex-basis: 8px;
  height: 8px;
}

.coco-map-pin-simple .coco-map-pin-comparison {
  font-size: 8px;
  gap: 3px;
}

.coco-map-pin-simple .coco-map-pin-track {
  flex-basis: 17px;
  height: 3px;
}

.coco-map-pin-simple .coco-map-pin-track > span {
  width: 6px;
  height: 6px;
}

.coco-map-pin-top b {
  overflow: hidden;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
}

.coco-map-pin-comparison {
  color: var(--pin-accent);
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
}

.coco-map-pin-track {
  position: relative;
  flex: 0 0 26px;
  height: 4px;
  border-radius: 9px;
  background: linear-gradient(90deg, #39c478 0%, #83d46c 25%, #f6d05a 50%, #ff9a62 75%, #e95059 100%);
  box-shadow: 0 0 0 1px #15342f38;
}

.coco-map-pin-track::before {
  position: absolute;
  left: calc(50% - .5px);
  top: -1px;
  width: 1px;
  height: 6px;
  background: #3f402a;
  opacity: .65;
  content: "";
}

.coco-map-pin-track > span {
  position: absolute;
  top: -2px;
  width: 8px;
  height: 8px;
  border: 1px solid #203932;
  border-radius: 50%;
  background: #fff;
  transform: translateX(-50%);
}

.coco-map-price-pin-featured {
  --pin-background: #102924;
  --pin-foreground: #fff;
  border-color: #b1ff99;
  box-shadow: 0 0 0 2px #70e384, 0 3px 9px #1c643862;
}

.coco-map-price-pin-featured[data-band="opportunity"] {
  --pin-background: #146449;
  --pin-accent: #9dffab;
}

.coco-map-price-pin-featured[data-band="good"] {
  --pin-background: #d1ebd8;
  --pin-foreground: #18472d;
}

.coco-map-price-pin-featured[data-band="fair"] {
  --pin-background: #f6d982;
  --pin-foreground: #322605;
}

.coco-map-price-pin-featured[data-band="high"] {
  --pin-background: #171a1a;
}

.coco-map-pin-star {
  flex: 0 0 11px;
  height: 11px;
  background: #b1ff99;
  clip-path: polygon(50% 0, 65% 33%, 100% 38%, 74% 64%, 81% 100%, 50% 81%,
    19% 100%, 26% 64%, 0 38%, 35% 33%);
}

.coco-map-price-pin:is([data-band="good"], [data-band="fair"]) .coco-map-pin-star {
  background: #266437;
}

.coco-map-cluster-count {
  display: grid;
  place-items: center;
  min-width: 38px;
  height: 38px;
  padding-inline: 5px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #f4faf7;
  color: #214c42;
  box-shadow: 0 0 0 1px #83a39a, 0 2px 7px #284c4730;
  font-size: 13px;
  font-weight: 800;
}

.coco-map-pin-preview {
  width: 10px;
  height: 10px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #637e74;
  box-shadow: 0 0 0 1px #789188;
}

.coco-map-price-marker:focus-visible .coco-map-price-pin,
.coco-map-price-marker:focus-visible .coco-map-pin-preview,
.coco-map-group-marker:focus-visible .coco-map-cluster-count,
.coco-map-price-marker.is-selected .coco-map-price-pin,
.coco-map-group-marker.is-selected .coco-map-cluster-count {
  outline: 2px solid #124a3e;
  outline-offset: 3px;
}

.coco-map-price-marker.is-seen .coco-map-pin-top b {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.puebla-map-note-head .coco-puebla-listing-price {
  margin-inline-start: 6px;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.coco-barrio-legend {
  position: absolute;
  right: max(14px, env(safe-area-inset-right, 0px));
  bottom: 36px;
  z-index: 430;
  width: 186px;
  max-width: calc(100% - 24px);
  padding: 8px 10px 7px;
  border: 1px solid #d9e1df;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 2px 8px #223d3812;
  color: #223e37;
  pointer-events: none;
}

.coco-barrio-legend[hidden] {
  display: none;
}

.coco-barrio-legend strong {
  display: block;
  font-size: 11px;
  line-height: 1.2;
}

.coco-barrio-legend-scale {
  display: block;
  height: 4px;
  margin-block: 5px 3px;
  border-radius: 4px;
  background: linear-gradient(90deg, #2c70c6, #e8b738 50%, #ce4955);
}

.coco-barrio-legend-values {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  line-height: 1.2;
  font-variant-numeric: tabular-nums;
}

.coco-barrio-legend-note {
  display: block;
  margin-top: 3px;
  color: #496359;
  font-size: 9px;
  line-height: 1.2;
}

.coco-barrio-legend-note-short {
  display: none;
}

@media (max-width: 700px) {
  .coco-barrio-legend {
    right: max(9px, env(safe-area-inset-right, 0px));
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
    width: 118px;
    padding: 5px 7px 4px;
    border-radius: 8px;
  }

  .coco-barrio-legend strong {
    font-size: 9px;
  }

  .coco-barrio-legend-scale {
    height: 3px;
    margin-block: 3px 2px;
  }

  .coco-barrio-legend-values,
  .coco-barrio-legend-note {
    font-size: 8px;
  }

  .coco-barrio-legend-note {
    margin-top: 2px;
  }

  .coco-barrio-legend-note-full {
    display: none;
  }

  .coco-barrio-legend-note-short {
    display: inline;
  }

  .map-stage:has(.puebla-map-note) .coco-barrio-legend {
    top: calc(67px + env(safe-area-inset-top, 0px));
    right: max(54px, env(safe-area-inset-right, 0px));
    bottom: auto;
  }
}
