:root {
  --primary-color-filter-rso: #5d6a56;
  --complementary-color-filter-rso: #95C07E;
  --complementary-darken-color-filter-rso: #85a96e;
}

.rso_property_filter {
  padding: 32px;
  max-width: 1350px;
  margin: 0 auto;
  background-color: var(--primary-color-filter-rso);
}

/* .form-row */
.rso_property_filter .filter-grid .form-row {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  row-gap: 16px;
}

.rso_property_filter .filter-item {
  padding: 16px;
  border: 1px solid #ddd;
  border-radius: 8px;
  background-color: #f9f9f9;
  transition: background-color 0.3s ease;
}

.rso_property_filter .filter-item:hover {
  background-color: #f1f1f1;
}

.rso_property_filter .filter-item label {
  display: block;
  margin-bottom: 8px;
  font-weight: bold;
}

.rso_property_filter .filter-item input,
.rso_property_filter .filter-item select {
  width: 100%;
  padding: 8px;
  border: 1px solid #efefef;
  border-radius: 4px;
}

/* Search button wrapper */
.custom-btnsearch {
  display: flex;
  column-gap: 6px;
}

/* Search button */
.custom-btn-search {
  flex: 1;
  color: #fff;
  background-color: var(--complementary-color-filter-rso);
  transition: background-color 300ms ease;
  font-optical-sizing: auto;
  font-weight: 600;
  font-style: normal;
  letter-spacing: 1.6px;
  font-size: 1rem;
  text-transform: uppercase;
}
.custom-btn-search:hover {
  background-color: var(--complementary-darken-color-filter-rso);
}


/* Input for ref ID */
#searchform-ref {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  //border: 1px solid #ccc0a6;
  width: 100%;
  padding: 11px 16px;
  color: rgba(55, 78, 43, 1);
  box-shadow: none;
  border-radius: 0;
}
#searchform-ref:focus {
  outline: none;
  box-shadow: none;
}

#searchform-ref ::placeholder {
    color: #efefef;
    opacity: 1;
}


/* Filter reset button */
.rso_property_filter #form-reset {
  cursor: pointer;
  padding: 16px 16px;
  border: 1px solid #fff;
  color: #fff;
  display: inline-block;
  line-height: 1;
  font-weight: 400;
  font-style: normal;
  font-size: 1rem;
  text-align: center;
  transition: background-color 300ms ease, color 300ms ease;
}
.rso_property_filter #form-reset:hover {
  color: var(--primary-color-filter-rso);
  background-color: #fff;
}

/* Advanced filter */
.rso_property_filter #advanced_filter {
  visibility: hidden;
  opacity: 0;
  height: 0;
}
.rso_property_filter #advanced_filter.active {
  visibility: visible;
  opacity: 1;
  height: auto;
}

/* Advanced filter button */
.rso_property_filter #advanced_filter_btn {
  cursor: pointer;
  padding: 16px 16px 16px 0px;
  display: inline-flex;
  column-gap: 8px;
  align-items: center;
  line-height: 1;
  font-weight: 400;
  font-style: normal;
  font-size: 1rem;
  color: #fff;
  transition: color 300ms ease;
}
.rso_property_filter #advanced_filter_btn:hover {
  text-decoration: underline;
}

.rso_property_filter #advanced_filter_btn.active {
  color: var(--complementary-color-filter-rso);
}

.custom-feature-btn {
  cursor: pointer;
  padding: 11px 16px 11px 0px;
  font-size: 1rem;
  color: #fff;
  border-bottom: 1px solid #fff;
}
.custom-feature-btn.has-checked {
  //padding: 11px 16px;
  color:  var(--complementary-color-filter-rso);
  //background-color: #fff;
  border-bottom: 1px solid var(--complementary-color-filter-rso);
}

/* The container must be positioned relative: */
.custom-select,
.custom-location,
.custom-feature {
  position: relative;
}

.custom-select select,
.multi-select-dropdown {
  display: none; /* hide original SELECT element: */
}

.custom-sort {
  border: 1px solid #efefef;
}

.select-selected,
.custom-location-btn {
  background-color: #fff;
}

/* Style the arrow inside the select element: */
.select-selected:after,
.custom-location-btn:after,
.custom-feature-btn:after {
  position: absolute;
  content: "";
  top: 21px;
  right: 14px;
  width: 0;
  height: 0;
  border: 6px solid transparent;
  border-color: var(--primary-color-filter-rso) transparent transparent transparent;
}
.custom-feature-btn:after {
  right: 0;
  border-color: #fff transparent transparent transparent;
}
.custom-feature-btn.has-checked:after {
  top: 21px;
  border-color: var(--complementary-color-filter-rso) transparent transparent transparent;
}

/* Point the arrow upwards when the select box is open (active): */
.select-selected.select-arrow-active:after,
.custom-location-btn.select-arrow-active:after {
  border-color: transparent transparent var(--primary-color-filter-rso) transparent;
  top: 15px;
}
.custom-feature-btn.select-arrow-active:after {
  border-color: transparent transparent #fff transparent;
  top: 15px;
}
.custom-feature-btn.select-arrow-active.has-checked:after {
  border-color: transparent transparent var(--complementary-color-filter-rso) transparent;
  top: 15px;
} 

/* style the items (options), including the selected item: */
.select-items div,
.select-selected,
.custom-location-btn {
  padding: 11px 16px;
  cursor: pointer;
}
.select-items div,
.multi-select-dropdown div label {
  background-color: #fff;
  border-bottom: 1px solid #efefef;
}

.select-items div:first-child,
.multi-select-dropdown div:first-child label {
  border-top: 1px solid #efefef;
}

/* custom locations and features dropdown */
.custom-location-btn,
.custom-feature-btn {
  display: inline-block;
  width: 100%;
  text-align: left;
}
.multi-select-dropdown {

}
.multi-select-dropdown.active {
  display: block;
}
.multi-select-dropdown div label {
  display: inline-block;
  align-items: center;
  width: 100%;
  position: relative;
  padding: 11px 16px 11px 40px;
  cursor: pointer;
  font-size: 1rem;
}
.multi-select-dropdown div label:before {
  content: "";
  display: inline-block;
  position: absolute;
  top: 16px;
  left: 16px;
  width: 16px;
  height: 16px;
  border: 1px solid var(--primary-color-filter-rso);
  margin-right: 8px;
}
.multi-select-dropdown div label:after {
  content: "";
  display: inline-block;
  position: absolute;
  top: calc(16px + 2px);
  left: calc(16px + 2px);
  width: 12px;
  height: 12px;
  background: var(--primary-color-filter-rso);
  transition: all .2s;

}
.multi-select-dropdown div [type=checkbox]:not(:checked)+label:after {
  opacity: 0;
  transform: scale(.01);
}
.multi-select-dropdown div [type=checkbox]:checked+label:after {
  opacity: 1;
  transform: scale(1);
}

.multi-select-dropdown [type=checkbox] {
  position: absolute;
  left: -9999px;
}


/* Style items (options): */
.select-items,
.multi-select-dropdown {
  position: absolute;
  background-color: #ccc0a6;
  top: 100%;
  left: 0;
  right: 0;
  z-index: 99;
  max-height: 250px;
  overflow-y: auto;
}

/* Hide the items when the select box is closed: */
.select-hide {
  display: none;
}

.select-items div:hover,
.select-items div.same-as-selected,
.multi-select-dropdown div label:hover {
  //background-color: rgba(0, 0, 0, 0.1);
  background-color: #efefef;
}

/* Wrapper for Matching properties count & Sort */
.properties_count_sort_wrapper {
  padding: 32px 32px 0;
  max-width: 1350px;
  margin: 0 auto;
}

/* Matching properties count */
.properties_count {
  font-size: .875rem;
  letter-spacing: 1.4px;
  padding: 16px 16px 0;
  text-align: center;
  text-transform: uppercase;
  max-width: 1280px;
  margin: 0 auto;
}


/* Scrollbar */
/* width */
.rso_property_filter *::-webkit-scrollbar {
  width: 8px;
}

/* Track */
.rso_property_filter *::-webkit-scrollbar-track {
  background: #efefef;
}

/* Handle */
.rso_property_filter *::-webkit-scrollbar-thumb {
  background: var(--complementary-color-filter-rso);
}

/* Handle on hover */
.rso_property_filter *::-webkit-scrollbar-thumb:hover {
  background: var(--primary-color-filter-rso);
}


/*--------------------------------------------------------------*/
/*                        Tablet                                */
/*--------------------------------------------------------------*/
@media screen and (min-width: 800px) {
  .rso_property_filter .filter-grid .form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 24px;
  }

  .rso_property_filter .filter-grid .form-row#advanced_filter {
    row-gap: 0px;
  }

  /* Wrapper for Matching properties count & Sort */
  .properties_count_sort_wrapper {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    column-gap: 24px;
    row-gap: 24px;
  }
  .properties_count {
    grid-column: 2 / 3;
  }
}

/*--------------------------------------------------------------*/
/*                        Laptop                                */
/*--------------------------------------------------------------*/
@media screen and (min-width: 1280px) {
  .rso_property_filter .filter-grid .form-row {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
