/**
 * POS mobile v5 — Sales POS Products/Cart mode
 * Fixes pos-mobile-v2 forcing inline cart visible on phones.
 * Desktop (≥768px) untouched.
 */
@media (max-width: 767.98px) {
  :root {
    --bv-mobile-nav-h: 60px;
  }

  /* Products Mode: hide inline cart (v2 display:flex !important override) */
  .bv-sales-cart-panel:not(.mobile-cart-slide) {
    display: none !important;
  }

  /* Cart Mode: full mobile cart view */
  .bv-sales-cart-panel.mobile-cart-slide {
    display: flex !important;
    flex-direction: column !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    box-sizing: border-box !important;
    padding-bottom: calc(var(--bv-mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 8px) !important;
  }

  .bv-sales-cart-panel.mobile-cart-slide .bv-sales-cart-scroll {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    touch-action: pan-y;
  }

  /* View Cart FAB — above global bottom nav */
  .bv-sales-view-cart-fab {
    bottom: calc(var(--bv-mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 12px) !important;
    z-index: 35 !important;
  }

  /* Products Mode uses full height for product browsing */
  .bv-sales-pos-main .bv-sales-product-col:not(.hidden) {
    flex: 1 1 0 !important;
    min-height: 0 !important;
    max-height: 100% !important;
  }
}

@media (max-width: 767.98px) and (orientation: landscape) {
  .bv-sales-view-cart-fab {
    bottom: calc(var(--bv-mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 8px) !important;
  }
}
