/* Match JetBlocks' toolbar offset without placing the footer below the viewport. */
:root body.admin-bar .elementor-location-header :is(.elementor-menu-cart__main, .jet-blocks-cart__list) {
  top: var(--wp-admin--admin-bar--height, 32px) !important;
  height: calc(100vh - var(--wp-admin--admin-bar--height, 32px)) !important;
  height: calc(100dvh - var(--wp-admin--admin-bar--height, 32px)) !important;
}

/* One bottom gutter, without the legacy footer margin added a second time. */
:root body .elementor-location-header :is(.elementor-menu-cart__main, .jet-blocks-cart__list) {
  --az-cart-bottom-gap: 24px;
  padding-bottom: calc(var(--az-cart-bottom-gap) + env(safe-area-inset-bottom, 0px)) !important;
}
:root body .elementor-location-header :is(.elementor-menu-cart__main, .jet-blocks-cart__list) .elementor-menu-cart__footer-buttons {
  margin-bottom: 0 !important;
}

/* Both native shells use the existing cart action vocabulary on phones. */
@media (max-width: 767px) {
  :root body .elementor-location-header :is(.elementor-menu-cart__main, .jet-blocks-cart__list) {
    --az-cart-action-type: 15px;
    --az-cart-action-leading: 1.4;
    --az-cart-action-min: 52px;
    --az-cart-action-gap: 8px;
    --az-cart-action-block: 12px;
    --az-cart-action-inline: 10px;
    --az-cart-bottom-gap: 20px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
  }
  :root body .elementor-location-header :is(.elementor-menu-cart__main, .jet-blocks-cart__list) .elementor-menu-cart__footer-buttons {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    align-items: stretch !important;
    gap: var(--az-cart-action-gap) !important;
  }
  :root body .elementor-location-header :is(.elementor-menu-cart__main, .jet-blocks-cart__list) .elementor-menu-cart__footer-buttons .elementor-button {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    align-self: stretch !important;
    box-sizing: border-box !important;
    width: 100% !important;
    min-width: 0 !important;
    height: 100% !important;
    min-height: var(--az-cart-action-min) !important;
    margin: 0 !important;
    padding: var(--az-cart-action-block) var(--az-cart-action-inline) !important;
    font-family: Poppins, sans-serif !important;
    font-size: var(--az-cart-action-type) !important;
    font-weight: 400 !important;
    line-height: var(--az-cart-action-leading) !important;
    white-space: normal !important;
    text-align: center !important;
  }
  :root body .elementor-location-header :is(.elementor-menu-cart__main, .jet-blocks-cart__list) .elementor-menu-cart__footer-buttons .elementor-button-text {
    font: inherit !important;
    white-space: normal !important;
    overflow-wrap: anywhere;
  }
}
