/* ============================= */
/* CH Property Filters - Scoped  */
/* ============================= */

.ch-property-filtersbar-wrapper {
  width: 100%;
  font-size: 16px;
}

/* Main form container */
.ch-property-filtersbar {
  border: 1px solid #ddd;
  background: #fff;
  padding: 16px;
  margin: 0 0 16px 0;
  font-size: 16px;
}

/* Desktop row layout */
.ch-property-filtersbar .ch-filter-row {
  display: flex !important;
  align-items: flex-end !important;
  gap: 12px !important;
  flex-wrap: nowrap !important;
  width: 100%;
}

/* Field blocks */
.ch-property-filtersbar .ch-filter-field {
  min-width: 0;
}

/* Labels */
.ch-property-filtersbar .ch-filter-field label {
  display: block;
  font-size: 16px;
  font-weight: 700 !important;
  margin: 0 0 6px 0;
  color: #002242 !important;
}

/* Search expands naturally */
.ch-property-filtersbar .ch-filter-field.ch-filter-search {
  flex: 1 1 auto !important;
  min-width: 320px !important;
}

/* Beds & Baths fixed width (desktop) */
.ch-property-filtersbar .ch-filter-field:not(.ch-filter-search) {
  flex: 0 0 140px !important;
  max-width: 140px !important;
}

/* Inputs */
.ch-property-filtersbar input[type="search"],
.ch-property-filtersbar select {
  width: 100%;
  border: 1px solid #ddd;
  padding: 10px 12px;
  border-radius: 0px;
  background: #fff;
  box-sizing: border-box;
  font-size: 16px;
  color: #111;
}


/* ============================= */
/* Buttons */
/* ============================= */

.ch-property-filtersbar button.ch-filter-btn {
  border: none !important;
  outline: none !important;
  box-shadow: none !important;
  padding: 10px 16px;
  cursor: pointer;
  border-radius: 0px;
  line-height: 1;
  white-space: nowrap;
  font-size: 16px !important;
  font-weight: 500;
  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.05s ease;
}

.ch-property-filtersbar button.ch-filter-btn:active {
  transform: translateY(1px);
}

.ch-property-filtersbar .ch-filter-actions {
  display: flex !important;
  gap: 10px !important;
  align-items: flex-end !important;
  flex: 0 0 auto !important;
}

/* Amenities */
.ch-property-filtersbar button.ch-filter-btn-toggle {
  background-color: #002242 !important;
  color: #ffffff !important;
}

.ch-property-filtersbar button.ch-filter-btn-toggle:hover {
  background-color: #00182f !important;
}

/* Search */
.ch-property-filtersbar button.ch-filter-btn-primary {
  background-color: #005d80 !important;
  color: #ffffff !important;
}

.ch-property-filtersbar button.ch-filter-btn-primary:hover {
  background-color: #004966 !important;
}

/* Clear */
.ch-property-filtersbar button.ch-filter-btn-secondary {
  background-color: #ededed !important;
  color: #002242 !important;
}

.ch-property-filtersbar button.ch-filter-btn-secondary:hover {
  background-color: #d8d8d8 !important;
}


/* ============================= */
/* Panel */
/* ============================= */

.ch-property-filtersbar .ch-filter-panel {
  margin-top: 14px;
  border-top: 1px solid #eee;
  padding-top: 14px;
  font-size: 16px;
}

.ch-property-filtersbar .ch-filter-groups {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.ch-property-filtersbar .ch-filter-group {
  border: 1px solid #eee;
  padding: 12px;
}

.ch-property-filtersbar .ch-filter-group legend {
  font-size: 16px;
  font-weight: 600;
}

.ch-property-filtersbar .ch-check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 16px;
  margin: 10px 0;
}

/* Hide status line */
.ch-property-filtersbar-wrapper .ch-filter-status,
.ch-property-filtersbar-wrapper #chFilterStatus {
  display: none !important;
}


/* ============================= */
/* MOBILE FIX ONLY */
/* Row 1 = Search + Beds + Baths */
/* Row 2 = Buttons */
/* ============================= */

@media (max-width: 640px) {

  .ch-property-filtersbar .ch-filter-row {
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  /* Allow search to shrink */
  .ch-property-filtersbar .ch-filter-field.ch-filter-search {
    flex: 1 1 0 !important;
    min-width: 0 !important;
  }

  /* Target Beds (2nd field) */
  .ch-property-filtersbar .ch-filter-row > .ch-filter-field:nth-child(2) {
    flex: 0 0 70px !important;
    max-width: 70px !important;
  }

  /* Target Baths (3rd field) */
  .ch-property-filtersbar .ch-filter-row > .ch-filter-field:nth-child(3) {
    flex: 0 0 70px !important;
    max-width: 70px !important;
  }

  /* Force buttons to new line */
  .ch-property-filtersbar .ch-filter-actions {
    flex: 1 1 100% !important;
    width: 100% !important;
    margin-top: 6px !important;
  }

}