/* JBA v16.20.286 — gold mobile filter launcher + low-paint drawer scrolling
 * UI-only patch. Keeps the existing drawer/filter engine and removes expensive
 * mobile paint/animation/nested-scroll work for a more immediate interaction. */
@media (max-width:900px), (pointer:coarse){
  /* Instant drawer shell. */
  html body .jba-v15266-filter-sheet{
    position:fixed!important;
    inset:0!important;
    display:block!important;
    visibility:hidden!important;
    pointer-events:none!important;
    z-index:1000150!important;
    contain:layout style!important;
  }
  html body .jba-v15266-filter-sheet.is-open{
    visibility:visible!important;
    pointer-events:auto!important;
  }
  html body .jba-v15266-filter-sheet .jba-v15266-sheet-backdrop{
    position:absolute!important;
    inset:0!important;
    display:block!important;
    background:rgba(0,18,70,.34)!important;
    opacity:0!important;
    transition:none!important;
    animation:none!important;
    filter:none!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    will-change:auto!important;
  }
  html body .jba-v15266-filter-sheet.is-open .jba-v15266-sheet-backdrop{opacity:1!important}

  html body .jba-v15266-filter-sheet .jba-v15266-sheet-panel{
    position:absolute!important;
    top:0!important;
    right:0!important;
    bottom:0!important;
    left:auto!important;
    width:min(88vw,390px)!important;
    max-width:390px!important;
    height:100dvh!important;
    max-height:100dvh!important;
    padding:0 0 env(safe-area-inset-bottom,0px)!important;
    margin:0!important;
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    direction:rtl!important;
    background:#fff!important;
    border-radius:18px 0 0 18px!important;
    box-shadow:-8px 0 20px rgba(0,18,70,.12)!important;
    transform:translate3d(102%,0,0)!important;
    transition:none!important;
    animation:none!important;
    filter:none!important;
    will-change:auto!important;
    backface-visibility:hidden!important;
    -webkit-backface-visibility:hidden!important;
    contain:layout paint style!important;
  }
  html body .jba-v15266-filter-sheet.is-open .jba-v15266-sheet-panel{transform:translate3d(0,0,0)!important}
  html body .jba-v15266-sheet-handle{display:none!important}

  html body .jba-v15266-sheet-panel header{
    flex:0 0 auto!important;
    min-height:60px!important;
    margin:0!important;
    padding:10px 13px!important;
    background:#fff!important;
    border-bottom:1px solid #e3eaf5!important;
    box-shadow:none!important;
  }
  html body .jba-v15266-sheet-panel header strong{font-size:15px!important}

  /* One scroll owner only. Nested scrolling was a major source of mobile jank. */
  html body .jba-v15266-sheet-content{
    flex:1 1 auto!important;
    min-height:0!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    padding:0 9px 16px!important;
    overscroll-behavior:contain!important;
    scroll-behavior:auto!important;
    -webkit-overflow-scrolling:touch!important;
    touch-action:pan-y!important;
    scrollbar-width:none!important;
    contain:layout paint style!important;
  }
  html body .jba-v15266-sheet-content::-webkit-scrollbar{width:0!important;height:0!important;display:none!important}

  html body .jba-v15266-sheet-content > #jba-adv-sidebar-filter.jba-v15266-sheet-sidebar{
    margin:7px 0 10px!important;
    border:0!important;
    border-radius:12px!important;
    box-shadow:none!important;
    contain:layout style!important;
  }
  html body .jba-v15266-sheet-content > #jba-adv-sidebar-filter.jba-v15266-sheet-sidebar > .jba-adv-sidebar-body,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162072-filter__body{
    padding:7px!important;
    border:0!important;
    border-radius:12px!important;
    box-shadow:none!important;
    background:#fff!important;
  }

  /* Disable lazy content re-layout while the user is flick-scrolling. */
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter details.jba-v162072-group,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162079-stone-group{
    content-visibility:visible!important;
    contain-intrinsic-size:none!important;
    contain:layout style!important;
  }

  /* Flat surfaces + no transitions lower repaint/compositing cost. */
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter *,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter *::before,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter *::after{
    animation:none!important;
    transition:none!important;
  }
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162072-group,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162079-stone-group,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162072-group.is-active,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162072-group:has(input:checked:not([value="4"]):not([value="new"])){
    box-shadow:none!important;
  }
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162072-group > summary,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162079-stone-toggle{
    background:#fafbfd!important;
  }
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162072-option,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162077-stone-option{
    box-shadow:none!important;
  }

  /* Remove nested option scroll areas: the drawer itself owns vertical scroll. */
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162072-options--scroll,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162073-detail-group .jba-v162072-options--scroll,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162077-stone-options,
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162079-stone-group.is-open .jba-v162077-stone-options{
    max-height:none!important;
    overflow:visible!important;
    overscroll-behavior:auto!important;
  }

  /* Sticky action bars repaint on every scroll frame; keep actions in normal flow. */
  html body .jba-v15266-sheet-content #jba-adv-sidebar-filter .jba-v162072-actions{
    position:static!important;
    inset:auto!important;
    z-index:auto!important;
    margin:9px 0 2px!important;
    padding:9px 0 calc(5px + env(safe-area-inset-bottom,0px))!important;
    background:#fff!important;
    box-shadow:none!important;
  }

  /* Gold filter launcher requested by owner — strong contrast on mobile. */
  html body .jba-v162074-mobile-filter-launcher{
    background:#e5aa35!important;
    background-image:none!important;
    color:#082f49!important;
    border:1px solid #c98d20!important;
    box-shadow:0 4px 12px rgba(8,47,73,.10)!important;
    transition:none!important;
    animation:none!important;
    filter:none!important;
    -webkit-tap-highlight-color:transparent!important;
    touch-action:manipulation!important;
  }
  html body .jba-v162074-mobile-filter-launcher:active{
    transform:none!important;
    background:#dda12f!important;
  }
  html body .jba-v162074-mobile-filter-launcher__copy strong,
  html body .jba-v162074-mobile-filter-launcher__copy small{
    color:#082f49!important;
    text-shadow:none!important;
  }
  html body .jba-v162074-mobile-filter-launcher__copy strong{font-weight:950!important}
  html body .jba-v162074-mobile-filter-launcher__copy small{opacity:.78!important}
  html body .jba-v162074-mobile-filter-launcher__icon{
    background:#082f49!important;
    background-image:none!important;
    color:#e5aa35!important;
    box-shadow:none!important;
  }
  html body .jba-v162074-mobile-filter-launcher__count{
    background:#082f49!important;
    color:#fff!important;
    box-shadow:none!important;
  }

  html body .jba-v15266-filter-trigger{
    transition:none!important;
    animation:none!important;
    -webkit-tap-highlight-color:transparent!important;
    touch-action:manipulation!important;
  }
}

@media (prefers-reduced-motion:reduce){
  html body .jba-v15266-filter-sheet *,
  html body .jba-v162074-mobile-filter-launcher{transition:none!important;animation:none!important}
}
