/* Cart-only payment hierarchy: classic checkout first, then fast wallets. */
.cart-detailed-actions + .storefrontcheckout-cart-payment-stack {
  margin-top: 0.65rem;
}

.storefrontcheckout-cart-payment-stack {
  display: grid;
  gap: 0.65rem;
}

.storefrontcheckout-cart-wallets {
  order: 1;
}

.storefrontcheckout-cart-paypal {
  order: 2;
}

/* The two PayPal CTA hosts are independent widgets. Keep the information
   message below them at full width. */
.storefrontcheckout-cart-paypal > .storefrontcheckout-paypal-button-host--pair,
.storefrontcheckout-cart-paypal > .paypal-buttons,
.storefrontcheckout-cart-paypal > [data-funding-source] {
  display: inline-block;
  width: calc(50% - 0.3rem) !important;
  vertical-align: top;
}

.storefrontcheckout-cart-paypal > .storefrontcheckout-paypal-button-host--pair + .storefrontcheckout-paypal-button-host--pair,
.storefrontcheckout-cart-paypal > .paypal-buttons + .paypal-buttons,
.storefrontcheckout-cart-paypal > [data-funding-source] + [data-funding-source] {
  margin-left: 0.6rem;
}

@media (max-width: 420px) {
  .storefrontcheckout-cart-paypal > .storefrontcheckout-paypal-button-host--pair,
  .storefrontcheckout-cart-paypal > .paypal-buttons,
  .storefrontcheckout-cart-paypal > [data-funding-source] {
    width: 100% !important;
  }

  .storefrontcheckout-cart-paypal > .storefrontcheckout-paypal-button-host--pair + .storefrontcheckout-paypal-button-host--pair,
  .storefrontcheckout-cart-paypal > .paypal-buttons + .paypal-buttons,
  .storefrontcheckout-cart-paypal > [data-funding-source] + [data-funding-source] {
    margin: 0.5rem 0 0;
  }
}
