/* JBA v16.20.74 — mobile filter popup launcher + desktop action containment */

/* Desktop: action buttons must own a normal row and never cover the next sidebar box. */
@media (min-width:992px){
  body.jba-v1670-shop-page #jba-adv-sidebar-filter .jba-v162072-filter__body{
    padding-bottom:14px!important;
  }
  body.jba-v1670-shop-page #jba-adv-sidebar-filter .jba-v162072-filter-form{
    padding-bottom:0!important;
  }
  body.jba-v1670-shop-page #jba-adv-sidebar-filter .jba-v162072-actions{
    position:static!important;
    inset:auto!important;
    z-index:auto!important;
    width:100%!important;
    margin:12px 0 0!important;
    padding:14px 0 0!important;
    border-top:1px solid #e5ebf1!important;
    background:#fff!important;
    box-shadow:none!important;
  }
  body.jba-v1670-shop-page .jba-v162072-popular{
    position:relative!important;
    z-index:1!important;
    clear:both!important;
    margin-top:16px!important;
  }
}

/* The legacy floating mobile filter button remains as an invisible runtime hook only. */
@media (max-width:767px){
  #jbaV15266FilterTrigger,
  .jba-v15266-filter-trigger{
    display:none!important;
    visibility:hidden!important;
    opacity:0!important;
    pointer-events:none!important;
  }

  /* Hide the source sidebar on the page; it becomes visible only inside the popup sheet. */
  #jba-adv-sidebar-filter.jba-v162074-mobile-source:not(.jba-v15266-sheet-sidebar){
    display:none!important;
  }

  .jba-v162074-mobile-filter-launcher{
    direction:rtl!important;
    display:grid!important;
    grid-template-columns:48px minmax(0,1fr) auto!important;
    align-items:center!important;
    gap:12px!important;
    width:calc(100% - 12px)!important;
    min-height:78px!important;
    margin:10px 6px 14px!important;
    padding:12px 14px!important;
    border:1px solid #dce6ef!important;
    border-radius:18px!important;
    background:linear-gradient(135deg,#fff,#f5f9fc)!important;
    color:#082f49!important;
    box-shadow:0 10px 28px rgba(8,47,73,.08)!important;
    text-align:right!important;
    cursor:pointer!important;
    -webkit-tap-highlight-color:transparent!important;
    touch-action:manipulation!important;
  }

  .jba-v162074-mobile-filter-launcher:active{
    transform:scale(.988)!important;
  }

  .jba-v162074-mobile-filter-launcher__icon{
    display:grid!important;
    place-items:center!important;
    width:48px!important;
    height:48px!important;
    border-radius:15px!important;
    background:linear-gradient(135deg,#082f49,#14527d)!important;
    color:#fff!important;
  }

  .jba-v162074-mobile-filter-launcher__icon svg{
    display:block!important;
    width:23px!important;
    height:23px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:2!important;
    stroke-linecap:round!important;
  }

  .jba-v162074-mobile-filter-launcher__copy{
    display:flex!important;
    flex-direction:column!important;
    align-items:flex-start!important;
    gap:3px!important;
    min-width:0!important;
  }

  .jba-v162074-mobile-filter-launcher__copy strong{
    color:#082f49!important;
    font-size:15px!important;
    font-weight:900!important;
    line-height:1.55!important;
  }

  .jba-v162074-mobile-filter-launcher__copy small{
    color:#718096!important;
    font-size:10px!important;
    line-height:1.7!important;
  }

  .jba-v162074-mobile-filter-launcher__count{
    display:grid!important;
    place-items:center!important;
    min-width:30px!important;
    height:30px!important;
    padding:0 7px!important;
    border-radius:999px!important;
    background:#e7aa35!important;
    color:#082f49!important;
    font-size:10px!important;
    font-weight:900!important;
  }

  .jba-v162074-mobile-filter-launcher__count:empty{
    display:none!important;
  }

  /* Fast, clean popup panel without expensive blur effects. */
  .jba-v15266-filter-sheet{
    contain:layout paint!important;
  }

  .jba-v15266-sheet-backdrop{
    background:rgba(4,17,42,.42)!important;
    transition:opacity .12s linear!important;
  }

  .jba-v15266-sheet-panel{
    height:min(92vh,820px)!important;
    border-radius:22px 22px 0 0!important;
    transform:translateY(102%)!important;
    transition:transform .15s ease-out!important;
    will-change:transform!important;
    box-shadow:0 -12px 38px rgba(4,17,42,.22)!important;
  }

  .jba-v15266-sheet-content{
    padding:0 8px 12px!important;
    overscroll-behavior:contain!important;
    scroll-behavior:auto!important;
  }

  .jba-v15266-sheet-sidebar{
    contain:layout style!important;
  }

  .jba-v15266-sheet-sidebar #jba-adv-sidebar-filter.jba-v162072-filter{
    display:block!important;
    margin:8px 0 0!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
  }

  .jba-v15266-sheet-sidebar #jba-adv-sidebar-filter .jba-v162072-filter__head{
    display:none!important;
  }

  .jba-v15266-sheet-sidebar #jba-adv-sidebar-filter .jba-v162072-filter__body{
    padding:8px 4px 0!important;
    border-radius:0!important;
  }

  .jba-v15266-sheet-sidebar .jba-v162072-filter-form{
    padding-bottom:82px!important;
  }

  .jba-v15266-sheet-sidebar .jba-v162072-actions{
    position:sticky!important;
    right:0!important;
    left:0!important;
    bottom:-1px!important;
    z-index:30!important;
    width:100%!important;
    margin:10px 0 0!important;
    padding:10px 4px calc(5px + env(safe-area-inset-bottom,0px))!important;
    border-top:1px solid #dfe7ef!important;
    background:#fff!important;
    box-shadow:0 -8px 20px rgba(8,47,73,.09)!important;
  }

  .jba-v15266-sheet-sidebar .jba-v162072-actions button{
    min-height:50px!important;
    border-radius:14px!important;
    font-size:11px!important;
  }
}

@media (max-width:380px){
  .jba-v162074-mobile-filter-launcher{
    grid-template-columns:42px minmax(0,1fr) auto!important;
    min-height:70px!important;
    padding:10px 11px!important;
    gap:9px!important;
  }
  .jba-v162074-mobile-filter-launcher__icon{
    width:42px!important;
    height:42px!important;
    border-radius:13px!important;
  }
  .jba-v162074-mobile-filter-launcher__copy strong{font-size:13px!important}
  .jba-v162074-mobile-filter-launcher__copy small{font-size:9px!important}
}

@media (prefers-reduced-motion:reduce){
  .jba-v15266-sheet-panel,
  .jba-v15266-sheet-backdrop,
  .jba-v162074-mobile-filter-launcher{transition:none!important}
}
