/* 1. Reset the Label: Stop it from taking up the whole line and floating */
ul.payment_methods li.payment_method_fastspring_card label {
    padding-bottom: 0;
    padding-right: 0;
    padding-top: 0;
}

/* 2. The Container: Space it out from the text */
.fs-card-inline-icons-container {
    display: inline-block;
    float: right;
}

li.payment_method_fastspring_card .fs-card-inline-icons-container img.fs-inline-icon{
    display: inline;
    float: none;
    height: 26px;
    max-height: 26px;
    max-width: 43px;
    width: 43px;
}


/* 4. Remove any existing clearfixes that might be pushing the row down */
ul.payment_methods label[for="payment_method_fastspring_card"]::after {
    display: none !important;
}

/* 5. Clean up other FS icons (PayPal, etc.) */
img.fastspring-icon {
    vertical-align: middle;
    display: inline-block;
    float: right;
}

/* 6. Remove any legacy clear-fixes that might push content down */
ul.payment_methods label[for="payment_method_fastspring_card"]::after {
    display: none !important;
}

.woocommerce-checkout #payment ul.payment_methods li img.fastspring-icon {
    max-width: 50px !important;
    padding-left: 3px;
    margin: 0;
}
/* ── Embedded checkout: base layout ─────────────────────────────── */
.fssg-express-embedded {
    margin: 0;
    padding-top: 16px !important;
    padding-bottom: 16px !important;
}

/* ── Express-only mode (googlepay / applepay only) ────────────────
   Compact clip: only the express button is visible with a tight gap.
   The full SBL content is clipped away by height + clip-path. */
.fssg-express-embedded[data-express-only="1"] {
    margin-top: -137px !important;
}
.fssg-express-embedded[data-express-only="1"].fssg-express-product {
    margin-top: -201px !important;
    padding-top: 15px !important;
    padding-bottom: 15px !important;
}
.fssg-express-embedded[data-express-only="1"] #fsc-embedded-checkout-container {
    width: 100% !important;
    height: 330px !important;
    max-height: 330px !important;
    overflow: hidden !important;
    clip-path: inset(116px 0 0 0) !important;
    min-height: 0;
}
.fssg-express-embedded[data-express-only="1"].fssg-express-product #fsc-embedded-checkout-container {
    position: relative;
    top: -102px;
}
.fssg-express-embedded[data-express-only="1"].fssg-express-embedded-blockcart #fsc-embedded-checkout-container {
    height: 165px !important;
    max-height: 165px !important;
}
.fssg-express-embedded[data-express-only="1"].fssg-express-applepay #fsc-embedded-checkout-container {
    height: 380px !important;
    max-height: 380px !important;
}

/* ── Full checkout mode (non-express methods enabled) ──────────────
   Trimmed band: hide header (Total/TEST/country) and footer,
   reveal only GPay button + OR divider + payment method tiles. */
.fssg-express-embedded[data-express-only="0"] {
    margin-top: -112px !important;
    padding-bottom: 15px !important;
}
.fssg-express-embedded[data-express-only="0"].fssg-express-product {
    margin-top: -112px !important;
    padding-bottom: 15px !important;
}
.fssg-express-embedded[data-express-only="0"] #fsc-embedded-checkout-container {
    width: 100% !important;
    min-height: 0 !important;
    overflow: hidden !important;
    clip-path: inset(80px 0 0 0) !important;
    -webkit-clip-path: inset(80px 0 0 0) !important;
}


/* ── Shared: loading / ready fade ────────────────────────────────── */
.fssg-express-embedded:not(.fssg-express-ready) #fsc-embedded-checkout-container {
    opacity: 0 !important;
}
.fssg-express-embedded.fssg-express-loading {
    opacity: 0.6;
    pointer-events: none;
}
.woocommerce-cart .fssg-express-embedded {
    padding-bottom: 15px;
}
/* Product page: keep theme payment-icon blocks small (Pay securely with ...) */
.payments_icons img {
    max-width: 45px;
    width: auto;
    height: auto;
}
.payments_icons img.fastspring-icon {
    float: none;
    display: inline-block;
    vertical-align: middle;
    margin-right: 5px;
}

/* ── Cart page: hide Proceed to Checkout when embedded is active ──── */
/* When embedded checkout is present, users pay directly on the cart page */
.woocommerce-cart .fssg-express-embedded ~ .wc-proceed-to-checkout,
.woocommerce-cart .fssg-express-embedded ~ .cart-collaterals .wc-proceed-to-checkout,
.woocommerce-cart .fssg-express-embedded ~ [data-block-name="woocommerce/proceed-to-checkout-block"],
.woocommerce-cart .fssg-express-embedded ~ .wp-block-woocommerce-proceed-to-checkout-block,
/* Fallback: if embedded is inside a wrapper, hide proceed via JS-added class */
.woocommerce-cart.fssg-cart-embedded-active .wc-proceed-to-checkout,
.woocommerce-cart.fssg-cart-embedded-active [data-block-name="woocommerce/proceed-to-checkout-block"],
.woocommerce-cart.fssg-cart-embedded-active .wp-block-woocommerce-proceed-to-checkout-block,
.woocommerce-cart.fssg-cart-embedded-active .wc-block-cart__submit-container,
.woocommerce-cart.fssg-cart-embedded-active .woocommerce-cart-form__coupon {
    display: none !important;
}

