<style>
    [class*='paypal-button-container-'] { width: 100% }

    @media screen and (min-width: 1200px) {
        [class*='paypal-button-container-'] { max-width: 750px }

    }
    @media screen and (max-width: 1199px) {
        [class*='paypal-button-container-fix'] { height:15px; }
    }

    #coe_ajax_cart_slide_content .paypal-button-container-fix { margin-top: 15px }

    .paypal-button-container-product .paypal-button-container-fix { height:10px; }
</style>


<div style="" class="pull-right paypal-button-container-{$data_pp_placement}">
    <div class="paypal-button-container-fix"> </div>
    <div id="paypal_button_container_{$requested_position}" class="paypal_button_container"></div>
     {if $data_pp_amount lt 5000}
        <div data-pp-message data-pp-placement="{$data_pp_placement}" data-pp-amount="{$data_pp_amount}" data-pp-style-text-align="center"></div>
    {/if}
</div>

<div class="clearfix"></div>

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

<script>
console.log('adding event listener PayPalSdkLoaded');
document.addEventListener('PayPalSdkLoaded', function ()
{
    try {
        console.log("paypal-checkout-cart-and-product: position:{$requested_position}");
        renderAllEligibleButtonsCart("{$requested_position}");
    }
    catch(e)
    {
        console.log(e);
    }
});
</script>

<div class="ppcp-modal hidden" id="ppc_wait_overlay" tabindex="-1" role="dialog" aria-labelledby="ppc_wait_overlay" aria-hidden="true">
    <div class="ppcp-modal-dialog">
        <div class="ppcp-modal-content">
            <div class="ppcp-modal-body" id="ppc_wait_overlay_body">
                <div style="text-align: center; margin-bottom:10px">
                    <img class="img-responsive" src="media/logo/{$smarty.const._STORE_LOGO}" alt="{$smarty.const._STORE_NAME}" style="display: unset;"/>
                </div>
                <div id="ppc_wait_overlay_step2" style="text-align: center; font-size:1.1em; padding:15px 0">
                    <i class="fa fa-refresh fa-2x" style="-webkit-animation:spin_ppcp_spinner 1.2s linear infinite;  -moz-animation:spin_ppcp_spinner 1.2s linear infinite;  animation:spin_ppcp_spinner 1.2s linear infinite;" ></i>
                </div>
            </div>
        </div>
    </div>
</div>
