/**
 * Override CSS du module PayPal - custom Carefitness
 * Charge automatiquement a la place de modules/paypal/views/css/paypal_fo.css
 * Resiste aux mises a jour du module
 */

/* Fiche produit - Express Checkout pleine largeur (override style inline du tpl) */
[data-container-express-checkout][data-paypal-source-page="product"] {
    float: none !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 10px 0 !important;
    padding: 0 2% 0 0 !important;
    box-sizing: border-box !important;
    overflow: hidden;
}

[data-container-express-checkout][data-paypal-source-page="product"] [paypal-button-container] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
}

[data-container-express-checkout][data-paypal-source-page="product"] [paypal-button-container] > div,
[data-container-express-checkout][data-paypal-source-page="product"] .paypal-buttons {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
}

[data-container-express-checkout][data-paypal-source-page="product"] iframe {
    max-width: 100% !important;
}

/* Page panier - Express Checkout meme largeur que le bouton Commander (220px), aligne a gauche en dessous */
body .cart-detailed-actions [data-container-express-checkout][data-paypal-source-page="cart"],
.cart-grid-body [data-container-express-checkout][data-paypal-source-page="cart"],
[data-container-express-checkout][data-paypal-source-page="cart"] {
    display: block !important;
    width: 220px !important;
    max-width: 100% !important;
    margin: 10px 0 !important;
    padding: 0 !important;
    box-sizing: border-box !important;
    float: none !important;
    overflow: hidden;
}

body [data-container-express-checkout][data-paypal-source-page="cart"] [paypal-button-container] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
    box-sizing: border-box !important;
}

body [data-container-express-checkout][data-paypal-source-page="cart"] [paypal-button-container] > div,
body [data-container-express-checkout][data-paypal-source-page="cart"] .paypal-buttons {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    display: block !important;
}

body [data-container-express-checkout][data-paypal-source-page="cart"] iframe {
    max-width: 100% !important;
}

/* Page paiement - logo PayPal aligne a droite du texte sur la meme ligne (option PayPal et 4X PayPal) */
body .payment-options .payment-option:has([paypal-mark-container]),
body .payment-options .payment-option.paypal-inline {
    display: flex !important;
    align-items: center !important;
    flex-wrap: nowrap !important;
}

body .payment-options .payment-option:has([paypal-mark-container]) > .custom-radio,
body .payment-options .payment-option.paypal-inline > .custom-radio {
    float: none !important;
    flex: 0 0 auto !important;
}

body .payment-options .payment-option:has([paypal-mark-container]) > label,
body .payment-options .payment-option.paypal-inline > label {
    flex: 0 0 auto !important;
    width: auto !important;
    margin: 0 5px 0 0 !important;
    display: inline-block !important;
}

body .payment-options .payment-option:has([paypal-mark-container]) [data-paypal-info],
body .payment-options .payment-option.paypal-inline [data-paypal-info] {
    flex: 0 0 auto !important;
    display: inline-block !important;
    vertical-align: middle;
    padding: 0 5px !important;
}

body .payment-options .payment-option:has([paypal-mark-container]) [paypal-mark-container],
body .payment-options .payment-option.paypal-inline [paypal-mark-container] {
    flex: 0 0 auto !important;
    display: inline-block !important;
}

body .payment-options .payment-option:has([paypal-mark-container]) [paypal-mark-container] .paypal-mark,
body .payment-options .payment-option.paypal-inline [paypal-mark-container] .paypal-mark {
    margin: 0 0 0 4px !important;
}
