/* Size the outer payment containers while preserving Google-managed branding. */
.googlepay-minicart-logo,
#braintree-google-checkout-btn {
    width: 100%;
    max-width: 360px;
    clear: both;
}

.htfh-googlepay-button {
    display: block;
    width: 100%;
    height: 40px;
    min-width: 160px;
    box-sizing: border-box;
}

.braintree-googlepay-shortcut {
    position: static;
}

#payment-method-braintree-googlepay .actions-toolbar,
#payment-method-braintree-googlepay .actions-toolbar > .primary {
    width: 100%;
    float: none;
}

#payment-method-braintree-googlepay .actions-toolbar {
    margin-top: 16px;
}

/* One footer controls all mini basket outer padding and gaps. */
.block-minicart {
    padding-bottom: 0;
}

.block-minicart .minicart-payment-actions {
    position: static;
    width: 100%;
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 10.5px;
    box-sizing: border-box;
}

.block-minicart .minicart-payment-actions > .viewcart.button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 10px 12px;
    line-height: 20px;
    box-sizing: border-box;
}

.block-minicart .minicart-express-buttons,
.block-minicart .minicart-express-payments .googlepay-minicart-logo,
.block-minicart .minicart-express-payments .minicart {
    position: static;
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    z-index: auto;
}

.block-minicart .minicart-express-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.block-minicart .minicart-express-payments .minicart::before,
.block-minicart .minicart-express-payments .minicart::after,
.block-minicart .minicart-express-payments .googlepay-minicart-logo::before,
.block-minicart .minicart-express-payments .googlepay-minicart-logo::after {
    content: none;
    display: none;
}

.block-minicart .minicart-express-divider,
.checkout-cart-index .basket-express-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    margin: 0;
    padding: 0;
    color: #666;
    height: 0;
    min-height: 0;
    font-size: 13px;
    line-height: 16px;
    text-align: center;
    overflow: visible;
}

.minicart-express-divider::before,
.minicart-express-divider::after,
.basket-express-divider::before,
.basket-express-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e5e5e5;
}

/* Keep wallet wrappers bounded by the same action column as ordinary buttons. */
.checkout-cart-index .checkout-methods-items {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    padding-top: 24px;
}

.checkout-cart-index .checkout-methods-items .basket-actions-column {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 320px;
    max-width: 100%;
    margin: 0;
    float: none;
    box-sizing: border-box;
}

.checkout-cart-index .basket-action,
.checkout-cart-index .basket-action .googlepay-minicart-logo,
.checkout-cart-index .basket-action .htfh-googlepay-button {
    width: 100%;
    max-width: 100%;
    margin: 0;
    float: none;
    box-sizing: border-box;
}

.checkout-cart-index .basket-shortcut-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkout-cart-index .checkout-methods-items .basket-action > .button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    padding: 10px 20px;
    margin: 0;
    float: none;
    line-height: 20px;
    text-align: center;
    box-sizing: border-box;
}

.checkout-cart-index .basket-action .gpay-button {
    width: 100%;
    height: 40px;
    min-height: 40px;
    box-sizing: border-box;
}

/* PayPal supplies its own shortcut "or"; the shared footer already renders one. */
.minicart-payment-actions .paypal.checkout::before,
.minicart-payment-actions .paypal.checkout::after,
.basket-shortcut-actions .paypal.checkout::before,
.basket-shortcut-actions .paypal.checkout::after {
    content: none;
    display: none;
}

.minicart-payment-actions .paypal.checkout,
.basket-shortcut-actions .paypal.checkout {
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Wallet shortcuts are ordinary footer rows, not mini basket dropdowns. */
.minicart-payment-actions .braintree-paypal-logo,
.basket-shortcut-actions .braintree-paypal-logo,
.minicart-payment-actions .action-braintree-paypal-logo,
.basket-shortcut-actions .action-braintree-paypal-logo {
    position: static;
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    box-sizing: border-box;
}

.minicart-payment-actions .braintree-paypal-logo[hidden],
.basket-shortcut-actions .braintree-paypal-logo[hidden] {
    display: none !important;
}

/* Equal gaps around the divider and between each rendered button. */
.block-minicart .minicart-express-buttons,
.checkout-cart-index .basket-shortcut-actions {
    row-gap: 12px;
}

.block-minicart #mini-cart {
    margin-bottom: 0;
}

/* Native Express stays usable while its optional SDK button is loading. */
.minicart-payment-actions .native-paypal-express-shortcut,
.basket-shortcut-actions .native-paypal-express-shortcut {
    display: block;
    width: 100%;
    margin: 0;
    padding: 0;
}

.native-paypal-express-fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 40px;
    margin: 0;
    padding: 10px 12px;
    border: 0;
    border-radius: 4px;
    background: #ffc439;
    box-sizing: border-box;
}

.native-paypal-express-fallback img {
    display: block;
    width: 80px;
    height: 20px;
    margin: 0;
    pointer-events: none;
}

.native-paypal-express-fallback[hidden] {
    display: none;
}

.native-paypal-smart-buttons {
    width: 100%;
    height: 0;
    overflow: hidden;
}

.native-paypal-smart-buttons.is-ready {
    height: auto;
    min-height: 40px;
    overflow: visible;
}

/* Unsupported/failed Apple Pay must not create an empty flex row or dropdown. */
.minicart-payment-actions .braintree-applepay-minicart,
.basket-shortcut-actions .braintree-applepay-minicart {
    position: static;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

.braintree-applepay-minicart[hidden],
.minicart-payment-actions .braintree-applepay-minicart:not(:has(.braintree-apple-pay-button)),
.basket-shortcut-actions .braintree-applepay-minicart:not(:has(.braintree-apple-pay-button)) {
    display: none !important;
}

.braintree-applepay-minicart::before,
.braintree-applepay-minicart::after {
    content: none;
    display: none;
}

.braintree-apple-pay-button {
    -webkit-appearance: -apple-pay-button;
    -apple-pay-button-type: pay;
    -apple-pay-button-style: black;
    display: block;
    width: 100%;
    height: 40px;
    min-height: 40px;
    margin: 0;
    padding: 0;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;
}

/* The footer owns spacing; remove the item list's additional bottom margin. */
.block-minicart .minicart-items-wrapper {
    margin-bottom: 0;
}

/* SDK inline buttons otherwise leave a baseline gap below their 40px height. */
.googlepay-minicart-logo {
    line-height: 0;
}

.native-paypal-smart-buttons.is-ready {
    height: 40px;
    min-height: 40px;
}
