/* Results filters: extracted styles */

/* IonRangeSlider theme tweaks */
.irs--round .irs-bar,
.irs--round .irs-from,
.irs--round .irs-to {
  background: var(--bs-primary);
}
.irs--round .irs-handle { border: 1px solid var(--bs-primary); }
.irs--round .irs-single { background: var(--bs-primary); color: #fff; }

/* Enhanced tab transitions */
.tab-pane { transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out; }
.tab-pane:not(.show) { transform: translateY(10px); }
.tab-pane.show { transform: translateY(0); }

/* iOS-style small switch */
.ios-switch .ios-switch-input {
  width: 38px; height: 22px; background-color: #e9ecef; border: 1px solid #ced4da;
  transform: scale(0.9); transform-origin: right center; cursor: pointer;
}
.ios-switch .ios-switch-input:checked { background-color: var(--bs-primary); border-color: var(--bs-primary); }

/* Scoped loading overlay (covers only #mainContent) */
#mainContent { position: static; }
.results-loading-overlay {
  position: fixed; background: rgba(255,255,255,0.85);
  display: flex; align-items: center; justify-content: center; z-index: 1000;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity 150ms ease, visibility 150ms linear;
}
.results-loading-overlay.is-visible { opacity: 1; visibility: visible; pointer-events: auto; }

/* Lock page scroll while loading so overlay remains aligned */
body.results-loading-locked { overflow: hidden; }

/* Optional: subtle sticky shadow when sidebar is stuck (enhancement-ready) */
@supports (position: sticky) {
  @media (min-width: 992px) {
    #searchFormContainer { transition: box-shadow 150ms ease; }
  }
}
.results-loading-overlay .loading-inner {
  display: flex; gap: .75rem; align-items: center; color: #0d6efd; font-weight: 600;
}

/* Desktop sticky filter container */
@media (min-width: 992px) {
  #searchFormContainer { position: sticky; top: var(--filter-sticky-offset, 16px); }
}

/* Mobile modal: ensure content doesn't sit under the fixed CTA bar */
.mobile-filter-modal-body { padding-bottom: calc(88px + env(safe-area-inset-bottom)); }

/* Fixed bottom CTA bar in the mobile filter modal */
.mobile-filter-cta {
  display: none; /* hidden until user adjusts a filter */
  position: fixed; left: 0; right: 0; bottom: 0;
  background: #fff;
  border-top: 1px solid rgba(0,0,0,0.1);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 1056; /* above modal content (1055) */
}
.mobile-filter-cta.is-visible { display: block; }

/* Mobile: hide header strip; keep in-flow close icon; restore modest side padding */
@media (max-width: 991.98px) {
  /* Remove the fixed header/title entirely on mobile */
  #searchModal .modal-header { display: none; }
  /* Light horizontal padding so content isn't edge-to-edge */
  #searchModal .modal-body { padding-left: .75rem; padding-right: .75rem; }
}
