:root {
  --ssr-listing-border: 1px solid #ccc;
  --ssr-listing-bg: #f7f7f88a;

  --ssr-listing-hover-bg: #f0f1f1b8;

  --ssr-listing-link-color: #07366b;
  --ssr-listing-hover-color: #82261f;
  --ssr-listing-text-color: #505050;
  --ssr-listing-price-color: #505050;
  --ssr-listing-icon-color: #106f82;

  --ssr-listing-gap: 32px;
  --ssr-listing-text-gap: 12px;

  --map-marker-color: #acbac1;
  --map-marker-agency-color: rgba(10, 74, 129, 1);
  --map-marker-active-color: rgb(29 129 213);

  --ssr-save-favorite-outline: #82261f;
  --ssr-save-favorite-fill: rgba(255, 255, 255, 0.8);

  --ssr-remove-favorite-outline: #82261f;
  --ssr-remove-favorite-fill: #82261f;

  --ssr-favorite-hover: #82261f;
}

body.page-template-page-property-search header.site-header-wrapper {
  position: fixed;
  top: var(--adminbar-height);
  transition: top 0.05s ease-in;
}

body.page-template-page-property-search main div + div {
  margin-top: 0;
}

#map-body {
  display: grid;
  grid-template-columns: 1fr 40%;
}

#map-body #results-container {
  padding-top: calc(var(--header-height) + var(--search-form-height));
  min-height: 100vh !important;
}

#map-body #results-found {
  margin-top: 16px;
  padding: 0 32px;
  text-align: right;
  margin-bottom: -16px;
}

#map-body #results-container #results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  padding: 32px;
  min-height: calc(100vh - (var(--header-height) + var(--search-form-height) + var(--adminbar-height))) !important;
  grid-auto-rows: min-content;
}

@media only screen and (min-width: 900px) AND (max-width: 1024px) {
  #map-body #results-container #results {
    gap: 16px;
  }
}

@media only screen and (min-width: 2000px) {
  #map-body #results-container #results {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

#map-body #results-container #results .listing.active {
  background-color: var(--ssr-listing-hover-bg);
  scroll-margin-top: calc(var(--header-height) + var(--search-form-height) + var(--adminbar-height) + 100px);
}

#map-body #results-container #results .listing:hover {
  background-color: var(--ssr-listing-hover-bg);
}

#map-body #gmap-container {
  position: relative;
}

#map-body #gmap-container .wrapper {
  position: sticky !important;
  top: calc(var(--header-height) + var(--search-form-height) + var(--adminbar-height));
}

#map-body #gmap-container #gmap_canvas {
  width: 100%;
  height: calc(100vh - (var(--header-height) + var(--search-form-height) + var(--adminbar-height))) !important;
}

/* remove googles map border */
.gm-style iframe + div {
  border: none !important;
}

#map-body #gmap-container #status {
  position: absolute;
  left: 0px;
  top: 0px;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.6);
  justify-content: center;
  align-items: center;
}

#map-body #gmap-container #status .inner {
  background: transparent;
  padding: 16px;
  letter-spacing: 1.5px;
  font-size: var(--h4-size);
  color: #fff;
}

@keyframes fa-spin {
  0% {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(1turn);
  }
}

#map-body #gmap-container #status .loading-icon svg {
  height: 100px !important;
  fill: #fff;
  display: block;
  animation-name: fa-spin;
  animation-direction: var(--fa-animation-direction, normal);
  animation-duration: var(--fa-animation-duration, 1s);
  animation-iteration-count: var(--fa-animation-iteration-count, infinite);
  animation-timing-function: var(--fa-animation-timing, steps(8));
}

#map-body #viewprop {
  position: absolute;
  background: #fff;
  width: calc(100% - 20px);
  left: 10px !important;
  right: 10px !important;
}

#map-body #viewprop .vp-close {
  position: absolute;
  right: 0;
  top: 0;
  background: #000;
  fill: #fff;
  padding: 5px;
  cursor: pointer;
}

#map-body #viewprop .vp-close svg {
  display: block;
}

#map-body #viewprop .listing {
  width: 100% !important;
  max-width: 100% !important;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  border: 0;
}

#map-body #viewprop .listing .img {
  aspect-ratio: auto;
  min-height: 250px;
}

#map-body #viewprop .toggle-favorite {
  display: none;
}

#map-body #search-pager {
  position: relative;

  color: #173663;

  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 8px;
}

#map-body #search-pager span {
  cursor: pointer;

  display: block;
  border: 1px solid #ccc;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.13rem;

  color: var(--content-link-color);
}

#map-body #search-pager span:hover {
  background: #f0f0f0;
  color: var(--content-link-hover-color);
}

#map-body #search-pager #pages span.active {
  background: #f5f5f5;
  color: #000;
}

#map-body #search-pager span svg {
  display: block;
  height: 20px;
}

#map-body #search-pager #spaged-next,
#map-body #search-pager #spaged-prev {
  border: 0;
  width: auto;
}

#map-body #search-pager #spaged-next svg {
  transform: rotate(180deg);
}

#map-body #search-pager #pages {
  display: flex;
  flex-wrap: nowrap;
  justify-content: center;
  gap: 8px;
}

#map-body #search-numresults {
  text-align: center;
}

#map-body .marker {
  fill: var(--map-marker-color);
}

#map-body .marker.my {
  fill: var(--map-marker-agency-color);
}

#map-body .marker.active {
  fill: var(--map-marker-active-color);
}

#map-body .marker.active svg {
  transition: height 0.1s ease-out;
}

#map-body .marker.active svg {
  height: 35px !important;
}

#map-body svg path {
  stroke: rgba(255, 255, 255, 0.6) !important;
}
#map-body svg circle {
  fill: #fff !important;
}

.listings {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));

  width: 100%;
  gap: var(--ssr-listing-gap);
}

.listings .listing {
  position: relative;
  border: var(--ssr-listing-border);
  background-color: var(--ssr-listing-bg);
  background-image: url(/images/ssrbg-idx.png);
  background-repeat: no-repeat !important;
  background-position: bottom 22px right 16px;

  min-width: 0;
}

.listings .listing.my_prop {
  background-image: url(/images/ssrbg-my.png);
  background-position: bottom 18px right 16px;
}

.listings .listing.pending:before,
.listings .listing.pending-no-showings:before {
  content: "Pending";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.listings .listing.sold:before {
  content: "Sold";
  position: absolute;
  top: 0;
  right: 0;
  z-index: 5;
  background: rgba(0, 0, 0, 0.5);
  color: #fff;
  padding: 6px 12px;
  font-size: 0.875rem;
  text-transform: uppercase;
}

.listings .img {
  display: block;
  aspect-ratio: 1.78;
  position: relative;
}

.listings .listing img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.listings .summary {
  position: relative;
}

.listings .summary .save {
  position: absolute;
  top: 14px;
  right: 4px;
  background: var(--ssr-listing-bg);
  border-radius: 515px;
  padding: 3px;
}

.listings .summary .save button {
  background: transparent;
  border: 0;
}

.listings .summary .save button svg {
  display: block;
  width: 23px;
  height: 23px;
  top: 2px;
  position: relative;
}

.listings .summary .save button svg .fa-primary {
  fill: var(--ssr-save-favorite-outline) !important;
}

.listings .summary .save button svg .fa-secondary {
  fill: var(--ssr-save-favorite-fill) !important;
}

.listings .summary .save button svg {
  cursor: pointer;
}

.listings .summary .save.is-favorite svg .fa-primary {
  fill: var(--ssr-remove-favorite-outline) !important;
}

.listings .summary .save.is-favorite svg .fa-secondary {
  fill: var(--ssr-remove-favorite-fill) !important;
}

.listings .summary .save button:hover svg .fa-primary {
  fill: var(--ssr-favorite-hover) !important;
}

.listings .summary .save button:hover svg .fa-secondary {
  fill: var(--ssr-favorite-hover) !important;
  opacity: 0.5;
}

.listings .summary .save.working {
  animation: pulse 0.5s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.2);
  }
  100% {
    transform: scale(1);
  }
}

.listings .listing .summary {
  padding: 16px;
}

.listings .listing h4 {
  margin: 0 0 var(--ssr-listing-text-gap) 0;
  text-transform: uppercase;
}

.listings .listing h4 a {
  display: block;
  color: var(--ssr-listing-link-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.listings .listing p {
  color: var(--ssr-listing-text-color);
  margin: 0 0 var(--ssr-listing-text-gap) 0;
  line-height: unset;
}

.listings .listing p:last-child {
  margin: 0;
  font-weight: 300;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.listings .listing .price {
  color: var(--ssr-listing-price-color);
  font-weight: 400;
}

.listings .listing .old-price {
  text-decoration: line-through;
  font-style: italic;
  opacity: 0.5;
}

.listings .listing .bed-bath-sqft {
  display: grid;
  grid-template-columns: 65px 65px auto;
  font-weight: 400;
}

.listings .listing .bed-bath-sqft span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.listings .listing svg {
  fill: var(--ssr-listing-icon-color);
}

.listings .listing .acres {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
}

.listings .acres svg {
  height: 30px !important;
  display: block;
  fill: var(--ssr-listing-icon-color);
}

.listings .listing.placeholder {
  opacity: 0.5;
}

.listings .listing.placeholder .img {
  background: #ccc;
}

.listings .listing.placeholder p {
  background: #e9e9e9;
  padding: 9px;
}

.listings-pager {
  margin-top: 32px;
  display: grid;
  grid-template-columns: 1fr;
}

.listings-pager h4 {
  text-transform: uppercase;
  order: 2;
  font-size: 16px;
}

.listings-pager .listings-pager-links {
  position: relative;

  color: #173663;

  display: flex;
  flex-wrap: nowrap;
  gap: 16px;
  margin-bottom: 8px;
}

.listings-pager .listings-pager-links a {
  cursor: pointer;

  display: block;
  border: 1px solid #ccc;
  width: 35px;
  height: 35px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 1.13rem;

  color: var(--content-link-color);
}

.listings-pager .listings-pager-links a:hover {
  background: #f0f0f0;
  color: var(--content-link-hover-color);
}

.listings-pager .listings-pager-links a.curpage {
  background: #f5f5f5;
  color: #000;
}

@-webkit-keyframes rotateicon {
  0% {
    -webkit-transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
  }
}

@-webkit-keyframes pulsate {
  0% {
    -webkit-transform: scale(1.1);
  }
  50% {
    -webkit-transform: scale(1.3);
  }
  100% {
    -webkit-transform: scale(1.1);
  }
}

.location-beacon .front {
  display: block;
  position: absolute;
  top: -8px;
  left: -8px;
  width: 30px;
  height: 30px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='white' viewBox='0 0 512 512'%3E%3Cpath d='M256 0c8.8 0 16 7.2 16 16l0 48.7c93.3 7.7 167.6 82.1 175.3 175.3l48.7 0c8.8 0 16 7.2 16 16s-7.2 16-16 16l-48.7 0c-7.7 93.3-82.1 167.6-175.3 175.3l0 48.7c0 8.8-7.2 16-16 16s-16-7.2-16-16l0-48.7C146.7 439.6 72.4 365.3 64.7 272L16 272c-8.8 0-16-7.2-16-16s7.2-16 16-16l48.7 0C72.4 146.7 146.7 72.4 240 64.7L240 16c0-8.8 7.2-16 16-16zM96 256a160 160 0 1 0 320 0A160 160 0 1 0 96 256zm224 0a64 64 0 1 0 -128 0 64 64 0 1 0 128 0zm-160 0a96 96 0 1 1 192 0 96 96 0 1 1 -192 0z'/%3E%3C/svg%3E")
    no-repeat center / contain;
  border-radius: 51px;

  z-index: 2;
}

.location-beacon .back {
  display: block;
  position: absolute;
  top: -8px;
  left: -8px;
  z-index: 1;
  width: 30px !important;
  height: 30px !important;
  background: var(--search-near-me-position-icon);

  -webkit-animation: pulsate 5s linear infinite;
  -moz-animation: pulsate 2s linear infinite;

  border-radius: 50px;
}

/* rules for mobile thru tablet  */
@media only screen and (max-width: 1000px) {
  .listings {
    grid-template-columns: 1fr 1fr;
  }

  #map-body {
    grid-template-columns: 1fr 1fr;
  }

  #map-body #results-container #results {
    grid-template-columns: 1fr;
  }

  .listings-pager a {
    display: block;
    border: 1px solid #ccc;
    width: 35px;
    height: 35px;
    display: flex;
    justify-content: center;
    align-items: center;
  }
}

/* stuff for mobile only */
@media only screen and (max-width: 767px) {
  .listings {
    grid-template-columns: repeat(1, 1fr);
  }

  .listings .listing {
    flex-basis: 100%;
  }

  #map-body {
    grid-template-columns: 1fr;
    min-height: calc(100vh - var(--search-form-height) + 25px);
  }

  #map-body #gmap-container {
    display: none;
    position: absolute;
    left: 0;
    top: 0px;
    width: 100vw;
    height: calc(100vh - (var(--header-height) + var(--search-form-height) + var(--adminbar-height))) !important;
  }

  #map-body #gmap-container .wrapper {
    position: relative !important;
    top: calc(var(--header-height) + var(--search-form-height) + var(--adminbar-height));
  }

  #map-body #results-container #results {
    padding: 32px 16px;
  }

  #map-body #results-found {
    padding: 0 16px;
  }
}

@media only screen and (min-width: 900px) {
  #results-container {
    display: grid !important;
  }

  #gmap-container {
    display: block !important;
  }
}
