/* Shared Bon Sejour search-filter controls.
 * Keep this file layout-agnostic: it must not alter result grids or half-map shells.
 */
.bsj-search-filters {
  position: relative;
  z-index: 45;
  display: block;
  width: 100%;
  min-height: 0;
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.bsj-search-filters__inner {
  display: flex;
  min-height: 36px;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.bsj-price-filter {
  position: relative;
}

.bsj-price-filter__trigger {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  gap: 7px;
  padding: 0 12px;
  border: 1px solid rgba(15, 23, 42, .15);
  border-radius: 999px;
  color: #172b4d;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .06);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.bsj-price-filter__trigger:hover,
.bsj-price-filter__trigger:focus-visible,
.bsj-price-filter__trigger.is-active {
  border-color: rgba(26, 71, 167, .55);
  background: #f7faff;
  box-shadow: 0 7px 22px rgba(26, 71, 167, .12);
  outline: 0;
}

.bsj-price-filter__trigger svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  transition: transform 160ms ease;
}

.bsj-price-filter.is-open .bsj-price-filter__trigger svg {
  transform: rotate(180deg);
}

.bsj-price-filter__trigger-value {
  color: #1a47a7;
  font-size: 11px;
  font-weight: 700;
}

.bsj-price-filter__panel[hidden],
.bsj-choice-filter__option[hidden],
.bsj-choice-filter__group[hidden] {
  display: none !important;
}

.bsj-price-filter__panel {
  position: absolute;
  z-index: 100;
  top: calc(100% + 12px);
  left: 0;
  width: min(350px, calc(100vw - 36px));
  padding: 18px;
  border: 1px solid rgba(15, 23, 42, .11);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .17);
}

.bsj-price-filter__heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.bsj-price-filter__heading strong,
.bsj-price-filter__heading span {
  display: block;
}

.bsj-price-filter__heading strong {
  color: #101828;
  font-size: 16px;
  line-height: 1.25;
}

.bsj-price-filter__heading span {
  margin-top: 3px;
  color: #667085;
  font-size: 11px;
}

.bsj-price-filter__close {
  display: grid;
  width: 27px;
  height: 27px;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #475467;
  background: #f2f4f7;
  font-size: 19px;
  line-height: 1;
  cursor: pointer;
}

.bsj-price-filter__values {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 17px;
  color: #101828;
  font-size: 19px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.bsj-price-filter__chart {
  display: grid;
  height: 72px;
  align-items: end;
  grid-template-columns: repeat(24, minmax(2px, 1fr));
  gap: 2px;
  margin: 15px 6px 0;
}

.bsj-price-filter__chart span {
  height: var(--bsj-bar-height);
  min-height: 4px;
  border-radius: 4px 4px 1px 1px;
  background: #e4e7ec;
}

.bsj-price-filter__chart span.is-selected {
  background: #a9c7ff;
}

.bsj-price-filter__range {
  position: relative;
  height: 24px;
  margin: -2px 6px 0;
}

.bsj-price-filter__track {
  position: absolute;
  top: 10px;
  right: 0;
  left: 0;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(to right, #e4e7ec 0 var(--bsj-price-start), #1769e0 var(--bsj-price-start) var(--bsj-price-end), #e4e7ec var(--bsj-price-end) 100%);
}

.bsj-price-filter__range input[type="range"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 24px;
  margin: 0;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  border: 0;
  background: transparent;
  pointer-events: none;
}

.bsj-price-filter__range input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  background: transparent;
}

.bsj-price-filter__range input[type="range"]::-webkit-slider-thumb {
  width: 20px;
  height: 20px;
  margin-top: -8px;
  -webkit-appearance: none;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1769e0;
  box-shadow: 0 2px 9px rgba(26, 71, 167, .34);
  pointer-events: auto;
  cursor: grab;
}

.bsj-price-filter__range input[type="range"]::-moz-range-track {
  height: 4px;
  background: transparent;
}

.bsj-price-filter__range input[type="range"]::-moz-range-thumb {
  width: 15px;
  height: 15px;
  border: 3px solid #fff;
  border-radius: 50%;
  background: #1769e0;
  box-shadow: 0 2px 9px rgba(26, 71, 167, .34);
  pointer-events: auto;
  cursor: grab;
}

.bsj-price-filter__limits {
  display: flex;
  justify-content: space-between;
  margin: 3px 5px 0;
  color: #98a2b3;
  font-size: 10px;
  font-variant-numeric: tabular-nums;
}

.bsj-price-filter__actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px -18px -18px;
  padding: 12px 18px;
  border-top: 1px solid #eaecf0;
}

.bsj-price-filter__reset,
.bsj-price-filter__apply {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.bsj-price-filter__reset {
  border: 0;
  color: #475467;
  background: transparent;
}

.bsj-price-filter__apply {
  border: 1px solid #1a47a7;
  color: #fff;
  background: #1a47a7;
  box-shadow: 0 7px 18px rgba(26, 71, 167, .24);
}

.bsj-choice-filter__panel {
  width: min(330px, calc(100vw - 36px));
}

.bsj-choice-filter__body {
  max-height: 286px;
  margin-top: 14px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.bsj-choice-filter__options {
  display: grid;
  gap: 5px;
}

.bsj-choice-filter__option {
  position: relative;
  display: flex;
  min-width: 0;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  margin: 0;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #172b4d;
  cursor: pointer;
  transition: border-color 140ms ease, background-color 140ms ease;
}

.bsj-choice-filter__option:hover {
  background: #f7f9fc;
}

.bsj-choice-filter__option:has(input:checked) {
  border-color: rgba(26, 71, 167, .18);
  background: #f4f7ff;
}

.bsj-choice-filter__option input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.bsj-choice-filter__check {
  display: grid;
  flex: 0 0 18px;
  width: 18px;
  height: 18px;
  place-items: center;
  border: 1.5px solid #b9c1cc;
  border-radius: 5px;
  color: #fff;
  background: #fff;
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.bsj-choice-filter__check svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  opacity: 0;
  transform: scale(.75);
  transition: opacity 120ms ease, transform 120ms ease;
}

.bsj-choice-filter__option input:checked + .bsj-choice-filter__check {
  border-color: #1769e0;
  background: #1769e0;
}

.bsj-choice-filter__option input:checked + .bsj-choice-filter__check svg {
  opacity: 1;
  transform: scale(1);
}

.bsj-choice-filter__option input:focus-visible + .bsj-choice-filter__check {
  box-shadow: 0 0 0 3px rgba(23, 105, 224, .18);
}

.bsj-choice-filter__option-copy,
.bsj-choice-filter__option-label,
.bsj-choice-filter__option-description {
  display: block;
  min-width: 0;
}

.bsj-choice-filter__option-copy {
  flex: 1 1 auto;
}

.bsj-choice-filter__option-label {
  overflow: hidden;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bsj-choice-filter__option-description {
  margin-top: 2px;
  color: #7b8798;
  font-size: 10px;
  line-height: 1.2;
}

.bsj-choice-filter__stars {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 1px;
  color: #f59e0b;
  font-size: 11px;
  letter-spacing: -.5px;
}

.bsj-choice-filter__stars .is-muted {
  color: #d9dee7;
}

.bsj-choice-filter__panel > .bsj-price-filter__actions {
  margin-top: 14px;
}

.bsj-mobile-results-toolbar,
.bsj-mobile-filter__backdrop,
.bsj-mobile-filter__header,
.bsj-mobile-filter__footer {
  display: none;
}

.bsj-mobile-filter__dialog {
  display: contents;
}

@media (max-width: 768px) {
  .bsj-search-filters__inner {
    width: max-content;
    flex-wrap: nowrap;
  }

  .bsj-price-filter__panel {
    position: fixed;
    z-index: 1051;
    top: auto;
    right: 12px;
    bottom: 12px;
    left: 12px;
    width: auto;
    max-height: min(70vh, 560px);
    overflow-y: auto;
    border-radius: 20px;
  }
}
