/* Domira Real Estate: listing pages. Builds on the theme's card, filter, map and pagination styles. */

[hidden] {
  display: none !important;
}

.domira-sort .nice-select {
  min-width: 190px;
  width: auto;
}
.domira-sort .nice-select .list {
  min-width: 100%;
}
.domira-sort label {
  margin: 0;
}

/* Range sliders. */
.domira-range noscript {
  display: none;
}
.domira-range .noUi-target {
  margin: 6px 8px 0;
}
.wd-filter-select .domira-range {
  width: 100%;
}

/* One full-width button under the card, the heart over the photo. */
.card-house.style-list .wrap-img {
  position: relative;
}
.domira-fav--card {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 7;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--Text-primary, #101010);
  font-size: 22px;
}
.domira-fav--card:hover {
  color: #fff;
  background: var(--Primary, #fe5631);
}

/* Listing without a photo. */
.domira-noimg {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  background: var(--Bg-light, #f9f7f3);
}

/* Map (Leaflet) dressed like the design's map. */
.domira-map {
  width: 100%;
  height: 100%;
  min-height: 320px;
  z-index: 1;
}
.domira-map .office-marker {
  transition: border-color 0.2s;
}
.leaflet-container {
  font-family: inherit;
}
.domira-popup .leaflet-popup-content-wrapper {
  padding: 0;
  border-radius: 16px;
  box-shadow: 0 10px 25px rgba(72, 95, 119, 0.1);
}
.domira-popup .leaflet-popup-content {
  margin: 0;
  width: max-content !important;
  min-width: 380px;
  max-width: 480px;
}
.domira-popup .popup-property .img-style {
  flex: none;
}
.domira-popup .popup-property .info li {
  white-space: nowrap;
}
@media (max-width: 575px) {
  .domira-popup .leaflet-popup-content {
    min-width: 280px;
  }
}
.domira-popup .popup-property {
  color: inherit;
  text-decoration: none;
}
.domira-popup .popup-property .img-style img {
  display: block;
  width: 120px;
  height: 120px;
  object-fit: cover;
}
.domira-popup .popup-property p {
  margin: 0 0 4px;
}
.domira-popup .popup-property h6 {
  margin: 0 0 12px;
}
.domira-popup .popup-property .info {
  margin: 0;
  padding: 0;
  list-style: none;
}
.domira-popup .leaflet-popup-tip {
  box-shadow: none;
}

/* The Map switch has a visible label. */
.wg-filter .wrap-btn label {
  margin: 0;
  cursor: pointer;
}

@media (max-width: 575px) {
  .domira-sort {
    width: 100%;
  }
  .domira-sort .nice-select {
    flex: 1;
  }
}

/* AJAX refresh: the results fade while new ones load. */
.domira-listings [data-ajax-results],
.domira-listings [data-ajax-toolbar] {
  transition: opacity 0.2s;
}
.domira-listings.is-loading [data-ajax-results] {
  opacity: 0.4;
  pointer-events: none;
}

/* Search popup under the hero keyword field. */
.domira-search-pop {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 4;
  padding: 28px 20px 32px;
  background: var(--White, #fff);
  border-radius: 0 0 16px 16px;
  box-shadow: 0 14px 25px rgba(72, 95, 119, 0.1);
  text-align: left;
}
.domira-search-pop[hidden] {
  display: none;
}
.domira-search-pop.is-loading {
  opacity: 0.55;
}
.domira-search-pop__inner > .title {
  margin-bottom: 16px;
}
.domira-search-pop__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.domira-search-pop__tags .tag {
  padding: 4px 12px;
  border: 1px solid var(--Line, #e5e7eb);
  border-radius: 4px;
  color: var(--Text-primary, #111);
}
.domira-search-pop__tags .tag.is-active {
  background: var(--Text-primary, #111);
  border-color: var(--Text-primary, #111);
  color: var(--White, #fff);
}
.domira-search-pop__list {
  margin: 24px 0;
  padding-top: 24px;
  border-top: 1px solid var(--Line, #e5e7eb);
}
.domira-search-pop__list > .title {
  margin-bottom: 20px;
}
.domira-keyword {
  position: relative;
}
.domira-keyword input {
  padding-right: 96px;
}
.domira-keyword__clear {
  position: absolute;
  top: 50%;
  right: 16px;
  display: none;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--Text-primary, #111);
  cursor: pointer;
  transform: translateY(-50%);
}
.wg-filter.active .domira-keyword__clear {
  display: flex;
}

@media (max-width: 767px) {
  .domira-search-pop {
    max-height: 70vh;
    overflow-y: auto;
    padding: 20px 16px 24px;
    overscroll-behavior: contain;
  }
}

/* Half-map page: one screen like the design. No footer, so only the list scrolls (the admin bar takes 32px / 46px of the height). */
.domira-no-footer .footer,
.domira-no-footer .progress-wrap {
  display: none;
}
.domira-no-footer.admin-bar .wrapper-layout .wrap-left,
.domira-no-footer.admin-bar .wrapper-layout .wrap-right {
  height: calc(100vh - 220px);
}
@media (max-width: 782px) {
  .domira-no-footer.admin-bar .wrapper-layout .wrap-left,
  .domira-no-footer.admin-bar .wrapper-layout .wrap-right {
    height: calc(100vh - 234px);
  }
}
