/* BankMovie V49 — surgical low-end mobile compositor pass.
   Dedicated search route is performance-exempt so its UI animations remain intact. Strong devices (.bm-nav-dynamic) keep the original floating/glass behavior. Static dock colors follow the active user theme. */
@media (max-width:991px){
  /* Stable device class is assigned once before body paint. */
  html.bm-nav-static body{
    padding-bottom:calc(76px + env(safe-area-inset-bottom,0px))!important;
  }

  /* 1) Weak/mid phones: real bottom dock, NOT a floating pill and NOT smart-hide. */
  html.bm-nav-static body .bottom-nav,
  html.bm-nav-static body .actor-bottom-nav,
  html.bm-nav-static body [data-mobile-bottom-nav]{
    position:fixed!important;
    left:0!important;
    right:0!important;
    top:auto!important;
    bottom:0!important;
    transform:none!important;
    width:100%!important;
    max-width:none!important;
    min-height:68px!important;
    height:calc(68px + env(safe-area-inset-bottom,0px))!important;
    margin:0!important;
    padding:7px 10px calc(7px + env(safe-area-inset-bottom,0px))!important;
    border-radius:18px 18px 0 0!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    filter:none!important;
    -webkit-filter:none!important;
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    transition:none!important;
    animation:none!important;
    will-change:auto!important;
    background:
      linear-gradient(180deg,rgba(var(--accent-rgb,47,124,255),.20),rgba(var(--accent-rgb,47,124,255),.065)),
      linear-gradient(180deg,rgba(25,27,34,.99),rgba(11,13,19,.997))!important;
    border:0!important;
    border-top:1px solid rgba(var(--accent-rgb,47,124,255),.42)!important;
    box-shadow:0 -8px 22px rgba(0,0,0,.24),inset 0 1px 0 rgba(var(--accent-rgb,47,124,255),.18)!important;
  }
  html.bm-nav-static body .bottom-nav.nav-hidden,
  html.bm-nav-static body .bottom-nav.nav-compact,
  html.bm-nav-static body .actor-bottom-nav.nav-hidden,
  html.bm-nav-static body .actor-bottom-nav.nav-compact,
  html.bm-nav-static body [data-mobile-bottom-nav].nav-hidden,
  html.bm-nav-static body [data-mobile-bottom-nav].nav-compact{
    left:0!important;
    right:0!important;
    bottom:0!important;
    transform:none!important;
    width:100%!important;
    max-width:none!important;
    height:calc(68px + env(safe-area-inset-bottom,0px))!important;
    min-height:68px!important;
    border-radius:18px 18px 0 0!important;
    opacity:1!important;
    visibility:visible!important;
    pointer-events:auto!important;
    filter:none!important;
  }
  html.bm-nav-static body .bottom-nav::before,
  html.bm-nav-static body .bottom-nav::after,
  html.bm-nav-static body .actor-bottom-nav::before,
  html.bm-nav-static body .actor-bottom-nav::after,
  html.bm-nav-static body [data-mobile-bottom-nav]::before,
  html.bm-nav-static body [data-mobile-bottom-nav]::after{
    display:none!important;
    content:none!important;
  }
  html.bm-nav-static body .bottom-nav > .nav-item,
  html.bm-nav-static body .actor-bottom-nav > .nav-item,
  html.bm-nav-static body [data-mobile-bottom-nav] > .nav-item{
    transform:none!important;
    transition:none!important;
    animation:none!important;
    filter:none!important;
    -webkit-filter:none!important;
    will-change:auto!important;
    box-shadow:none!important;
  }
  html.bm-nav-static body .bottom-nav > .nav-item.active,
  html.bm-nav-static body .actor-bottom-nav > .nav-item.active,
  html.bm-nav-static body [data-mobile-bottom-nav] > .nav-item.active{
    color:var(--accent,#2f7cff)!important;
    background:rgba(var(--accent-rgb,47,124,255),.13)!important;
    box-shadow:inset 0 1px 0 rgba(var(--accent-rgb,47,124,255),.32),0 2px 7px rgba(0,0,0,.10)!important;
  }

  /* 2) Kill live backdrop sampling on repeated card overlays. These elements move with the page,
        so backdrop-filter forces repaints during every scroll on weaker GPUs. */
  html.bm-perf-lite body .watchlist-icon-grid,
  html.bm-perf-lite body .imdb-card-badge,
  html.bm-perf-lite body .year-badge,
  html.bm-perf-lite body .genre-chip,
  html.bm-perf-lite body .country-chip,
  html.bm-perf-lite body .quick-action,
  html.bm-perf-lite body .bm-ad-badge,
  html.bm-perf-lite body .imdb-rating-badge{
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    filter:none!important;
    will-change:auto!important;
  }
  html.bm-perf-lite body .watchlist-icon-grid{background:rgba(8,9,13,.88)!important}
  html.bm-perf-lite body .imdb-card-badge,
  html.bm-perf-lite body .year-badge,
  html.bm-perf-lite body .imdb-rating-badge{background:rgba(8,9,13,.90)!important}
  html.bm-perf-lite body .quick-action{background:rgba(12,13,18,.92)!important}

  /* 3) Large sticky/glass surfaces are expensive compositor layers. Keep geometry, remove live blur. */
  html.bm-perf-lite body #siteHeader,
  html.bm-perf-lite body .header,
  html.bm-perf-lite body .mobile-header,
  html.bm-perf-lite body .bm-cinematic-tabs,
  html.bm-perf-lite body .bm-app-mini-card{
    -webkit-backdrop-filter:none!important;
    backdrop-filter:none!important;
    filter:none!important;
    will-change:auto!important;
  }
  html.bm-perf-lite body.bm-movie-template-cinematic .bm-cinematic-tabs{
    background:rgba(7,8,12,.97)!important;
    box-shadow:0 7px 16px rgba(0,0,0,.20)!important;
  }

  /* 4) The huge blurred backdrop behind movie detail is a full-width repaint hotspot. */
  html.bm-perf-lite body.bm-design2-safe .movie-detail::before,
  html.bm-perf-lite body.bm-movie-template-cinematic .movie-detail::before{
    filter:none!important;
    -webkit-filter:none!important;
    opacity:.18!important;
  }

  /* 5) Touch phones don't need desktop hover recomposition or continuous decorative glow. */
  @media (hover:none){
    html.bm-perf-lite body .movie-card,
    html.bm-perf-lite body .scroll-card,
    html.bm-perf-lite body .grid-item,
    html.bm-perf-lite body .collection-card,
    html.bm-perf-lite body .related-card,
    html.bm-perf-lite body .content-card,
    html.bm-perf-lite body .archive-card,
    html.bm-perf-lite body .result-card{
      will-change:auto!important;
    }
    html.bm-perf-lite body .movie-card:hover,
    html.bm-perf-lite body .scroll-card:hover,
    html.bm-perf-lite body .grid-item:hover,
    html.bm-perf-lite body .collection-card:hover,
    html.bm-perf-lite body .related-card:hover,
    html.bm-perf-lite body .content-card:hover,
    html.bm-perf-lite body .archive-card:hover,
    html.bm-perf-lite body .result-card:hover{
      transform:none!important;
      filter:none!important;
      -webkit-filter:none!important;
      box-shadow:inherit!important;
    }
  }
  html.bm-perf-lite body .bm-promo-banner::before,
  html.bm-perf-lite body .hero-glow,
  html.bm-perf-lite body .bm-ad-glow,
  html.bm-perf-lite body .bm-header-search-glow{
    animation:none!important;
    filter:none!important;
    -webkit-filter:none!important;
    will-change:auto!important;
  }

  html.bm-perf-lite{scroll-behavior:auto!important}
}
