/*
 * One mobile action-bar system for Cart and Checkout.
 *
 * The page action remains different by funnel step, but dimensions, visual
 * hierarchy, Shipment summary, and the Change control share one contract.
 */
@media (max-width: 767px) {
    body.blotto-has-mobile-checkout-bar,
    body.woocommerce-checkout:not(.woocommerce-order-received).blotto-checkout-sticky-ready {
        padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)) !important;
    }

    body.blotto-commerce-ui :is(.blotto-mobile-checkout-bar, .blotto-checkout-sticky) {
        grid-template-columns: minmax(112px, .9fr) minmax(178px, 1.35fr) !important;
        gap: 12px !important;
        align-items: center !important;
        padding: 12px max(16px, env(safe-area-inset-right, 0px))
            calc(12px + env(safe-area-inset-bottom, 0px))
            max(16px, env(safe-area-inset-left, 0px)) !important;
        border-top: 1px solid #f3cad4 !important;
        background: rgba(255, 255, 255, .98) !important;
        box-shadow: 0 -10px 32px rgba(78, 28, 42, .13) !important;
        backdrop-filter: blur(12px);
    }

    body.blotto-commerce-ui
        :is(.blotto-mobile-checkout-summary, .blotto-checkout-sticky__summary) {
        min-width: 0;
    }

    body.blotto-commerce-ui .blotto-mobile-checkout-total {
        display: block !important;
        min-width: 0;
    }

    body.blotto-commerce-ui
        :is(.blotto-mobile-checkout-total small, .blotto-checkout-sticky__label) {
        display: block !important;
        margin: 0 0 2px !important;
        color: #76545e !important;
        font-size: 12px !important;
        font-weight: 400 !important;
        line-height: 1.25 !important;
    }

    body.blotto-commerce-ui
        :is(.blotto-mobile-checkout-total strong, .blotto-checkout-sticky__total) {
        display: block !important;
        overflow: hidden;
        color: #c92d5c !important;
        font-size: 21px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.blotto-commerce-ui
        :is(.blotto-mobile-checkout-shipping-row, .blotto-checkout-sticky__shipping-row) {
        display: flex !important;
        min-width: 0;
        align-items: center !important;
        gap: 7px !important;
    }

    body.blotto-commerce-ui
        :is(.blotto-mobile-checkout-shipping, .blotto-checkout-sticky__shipping) {
        display: inline-block !important;
        min-width: 0;
        margin: 4px 0 0 !important;
        overflow: hidden;
        color: #13783c !important;
        font-size: 12px !important;
        font-weight: 700 !important;
        line-height: 1.3 !important;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    body.blotto-commerce-ui .blotto-mobile-checkout-shipping[data-shipping-type="paid"] {
        color: #9f3f25 !important;
    }

    body.blotto-commerce-ui
        :is(.blotto-mobile-checkout-change-shipping, .blotto-checkout-sticky__change-shipping) {
        flex: 0 0 auto;
        margin: 3px 0 0 !important;
        padding: 4px 8px !important;
        border: 0 !important;
        border-radius: 8px !important;
        background: #fff0f4 !important;
        color: #9f3151 !important;
        font: inherit !important;
        font-size: 11px !important;
        font-weight: 800 !important;
        line-height: 1.2 !important;
        text-decoration: underline !important;
    }

    body.blotto-commerce-ui
        :is(.blotto-mobile-checkout-bar .checkout-button, .blotto-checkout-sticky__button) {
        width: 100% !important;
        min-width: 0;
        min-height: 54px !important;
        margin: 0 !important;
        padding: 11px 14px !important;
        border: 0 !important;
        border-radius: 999px !important;
        background: #ff5424 !important;
        box-shadow: 0 8px 18px rgba(255, 84, 36, .23) !important;
        color: #fff !important;
        font: inherit !important;
        font-size: 16px !important;
        font-weight: 800 !important;
        line-height: 1.25 !important;
        text-decoration: none !important;
    }
}

@media (max-width: 359px) {
    body.blotto-commerce-ui :is(.blotto-mobile-checkout-bar, .blotto-checkout-sticky) {
        grid-template-columns: minmax(100px, .82fr) minmax(166px, 1.35fr) !important;
        gap: 8px !important;
        padding-right: max(10px, env(safe-area-inset-right, 0px)) !important;
        padding-left: max(10px, env(safe-area-inset-left, 0px)) !important;
    }

    body.blotto-commerce-ui
        :is(.blotto-mobile-checkout-bar .checkout-button, .blotto-checkout-sticky__button) {
        padding-right: 10px !important;
        padding-left: 10px !important;
        font-size: 14px !important;
    }
}
