/* Checkout payment option: show the PayPal logo above the option text.
   The classic theme renders <span>text</span><img> inside the label, so flip
   the visual order with flex column + order. :has() keeps it scoped to the
   label that contains this module's logo only. The body#checkout prefix
   out-specifies the theme's "body#checkout section.checkout-step
   .payment-options label { display: table-cell }" rule. */
body#checkout .payment-options .payment-option label:has(img[src*="/paypalgateway/"]) {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
}

.payment-option label img[src*="/paypalgateway/"] {
    order: -1;
    width: 175px;
    height: 55px;
    object-fit: contain;
}

/* Checkout payment option description (intro.tpl): align its left edge with
   the option title text and tighten the vertical rhythm. The theme default is
   "body#checkout .additional-information { margin-left: 2.875rem; margin-top: 1.25rem }"
   (46px/20px), which indents the description past the title and adds a large
   gap. 26px puts it exactly under the label text; :has() scopes it to this
   module's description wrapper only. */
body#checkout .payment-options .additional-information:has(.paypalgateway-additional-information) {
    margin-left: 26px;
    margin-top: 0.25rem;
}

.paypalgateway-additional-information .paypalgateway-description {
    margin: 0 0 0.375rem;
}

/* Handling fee line injected in the checkout cart summary (right column),
   styled like the native .cart-summary-line rows it sits between. */
#cart-subtotal-paypalgateway-fee .value {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
