/* Shared filter modal for Hotel, Rental, Activity and Tour search pages. */
.bsj-filter-modal__trigger {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid rgba(15, 23, 42, .16);
  border-radius: 999px;
  color: #172b4d;
  background: #fff;
  box-shadow: 0 5px 18px rgba(15, 23, 42, .06);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1;
  cursor: pointer;
  transition: border-color 160ms ease, background-color 160ms ease, box-shadow 160ms ease;
}

.bsj-filter-modal__trigger:hover,
.bsj-filter-modal__trigger:focus-visible,
.bsj-filter-modal__trigger[aria-expanded="true"] {
  border-color: rgba(26, 71, 167, .55);
  background: #f7faff;
  box-shadow: 0 7px 22px rgba(26, 71, 167, .12);
  outline: 0;
}

.bsj-filter-modal__trigger svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.bsj-filter-modal__badge {
  display: inline-grid;
  min-width: 19px;
  height: 19px;
  place-items: center;
  padding: 0 5px;
  border-radius: 999px;
  color: #fff;
  background: #1a47a7;
  font-size: 10px;
  font-weight: 800;
}

.bsj-filter-modal__badge[hidden] {
  display: none !important;
}

body.bsj-filter-modal-open {
  overflow: hidden !important;
}

.bsj-search-filters:not(.is-filter-modal-open) > .bsj-mobile-filter__backdrop,
.bsj-search-filters:not(.is-filter-modal-open) > .bsj-mobile-filter__dialog {
  display: none !important;
}

.bsj-search-filters.is-filter-modal-open {
  z-index: 1200 !important;
}

.bsj-search-filters.is-filter-modal-open > .bsj-mobile-filter__backdrop {
  position: fixed;
  z-index: 1200;
  inset: 0;
  display: block !important;
  background: transparent;
}

.bsj-search-filters.is-filter-modal-open > .bsj-mobile-filter__dialog {
  position: fixed;
  z-index: 1201;
  top: calc(50% + 40px);
  left: 50%;
  display: flex !important;
  width: min(760px, calc(100vw - 40px));
  max-height: min(620px, calc(100dvh - 64px));
  flex-direction: column;
  border: 1px solid rgba(15, 23, 42, .1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 32px 90px rgba(15, 23, 42, .28);
  overflow: hidden;
  transform: translate(-50%, -50%);
}

.bsj-search-filters.is-filter-modal-open .bsj-mobile-filter__header {
  display: flex !important;
  min-height: 76px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 24px;
  border-bottom: 1px solid #e8ecf2;
}

.bsj-search-filters.is-filter-modal-open .bsj-mobile-filter__header h2 {
  margin: 0;
}

.bsj-search-filters.is-filter-modal-open .bsj-mobile-filter__header h2 {
  color: #101828;
  font-size: 22px;
  font-weight: 750;
  line-height: 1.2;
}

.bsj-search-filters.is-filter-modal-open .bsj-mobile-filter__close {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
  padding: 0;
  border: 1px solid #e3e7ed;
  border-radius: 50%;
  color: #344054;
  background: #fff;
  cursor: pointer;
}

.bsj-search-filters.is-filter-modal-open .bsj-mobile-filter__close svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-width: 1.8;
}

.bsj-search-filters.is-filter-modal-open .bsj-search-filters__inner {
  display: grid !important;
  min-height: 0;
  flex: 1 1 auto;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 0;
  padding: 8px 24px 24px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.bsj-search-filters.is-filter-modal-open .bsj-search-filters__inner > .bsj-price-filter {
  min-width: 0;
  border-bottom: 1px solid #edf0f4;
}

.bsj-search-filters.is-filter-modal-open .bsj-price-filter__trigger {
  display: flex !important;
  width: 100%;
  min-height: 64px;
  justify-content: flex-start;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: #101828;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.bsj-search-filters.is-filter-modal-open .bsj-price-filter__trigger > svg {
  margin-left: auto;
}

.bsj-search-filters.is-filter-modal-open .bsj-price-filter__panel {
  position: static;
  width: 100%;
  max-width: none;
  padding: 0 0 22px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.bsj-search-filters.is-filter-modal-open .bsj-price-filter__heading,
.bsj-search-filters.is-filter-modal-open .bsj-price-filter__panel > .bsj-price-filter__actions {
  display: none !important;
}

.bsj-search-filters.is-filter-modal-open .bsj-choice-filter__body {
  max-height: none;
  margin-top: 0;
}

.bsj-search-filters.is-filter-modal-open .bsj-mobile-filter__footer {
  display: flex !important;
  min-height: 72px;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-top: 1px solid #e8ecf2;
  background: #fff;
}

.bsj-tour-filter-bar {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.bsj-tour-filter-bar > .bsj-search-filters {
  width: auto;
}

.bsj-tour-filter-modal__body {
  display: block !important;
}

.bsj-tour-filter-modal__options,
.bsj-tour-filter-modal__options ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.bsj-tour-filter-modal__options > li {
  padding: 18px 0;
  border-bottom: 1px solid #edf0f4;
}

.bsj-tour-filter-modal__options .form-extra-field > .btn.dropdown {
  width: 100%;
  padding: 0;
  border: 0;
  color: #101828;
  background: transparent;
  box-shadow: none;
  font-size: 15px;
  font-weight: 700;
  text-align: left;
}

.bsj-tour-filter-modal__options .dropdown-menu {
  position: static;
  display: block;
  width: 100%;
  margin: 12px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.bsj-mobile-filter__reset,
.bsj-mobile-filter__apply {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

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

.bsj-mobile-filter__apply {
  border: 1px solid #1a47a7;
  color: #fff;
  background: #1a47a7;
  box-shadow: 0 8px 20px rgba(26, 71, 167, .22);
}

@media (max-width: 768px) {
  #sticky-halfmap .top-filter.bsj-search-filters.is-filter-modal-open {
    position: fixed !important;
    z-index: 1200 !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100dvh !important;
    padding: 0 !important;
    background: transparent !important;
  }

  .bsj-activity-filter-bar .bsj-search-filters {
    display: inline-flex !important;
  }

  .bsj-activity-categories__separator {
    display: block !important;
  }

  .bsj-search-filters.is-filter-modal-open > .bsj-mobile-filter__dialog {
    top: 50%;
    right: auto;
    bottom: auto;
    left: 50%;
    width: calc(100% - 24px);
    max-height: min(680px, calc(100dvh - max(72px, env(safe-area-inset-top, 0px))));
    border-radius: 24px;
    transform: translate(-50%, -50%);
  }

  .bsj-search-filters.is-filter-modal-open .bsj-search-filters__inner {
    display: block !important;
    padding-inline: 20px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .bsj-search-filters.is-filter-modal-open > .bsj-mobile-filter__dialog {
    animation: bsj-filter-modal-in 180ms cubic-bezier(.22, 1, .36, 1);
  }
}

@keyframes bsj-filter-modal-in {
  from { opacity: 0; transform: translate(-50%, calc(-50% + 10px)) scale(.985); }
  to { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
