/* Bottom sheets / modals above the logged-in phone tab bar (--dash-tab-h, z-index 1400). */
@media (max-width: 767px) {
  html[data-dashboard-chrome].blk-dash-sheet-open nav.dash-tabs,
  html[data-dashboard-chrome].blk-dash-sheet-open .blk-bottom-nav {
    visibility: hidden !important;
    pointer-events: none !important;
  }

  html[data-dashboard-chrome] .blk-dashboard-sheet {
    z-index: 1500 !important;
  }

  html[data-dashboard-chrome] .blk-dashboard-sheet .blk-sheet-scroll,
  html[data-dashboard-chrome] .blk-dashboard-sheet [data-blk-sheet-scroll] {
    max-height: min(78vh, calc(100dvh - env(safe-area-inset-top, 0px) - 72px));
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: calc(var(--dash-tab-h, 68px) + env(safe-area-inset-bottom, 0px) + 12px) !important;
    scroll-padding-bottom: calc(var(--dash-tab-h, 68px) + env(safe-area-inset-bottom, 0px) + 12px);
  }

  html[data-dashboard-chrome] [data-shop-cart-bar] {
    bottom: calc(var(--dash-tab-h, 68px) + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 1395;
  }

  html[data-dashboard-chrome] .blk-dashboard-sheet .blk-dashboard-dialog-panel {
    max-height: min(
      80vh,
      calc(100dvh - env(safe-area-inset-top, 0px) - var(--dash-tab-h, 68px) - env(safe-area-inset-bottom, 0px) - 20px)
    );
  }

  html[data-dashboard-chrome].blk-dash-sheet-open .blk-dashboard-sheet .blk-dashboard-dialog-panel {
    max-height: min(85vh, calc(100dvh - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px) - 16px));
  }

  html[data-dashboard-chrome] .blk-dashboard-sheet .blk-dashboard-dialog-panel .blk-dialog-header {
    padding-top: 10px;
    padding-bottom: 10px;
  }
}