/* =========================================================
   99-hotfix.css — SURGICAL / TEMPORARY OVERRIDES ONLY
   =========================================================
   Rules here should be short-lived. Once a fix is proven,
   graduate it to the correct module:

     Base/global    → 10-base.css
     Header / nav   → 20-header-mega.css
     PLP / archive  → 30-plp.css  or  35-shop.css
     Minicart       → 40-erg-minicart.css
     PDP            → 40-pdp.css  or  50-erg-pdp-layout.css
     Cart/checkout  → 70-cart-checkout.css
     Page-specific  → 60-site-pages.css

   GRADUATED:
   - Global backdrop (html/body + body::before)  → 10-base.css
   - Transfers page (.page-id-1206 / .erg-xfer-*)  → 60-site-pages.css
   - Ammo Club (.erg-ac*)                           → 60-site-pages.css
   ========================================================= */

/* ---- JetSearch dropdown: cap height + enable internal scroll --------
   The results area is position:absolute inside the sticky header.
   Without max-height it grows off-screen; without overflow-y there is
   no way to reach the clipped results. calc(100vh - 110px) leaves
   room for the header so the dropdown never extends past the viewport.
   -webkit-overflow-scrolling: touch for smooth momentum on iOS.
   ----------------------------------------------------------------------- */
.jet-ajax-search__results-area {
  max-height: calc(100vh - 110px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}


/* ---- OtterText chat widget: move above cart/ATC buttons on mobile ----
   The widget injects at bottom: 30px right: 30px with z-index max-int.
   On phones this covers the ATC button, cart totals, and checkout CTA.
   Bump it higher on small screens so thumbs can still reach page actions.
   ----------------------------------------------------------------------- */
@media (max-width: 767px){
  #chatToggle,
  .chat-button{
    bottom: 80px !important;   /* clear ATC / sticky cart bars       */
    right:  12px !important;   /* tighter to edge on small screens   */
    transform: scale(.9);      /* slightly smaller to save space     */
    transform-origin: bottom right;
  }
}

@media (min-width: 768px) and (max-width: 1024px){
  #chatToggle,
  .chat-button{
    bottom: 24px !important;
    right:  18px !important;
  }
}
