<style>
    @media screen and (min-width: 300px) and (max-width: 439px) {
        .paypal_button_container {
            width: 240px;
        }
    }
    @media screen and (min-width: 440px) {
        .paypal_button_container {
            width: 235px;
        }
    }
    @media screen and (min-width: 767px) {
        .paypal_button_container {
            width: 300px;
        }
    }
    @media screen and (min-width: 1000px) {
        .paypal_button_container {
            width: 400px;
        }
    }
    @media screen and (min-width: 1200px) {
        .paypal_button_container {
            width: 600px;
        }
    }

    apple-pay-button {
        --apple-pay-button-width: 100%;
        --apple-pay-button-height: 36px;
        #--apple-pay-button-border-radius: 5px;
        #--apple-pay-button-padding: 5px 0px;
    }

    form#checkout_form .xt-form-required.xt-form-error::before,
    form#checkout-form .xt-form-required.xt-form-error::before
    {
        content: "*";
        color: darkred;
        margin-left: -10px;
        font-size: 1.2em;
        display: inline-block;
        line-height: 1px;
    }



</style>

{*include file="./paypal-checkout-script-tag.tpl.html"*}

<script>

document.addEventListener('DOMContentLoaded', function ()
{
    try {
        try {
            ppcFix_button_changed_html(ppc_button_selector + '_{$requested_position}');
        }
        catch(e){
            console.log('ppcFix_button_changed_html failed', e);
        }
        ppcRemoveSubmitButton();
    }
    catch(e)
    {
        console.log(e);
    }
});
document.addEventListener('PayPalSdkLoaded', function ()
{
    try {
        if('{$foundingSource}' === 'applepay') setupApplepay();
        if('{$foundingSource}' === 'googlepay') setupGooglepay();
        else enablePaypalButton('{$foundingSource}','{$requested_position}');
    }
    catch(e)
    {
        console.log(e);
    }
});

const google_transaction_info = {$google_transaction_info};
</script>

{include file="./paypal-checkout-wait-modal.tpl.html"}