/* Properties listing page – scoped styles */
.properties-search-bar {
  margin-bottom: 28px;
}

.properties-search-bar__inner {
  display: flex;
  align-items: center;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--border-color, #e5e5e5);
  border-radius: 14px;
  padding: 10px 12px 10px 18px;
  box-shadow: 0 8px 24px rgba(21, 32, 70, 0.04);
}

.properties-search-bar__inner i {
  color: var(--primary-color, #FC5E08);
  font-size: 16px;
  flex: none;
}

.properties-search-bar.has-search-error .properties-search-bar__inner {
  border-color: #dc3545;
}

.properties-search-state {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 210px;
  padding-right: 12px;
  border-right: 1px solid var(--border-color, #e5e5e5);
}

.properties-search-state .ts-wrapper,
.properties-search-state .tom_select {
  flex: 1 1 auto;
  min-width: 0;
  width: 100% !important;
}

.properties-search-state .ts-wrapper.single .ts-control,
.properties-search-state .ts-wrapper.single.input-active .ts-control {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 6px 28px 6px 0;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  background: transparent;
  font-size: 15px;
  line-height: 1.6;
  color: var(--heading-color, #1d1d1d);
  cursor: pointer;
}

.properties-search-state .ts-control::after {
  content: "\f078";
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 11px;
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  color: #777;
  transition: transform 0.2s ease;
}

.properties-search-state .ts-wrapper.dropdown-active .ts-control::after {
  transform: translateY(-50%) rotate(180deg);
}

.properties-search-state .ts-control input {
  font-size: inherit;
  color: inherit;
  min-width: 40px !important;
}

.properties-search-field {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.properties-search-field input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 15px;
  color: var(--heading-color, #1d1d1d);
  padding: 8px 0;
  text-overflow: ellipsis;
}

.properties-search-field input::placeholder {
  color: #999;
}

.properties-search-bar__inner .cs_btn {
  flex: none;
  min-height: 42px;
}

.properties-search-message {
  display: block;
  margin: 8px 4px 0;
  font-size: 13px;
  line-height: 1.45;
  color: #dc3545;
}

.properties-search-message[hidden] {
  display: none;
}

.properties-search-results {
  position: absolute;
  top: calc(100% + 14px);
  left: -30px;
  right: -12px;
  z-index: 60;
  margin: 0;
  padding: 6px 0;
  list-style: none;
  max-height: 360px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: #fff;
  border: 1px solid rgba(29, 29, 29, 0.1);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.properties-search-results[hidden] {
  display: none;
}

.properties-search-group {
  padding: 10px 16px 4px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #999;
}

.properties-search-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 16px;
  cursor: pointer;
}

.properties-search-option:hover,
.properties-search-option.is-active {
  background: rgba(252, 94, 8, 0.07);
}

.properties-search-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
}

.properties-search-results .properties-search-icon i {
  font-size: 14px;
}

.properties-search-icon.is-property {
  background: rgba(252, 94, 8, 0.12);
}

.properties-search-results .properties-search-icon.is-property i {
  color: #FC5E08;
}

.properties-search-icon.is-location {
  background: rgba(26, 115, 232, 0.12);
}

.properties-search-results .properties-search-icon.is-location i {
  color: #1a73e8;
}

.properties-search-text {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  min-width: 0;
}

.properties-search-main {
  font-size: 14px;
  color: var(--heading-color, #1d1d1d);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.properties-search-text small {
  font-size: 12px;
  color: #777;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.properties-search-tag {
  flex: none;
  font-size: 11px;
  color: #888;
  border: 1px solid rgba(29, 29, 29, 0.12);
  border-radius: 999px;
  padding: 2px 8px;
}

.properties-search-empty {
  padding: 10px 16px;
  font-size: 13px;
  color: #777;
}

.properties-search-attribution {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 4px;
  padding: 8px 16px 4px;
  border-top: 1px solid rgba(29, 29, 29, 0.08);
  font-size: 11px;
  color: #999;
}

.properties-search-attribution img {
  display: block;
  height: 16px;
  width: auto;
}

@media (max-width: 767.98px) {
  .properties-search-bar__inner {
    flex-wrap: wrap;
    padding: 12px;
  }

  .properties-search-state {
    flex: 1 1 100%;
    padding-right: 0;
    padding-bottom: 8px;
    border-right: 0;
    border-bottom: 1px solid var(--border-color, #e5e5e5);
  }

  .properties-search-field {
    flex: 1 1 100%;
  }

  .properties-search-results {
    left: -12px;
    right: -12px;
  }

  .properties-search-bar__inner .cs_btn {
    width: 100%;
  }

  .properties-search-tag {
    display: none;
  }
}

.properties-filter-actions {
  padding: 8px 20px 24px;
  display: grid;
  gap: 12px;
}

.properties-filter-reset {
  text-align: center;
  font-weight: 600;
  color: var(--heading-color, #1d1d1d);
  text-decoration: underline;
}

.properties-filter-reset:hover {
  color: var(--primary-color, #FC5E08);
}

.is-filter-hidden {
  display: none !important;
}

.properties-empty-state {
  background: #fff;
  border: 1px dashed var(--border-color, #e5e5e5);
  border-radius: 16px;
  padding: 40px 24px;
  text-align: center;
}

.properties-filter-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background-color: rgba(21, 32, 70, 0.55);
  z-index: 9998;
}

/* Template Tom Select – full-width filter dropdowns */
.properties-filter-panel .cs_property_location,
.properties-filter-panel .properties-filter-select {
  width: 100%;
  max-width: 100%;
  display: block;
}

.properties-filter-panel .cs_property_location .ts-wrapper,
.properties-filter-panel .properties-filter-select .ts-wrapper,
.properties-filter-panel .cs_property_location .tom_select,
.properties-filter-panel .properties-filter-select .tom_select {
  width: 100% !important;
  max-width: 100%;
  display: block;
}

.properties-filter-panel .cs_property_location .ts-control,
.properties-filter-panel .properties-filter-select .ts-control {
  width: 100%;
}

.properties-filter-overlay.is-visible {
  display: block;
}

body.properties-filter-open {
  overflow: hidden;
}

.properties-filter-toggle {
  min-height: 42px;
  padding-left: 16px;
  padding-right: 16px;
}

.properties-filter-panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 0;
  margin-bottom: 8px;
}

.properties-filter-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border-color);
  border-radius: 50%;
  background: var(--white-color);
  color: var(--heading-color);
  cursor: pointer;
  padding: 0;
  transition: all 0.25s ease;
}

.properties-filter-close:hover {
  border-color: var(--primary-color);
  color: var(--primary-color);
}

@media (max-width: 991.98px) {
  .properties-filter-col {
    position: fixed;
    top: 0;
    left: 0;
    width: min(340px, 88vw);
    height: 100dvh;
    z-index: 9999;
    padding: 0 !important;
    max-width: none;
    flex: 0 0 auto;
    transform: translateX(-105%);
    transition: transform 0.35s ease;
  }

  .properties-filter-col.is-open {
    transform: translateX(0);
  }

  .properties-filter-panel {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 0 !important;
    padding-top: 0 !important;
  }

  .properties-grid-col {
    flex: 0 0 100%;
    max-width: 100%;
  }
}

@media (min-width: 992px) {
  .properties-filter-panel-top {
    display: none !important;
  }
}

.properties-grid .cs_card.cs_style_1 .cs_card_thumbnail {
  height: auto;
  aspect-ratio: 1 / 1;
}

/* Clickable property cards */
.properties-grid .properties-grid-card {
  display: block;
  color: inherit;
  text-decoration: none;
  height: 100%;
  transition: transform 0.25s ease;
}

.properties-grid .properties-grid-card:hover {
  color: inherit;
}

.properties-grid .properties-grid-card .cs_property_title {
  color: var(--heading-color);
}

@media (min-width: 992px) {
  .properties-grid .properties-grid-card .cs_property_features {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0;
    margin-bottom: 14px !important;
    font-size: 13px;
    line-height: 1.2;
  }

  .properties-grid .properties-grid-card .cs_property_features li {
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
    flex: 0 1 auto;
  }

  .properties-grid .properties-grid-card .cs_property_features li:not(:first-child) {
    padding-left: 12px;
    margin-left: 12px;
  }

  .properties-grid .properties-grid-card .cs_property_features li:not(:first-child)::before {
    height: 14px;
  }

  .properties-grid .properties-grid-card .cs_property_features li span:first-child {
    margin-right: 5px;
    line-height: 1;
  }

  .properties-grid .properties-grid-card .cs_property_features li span:first-child svg {
    width: 14px;
    height: 14px;
  }

  .properties-grid .properties-grid-card .cs_property_features li span:first-child i {
    font-size: 12px;
  }

  .properties-grid .properties-grid-card .cs_property_info {
    display: block;
  }

  .properties-grid .properties-grid-card .cs_property_info_text {
    width: 100%;
    max-width: 100%;
  }

  .properties-grid .properties-grid-card .cs_property_title {
    font-size: 18px;
    line-height: 1.35;
    margin-bottom: 8px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
  }

  .properties-grid .properties-grid-card .cs_property_location_text {
    font-size: 14px;
  }

  .properties-grid .properties-grid-card hr {
    margin-bottom: 12px !important;
  }
}

@media (max-width: 767px) {
  .properties-grid {
    --bs-gutter-x: 14px;
    --bs-gutter-y: 14px;
  }

  .properties-grid .properties-grid-card .cs_card_thumbnail {
    margin-bottom: 9px !important;
  }

  .properties-grid .properties-grid-card .cs_property_price {
    font-size: 11px;
    line-height: 1.3em;
    padding: 4px 7px;
    left: 8px;
    top: 8px;
  }

  .properties-grid .properties-grid-card .cs_property_features {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0;
    margin-bottom: 8px !important;
    font-size: 9px;
    line-height: 1.2em;
  }

  .properties-grid .properties-grid-card .cs_property_features li {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding-left: 0 !important;
    flex: 0 1 auto;
    min-width: 0;
    white-space: nowrap;
  }

  .properties-grid .properties-grid-card .cs_property_features li:not(:first-child) {
    padding-left: 7px;
    margin-left: 7px;
    position: relative;
  }

  .properties-grid .properties-grid-card .cs_property_features li:not(:first-child)::before {
    display: block;
    content: "";
    width: 1px;
    height: 11px;
    background-color: var(--secondary-color);
    opacity: 0.3;
    position: absolute;
    top: 50%;
    left: 0;
    transform: translateY(-50%);
  }

  .properties-grid .properties-grid-card .cs_property_features li span:first-child {
    flex: none;
    margin-right: 0;
  }

  .properties-grid .properties-grid-card .cs_property_features li span:first-child svg {
    width: 10px;
    height: 10px;
  }

  .properties-grid .properties-grid-card .cs_property_features li span:first-child i {
    font-size: 10px;
  }

  .properties-grid .properties-grid-card .cs_property_features li span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .properties-grid .properties-grid-card hr {
    margin-bottom: 7px !important;
  }

  .properties-grid .properties-grid-card .cs_property_title {
    font-size: 14px;
    line-height: 1.25em;
    margin-bottom: 5px;
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .properties-grid .properties-grid-card .cs_property_location_text {
    padding-left: 14px;
    margin-bottom: 0;
    font-size: 10px;
    line-height: 1.35em;
  }

  .properties-grid .properties-grid-card .cs_property_location_text p {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .properties-grid .properties-grid-card .cs_property_location_text span svg,
  .properties-grid .properties-grid-card .cs_property_location_text span i {
    width: 12px;
    height: 12px;
    font-size: 12px;
  }
}
