/**
 * Mapbox marker layer + tooltip popup only.
 * .mapboxgl-popup-content defaults + .mapProperty → styles.mapbox-popup-content.css
 */

/*
 * Do not set position/top/left on .mapboxgl-marker — Mapbox owns transform/position;
 * overriding caused pins to slide vs the basemap while zooming.
 * Listing pin lives inside .mls-mapbox-marker-root so .mapProperty can use ::after + transform.
 */
.mls-mapbox-marker-root {
  display: block;
  line-height: 0;
  pointer-events: auto;
}

.mapboxgl-popup-close-button {
  display: none;
}

/* Custom pan arrows (map.panBy) */
.mls-mapbox-pan-arrows {
  /*box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.1);*/
  border-radius: 4px;
  /*background: #fff;*/
  margin: 10px 10px 24px 10px;
  padding: 4px;
}
.mls-mapbox-pan-arrows__inner {
  width: 108px;
}
.mls-mapbox-pan-arrows__row {
  display: flex;
  align-items: center;
  margin-bottom: 2px;
}
.mls-mapbox-pan-arrows__row:last-child {
  margin-bottom: 0;
}
.mls-mapbox-pan-arrows__row--center {
  justify-content: center;
}
.mls-mapbox-pan-arrows__row--spread {
  justify-content: space-between;
}
.mls-mapbox-pan-arrows__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.12);
  border-radius: 2px;
  background: #fff;
  font-size: 15px;
  line-height: 1;
  color: #333;
  cursor: pointer;
  box-sizing: border-box;
}
.mls-mapbox-pan-arrows__btn:hover {
  background-color: whitesmoke;
}
.mls-mapbox-pan-arrows__btn:active {
  background-color: whitesmoke;
}

/* Hover tooltip on markers (price - address) */
.mapboxgl-popup.mls-mapbox-tooltip-popup {
  z-index: 9999;
}
.mapboxgl-popup.mls-mapbox-tooltip-popup .mapboxgl-popup-content {
  padding: 6px 10px;
  font-size: 13px;
  white-space: normal;
  max-width: 280px;
  text-align: center;
}
.mapboxgl-popup.mls-mapbox-tooltip-popup .mapboxgl-popup-tip {
  align-self: center;
}

.mapboxgl-popup-content {
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
}

/* Pin-only markers: fixed circle, no padding/gap drift; icon optically centered */
.mapProperty.mls-marker-details-popup-only {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  gap: 0;
  box-sizing: border-box;
  cursor: pointer;
}
.mapProperty.mls-marker-details-popup-only .icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
}
/* Screen-reader label must not sit in flex row beside the glyph (pushes icon left) */
.mapProperty.mls-marker-details-popup-only .fa-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.mapProperty.mls-marker-details-popup-only .icon .fa,
.mapProperty.mls-marker-details-popup-only .icon .fa-icon {
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.mapProperty.mls-marker-details-popup-only .icon .fa::before,
.mapProperty.mls-marker-details-popup-only .icon .fa-icon::before {
  line-height: 1;
}
.mapProperty.mls-marker-details-popup-only .icon svg {
  display: block;
  margin: 0;
  height: 14px;
  width: 14px;
  vertical-align: middle;
}

.mapProperty {
  align-items: center;
  background-color: #FFFFFF;
  border-radius: 50%;
  color: #263238;
  display: flex;
  font-size: 14px;
  gap: 15px;
  height: 30px;
  justify-content: center;
  padding: 4px;
  position: relative;
  transition: background-color 0.2s ease-out, box-shadow 0.2s ease-out;
  width: 30px;
  min-width: 30px;
  max-width: 30px;
  box-sizing: border-box;
  box-shadow: 0 0 1px 2px white;
}

/* Keep marker icon centered: details block is for popup only, not layout (e.g. mappoly) */
.mapProperty > .mls-mapbox-listing-popup {
  position: absolute;
  left: 0;
  top: 0;
  width: 0;
  height: 0;
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}

.mapProperty::after {
  border-left: 9px solid transparent;
  border-right: 9px solid transparent;
  border-top: 9px solid #FFFFFF;
  content: "";
  height: 0;
  left: 50%;
  position: absolute;
  top: 90%;
  transform: translate(-50%, 0);
  transition: border-color 0.2s ease-out;
  width: 0;
  z-index: 1;
}

.mapProperty .icon {
  align-items: center;
  display: flex;
  justify-content: center;
  color: #FFFFFF;
}

.mapProperty .icon svg {
  height: 10px;
  width: auto;
}

.mapProperty .details {
  display: none;
  flex-direction: column;
  flex: 1;
}



.mapActiveIcon{
  background-color: #17a249 !important;
}
.mapSoldIcon{
  background-color: #1bafe5 !important;
}
.mapPendingIcon{
  background-color: #866baf !important;
}
.mapOffMarketIcon{
  background-color: #f05652 !important;
}

.mapProperty.mapActiveIcon::after {
  border-top: 9px solid  #17a249 !important;;
}
.mapProperty.mapSoldIcon::after {
  border-top: 9px solid  #1bafe5 !important;;
}
.mapProperty.mapPendingIcon::after {
  border-top: 9px solid  #866baf !important;;
}
.mapProperty.mapOffMarketIcon::after {
  border-top: 9px solid  #f05652 !important;;
}



.mapPopDetails{
  padding-left: 4px;
  font-size: 1.07em;
  line-height: 2;
  font-weight: 300;
}

.mapProperty svg path {
  fill: #fff;
}

.mapProperty.highlight .icon{
  /*display: block;*/
}
.mapProperty.highlight::after {
  content: none !important;
  border-top: 0 !important;
}


.mapProperty.highlight .details {
  display: flex;
}