/* ================================================================
   LISTING FILTER — filter.css
   Include only on listing pages (models, qp, show-homes).
   ================================================================ */

/* === Sort select ================================================= */
.sort-select {
  font-size: 0.82rem;
  font-family: "Inter", system-ui, sans-serif;
  border: 2px solid var(--gray-light);
  border-radius: 50px;
  padding: 0.4rem 2.25rem 0.4rem 1rem;
  background: #fff;
  color: var(--dark);
  cursor: pointer;
  outline: none;
  transition: border-color 0.2s ease;
  appearance: auto;
}
.sort-select:focus {
  border-color: var(--red);
}

/* === Filter offcanvas ============================================ */
/* Override Bootstrap offcanvas CSS variables for dark theme */
.filter-offcanvas {
  --bs-offcanvas-bg: #1e1e1e;
  --bs-offcanvas-color: #fff;
  --bs-offcanvas-width: 300px;

  display: flex;
  flex-direction: column;
  color: #fff;
  background: #1e1e1e;
}

/* Header */
.filter-offcanvas-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.filter-offcanvas-title {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}

/* Apply / clear row */
.filter-offcanvas-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.filter-clear-btn {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.35);
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: color 0.2s ease;
}
.filter-clear-btn:hover {
  color: rgba(255, 255, 255, 0.8);
}

/* Scrollable body */
.filter-offcanvas-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
}

/* === Filter groups =============================================== */
.filter-group {
  padding: 1.1rem 1.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}
.filter-group:last-child {
  border-bottom: none;
}

.filter-group-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.35);
  margin-bottom: 0.6rem;
}

/* === Checkboxes ================================================== */
/* Flatten ASP.NET CheckBoxList table/list output */
.filter-offcanvas .checkbox-list,
.filter-offcanvas .checkbox-list tbody {
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  border: none;
  background: none;
}

/* Each row: flex so input + label sit side by side */
.filter-offcanvas .checkbox-list tr,
.filter-offcanvas .checkbox-list td,
.filter-offcanvas .checkbox-list li {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.3rem 0;
  margin: 0;
  border: none;
  background: none;
  width: 100%;
}

.filter-offcanvas .checkbox-list input[type="checkbox"] {
  width: 15px;
  height: 15px;
  flex-shrink: 0;
  accent-color: var(--red);
  cursor: pointer;
  margin: 0;
}

.filter-offcanvas .checkbox-list label {
  flex: 1;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
  margin: 0;
  transition: color 0.15s ease;
}
.filter-offcanvas .checkbox-list label img {
  display: none;
}
.filter-offcanvas .checkbox-list label:hover {
  color: #fff;
}

/* === noUiSlider — compact thin track ============================ */
/* Give the wrapper vertical room so handles + tooltips aren't clipped */
.filter-group .slider-wrap {
  padding: 0.75rem 1.68rem 1.5rem 0.5rem;
  overflow: visible;
}

.filter-offcanvas .noUi-target {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  box-shadow: none;
  height: 2px; /* thin track */
}

.filter-offcanvas .noUi-connects {
  height: 2px;
}

.filter-offcanvas .noUi-connect {
  background: var(--red);
}

.filter-offcanvas .noUi-horizontal .noUi-handle {
  width: 16px;
  height: 16px;
  top: -7px;
  right: -8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--red);
  box-shadow: 0 1px 6px rgba(0, 0, 0, 0.35);
  cursor: grab;
}
.filter-offcanvas .noUi-handle:active {
  cursor: grabbing;
}
.filter-offcanvas .noUi-handle::before,
.filter-offcanvas .noUi-handle::after {
  display: none;
}

.filter-offcanvas .noUi-tooltip {
  background: #111;
  color: #fff;
  border: none;
  font-size: 0.68rem;
  font-family: "Inter", system-ui, sans-serif;
  padding: 2px 6px;
  border-radius: 3px;
  bottom: auto;
  top: 140%;
}
