.the7-ldx-hidden {
  display: none !important;
}

/* Keep the custom groups visually consistent with native Lodgix rows. */
.the7-ldx-custom-group .ldx-text-sm {
  line-height: 1.5;
}

/* Avoid nested internal scrollbars in Lodgix filter panes. */
#ldx-amenities-drop .ldx-filter-content,
#ldx-more-filters .ldx-filter-content .ldx-amenities-fieldset {
  overflow-y: visible !important;
  max-height: none !important;
  padding-right: 0 !important;
}

/* Desktop: compact Amenities popup so all groups fit without scrolling. */
@media screen and (min-width: 1024px) {
  #ldx-amenities-drop .ldx-filter-content {
    max-height: none !important;
    overflow: visible !important;
  }

  #ldx-amenities-drop .ldx-am-srch-group {
    margin-top: 0.625rem !important;
    padding-top: 0.625rem !important;
  }

  #ldx-amenities-drop .ldx-am-srch-group > p,
  #ldx-amenities-drop .ldx-am-srch-group > p strong {
    font-size: 0.92rem;
    line-height: 1.25;
    font-weight: 600 !important;
    margin-bottom: 0.2rem !important;
  }

  #ldx-amenities-drop .ldx-am-srch-group .ldx-srch-spc {
    row-gap: 0.15rem !important;
  }

  #ldx-amenities-drop .ldx-am-srch-group .ldx-text-sm,
  #ldx-amenities-drop .ldx-am-srch-group label {
    font-size: 0.93rem;
    line-height: 1.25;
  }

  #ldx-amenities-drop .ldx-am-srch-group .ldx-h-6 {
    height: 1.3rem;
  }
}

/* Mobile: keep one smooth scroll region and tighten spacing. */
@media screen and (max-width: 1023.98px) {
  /*
   * Mobiscroll wraps Lodgix filters in its own scroll container. Disable wrapper scrolling
   * so only Lodgix filter content scrolls (prevents double vertical scrollbar on the right).
   */
  .mbsc-popup:has(#ldx-more-filters) .mbsc-fr-c,
  .mbsc-popup:has(#ldx-more-filters) .mbsc-fr-w {
    overflow: hidden !important;
  }

  /*
   * SINGLE-SCROLL STRATEGY (mobile):
   * - Mobiscroll popup wrapper owns vertical scrolling
   * - #ldx-more-filters and nested wrappers are non-scrolling
   */
  #ldx-more-filters {
    overflow: visible !important;
    max-height: none !important;
  }

  #ldx-more-filters .ldx-filter-content,
  #ldx-more-filters .ldx-filter-content > div,
  #ldx-more-filters fieldset,
  #ldx-more-filters .ldx-amenities-fieldset {
    overflow-y: visible !important;
    overflow-x: visible !important;
    max-height: none !important;
  }

  #ldx-more-filters .ldx-filter-content {
    padding-right: 0 !important;
    scrollbar-gutter: auto;
  }

  #ldx-more-filters .ldx-am-srch-group > p,
  #ldx-more-filters .ldx-am-srch-group > p strong {
    margin-bottom: 0.15rem !important;
    font-size: 0.9rem;
    line-height: 1.25;
    font-weight: 600 !important;
  }

  #ldx-more-filters .ldx-am-srch-group .ldx-text-sm,
  #ldx-more-filters .ldx-am-srch-group label {
    font-size: 0.9rem;
    line-height: 1.25;
  }

  #ldx-more-filters .ldx-am-srch-group .ldx-h-6 {
    height: 1.25rem;
  }

  /* Villa Name mobile row: reduce input/button height to match compact filter cards. */
  #ldx-more-filters .name_id-tab .ldx_prop_text_search,
  #ldx-more-filters #ldx_search_mobile {
    height: 44px !important;
    min-height: 44px !important;
    font-size: 0.95rem !important;
  }

  #ldx-more-filters .name_id-tab .ldx-group-button .ldx-button,
  #ldx-more-filters .ldx-prop-text-search-group .ldx-group-button .ldx-button {
    height: 44px !important;
    min-height: 44px !important;
    width: 44px !important;
    padding: 0 !important;
  }

  /*
   * Keep Font Awesome glyphs visible inside the mobile popup where broad font-family overrides
   * can otherwise render icon squares.
   */
  .mbsc-popup:has(#ldx-more-filters) .fas,
  .mbsc-popup:has(#ldx-more-filters) .fa-solid,
  .mbsc-popup:has(#ldx-more-filters) [class^="fa-"],
  .mbsc-popup:has(#ldx-more-filters) [class*=" fa-"] {
    font-family: "Font Awesome 6 Free", "Font Awesome 5 Free" !important;
    font-weight: 900 !important;
  }
}
