/* Listnova 1.0.0-rc2-design10.34
 * Mobile search results are rendered by Listnova itself. Elementor remains the
 * desktop composition layer only; the map/results grid never owns mobile width.
 */
.ln-search-native-mobile{display:none}

@media (max-width:820px){
  /* The complete Elementor results+map composition leaves the mobile flow. */
  html body .ln-m6-search-grid,
  html body .ln-d5-results-grid,
  html body .ln-native-mobile-source-layout,
  html body .ln-native-mobile-source-map,
  html body .ln-native-mobile-map-wrapper,
  html body .ln-m6-search-map,
  html body .ln-search-builder-map-col,
  html body .elementor-widget-listnova-search-map{
    display:none!important;
  }

  /* Older List/Map states from previous releases can no longer influence flow. */
  html body .is-mobile-map-view,
  html body .is-mobile-list-view,
  html body .is-map-only{
    --ln-native-mobile-legacy-state:0;
  }
  html body .ln-search-x__view-switch,
  html body [data-ln-view="map"],
  html body [data-ln-view="list"]{
    display:none!important;
  }

  /* Keep the heading/search part of the Elementor section, but remove the old
     empty space formerly reserved for its two-column grid. */
  html body .ln-native-mobile-source-section{
    padding-bottom:0!important;
    margin-bottom:0!important;
    min-height:0!important;
  }

  /* Native results escape every Elementor width/flex-basis while remaining in
     normal page flow at the exact position of the search results section. */
  html body .ln-search-native-mobile{
    display:block!important;
    position:relative!important;
    z-index:1!important;
    box-sizing:border-box!important;
    width:100vw!important;
    max-width:100vw!important;
    min-width:100vw!important;
    margin:0 calc(50% - 50vw)!important;
    padding:18px clamp(14px,4vw,22px) 52px!important;
    overflow:visible!important;
    background:transparent!important;
  }

  html body .ln-search-native-mobile .ln-search-x__results-head{
    display:flex!important;
    position:static!important;
    top:auto!important;
    right:auto!important;
    bottom:auto!important;
    left:auto!important;
    z-index:auto!important;
    width:100%!important;
    align-items:flex-end!important;
    justify-content:space-between!important;
    gap:14px!important;
    margin:0 0 18px!important;
    padding:0!important;
    background:transparent!important;
    box-shadow:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  html body .ln-search-native-mobile .ln-search-x__results-summary{min-width:0!important}
  html body .ln-search-native-mobile .ln-search-x__results-summary span{display:block!important}
  html body .ln-search-native-mobile .ln-search-x__results-actions{
    display:flex!important;
    flex:0 0 auto!important;
    align-items:flex-end!important;
    gap:10px!important;
  }
  html body .ln-search-native-mobile .ln-search-x__results-sort{
    display:grid!important;
    gap:4px!important;
    min-width:118px!important;
  }
  html body .ln-search-native-mobile .ln-search-x__results-sort select{
    max-width:145px!important;
    min-height:40px!important;
  }

  html body .ln-search-native-mobile .ln-search-x__result-tools{
    width:100%!important;
    margin:0 0 16px!important;
  }
  html body .ln-search-native-mobile .ln-search-x__result-chips{
    display:flex!important;
    width:100%!important;
    gap:8px!important;
    overflow-x:auto!important;
    overscroll-behavior-inline:contain!important;
    scrollbar-width:none!important;
    padding-bottom:2px!important;
  }
  html body .ln-search-native-mobile .ln-search-x__result-chips::-webkit-scrollbar{display:none!important}
  html body .ln-search-native-mobile .ln-search-x__result-chips a{flex:0 0 auto!important}

  html body .ln-search-native-mobile .ln-search-x__cards,
  html body .ln-search-native-mobile .ln-results-grid{
    display:grid!important;
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    grid-template-columns:minmax(0,1fr)!important;
    gap:var(--ln-search-gap,18px)!important;
    margin:0!important;
    padding:0!important;
  }
  html body .ln-search-native-mobile .ln-search-result-card,
  html body .ln-search-native-mobile .ln-card,
  html body .ln-search-native-mobile .ln-native-card,
  html body .ln-search-native-mobile .ln-search-result-card>.elementor,
  html body .ln-search-native-mobile .ln-search-result-card>[data-elementor-type]{
    box-sizing:border-box!important;
    width:100%!important;
    max-width:100%!important;
    min-width:0!important;
    flex:0 0 100%!important;
  }
  html body .ln-search-native-mobile .ln-search-result-card{margin:0!important}

  html body .ln-search-native-mobile .ln-search-load-more-wrap,
  html body .ln-search-native-mobile .ln-pagination{
    width:100%!important;
    margin:24px 0 0!important;
  }
  html body .ln-search-native-mobile .ln-search-load-more{width:100%!important;min-height:48px!important}

  /* Mapbox Search is desktop-only. Listing-detail privacy maps use another
     component/script and are intentionally unaffected. */
  html body .ln-search-native-mobile [data-ln-mapbox-canvas],
  html body .ln-search-native-mobile [data-ln-map-target]{display:none!important}
}

@media (max-width:520px){
  html body .ln-search-native-mobile{padding-inline:14px!important}
  html body .ln-search-native-mobile .ln-search-x__results-head{align-items:center!important}
  html body .ln-search-native-mobile .ln-search-x__results-sort>span{display:none!important}
  html body .ln-search-native-mobile .ln-search-x__results-sort{min-width:112px!important}
  html body .ln-search-native-mobile .ln-search-x__results-sort select{width:150px!important;max-width:150px!important}
}
