/**
 *
 * Apple Pay
 *
 * @author Presta-Module.com <support@presta-module.com>
 * @copyright Presta-Module
 *
 *           ____     __  __
 *          |  _ \   |  \/  |
 *          | |_) |  | |\/| |
 *          |  __/   | |  | |
 *          |_|      |_|  |_|
 *
 ****/

.pm-apple-pay-container {
    text-align: center;
}
.pm-apple-pay-container.pm-apple-pay-product-page {
    text-align: left;
}
.pm-apple-pay-container.hidden {
    display: none;
}
.pm-apple-pay-container.pm-apple-pay-shopping-cart {
    text-align: right;
}

.pm-apple-pay-button {
    cursor: pointer;
    width: 150px;
    height: 50px;
}

/* CSS */
@supports (-webkit-appearance: -apple-pay-button) {
    .pm-apple-pay-button {
        display: inline-block;
        -webkit-appearance: -apple-pay-button !important;
        width: 100%;
        height: 50px;
    }
    .pm-apple-pay-button-black {
        -apple-pay-button-style: black;
    }
    .pm-apple-pay-button-white {
        -apple-pay-button-style: white-outline;
    }
    .pm-apple-pay-button-white-no-border {
        -apple-pay-button-style: white;
    }
    /* Buy with Buttons */
    .pm-apple-pay-button-with-text {
        -apple-pay-button-type: buy;
    }
    .pm-apple-pay-button-with-text > * {
        display: none;
    }
    .pm-apple-pay-button-black-buy-with {
        -apple-pay-button-style: black;
    }
    .pm-apple-pay-button-white-buy-with {
        -apple-pay-button-style: white-outline;
    }
    .pm-apple-pay-button-white-buy-with-no-border {
        -apple-pay-button-style: white;
    }
    /* Order page */
    .pm-apple-pay-container.pm-apple-pay-order .pm-apple-pay-button {
        -apple-pay-button-type: check-out !important;
    }
    /* Setup */
    .pm-apple-pay-button.pm-apple-pay-setup-button {
        -apple-pay-button-type: set-up !important;
    }
}

@supports not (-webkit-appearance: -apple-pay-button) {
    .pm-apple-pay-button {
        width: 150px;
        height: 50px;
        background-size: 60%;
        background-position: center;
        background-repeat: no-repeat;
        border: 0.5px solid transparent;
        margin-bottom: 10px;
        border-radius: 5px;
        cursor: pointer;
    }
    .pm-apple-pay-button-white,
    .pm-apple-pay-button-white-no-border,
    .pm-apple-pay-button-white-buy-with .logo,
    .pm-apple-pay-button-white-buy-with-no-border .logo
    {
        background-image: -webkit-named-image(apple-pay-logo-black);
    }
    .pm-apple-pay-button-black, .pm-apple-pay-button-black-buy-with .logo {
        background-image: -webkit-named-image(apple-pay-logo-white);
    }
    .pm-apple-pay-button-white,
    .pm-apple-pay-button-white-no-border,
    .pm-apple-pay-button-white-buy-with,
    .pm-apple-pay-button-white-buy-with-no-border
    {
        background-color: white;
        border-color: black;
    }
    .pm-apple-pay-button-white-no-border,
    .pm-apple-pay-button-white-buy-with-no-border
    {
        border-color: transparent;
    }
    .pm-apple-pay-button-black, .pm-apple-pay-button-black-buy-with {
        background-color: black;
        color: white;
    }
    /* Buy with Buttons */
    .pm-apple-pay-button-white-buy-with,
    .pm-apple-pay-button-white-buy-with-no-border,
    .pm-apple-pay-button-black-buy-with
    {
        cursor: pointer;
        --apple-pay-scale: 1.4; /* (height / 32) */
        display: inline-flex;
        justify-content: center;
        font-size: 12px;
        padding: 0px;
        box-sizing: border-box;
        min-width: 200px;
        min-height: 32px;
        max-height: 64px;
        width: 100%;
        height: 45px;
    }
    .pm-apple-pay-button-white-buy-with > .text,
    .pm-apple-pay-button-white-buy-with-no-border > .text,
    .pm-apple-pay-button-black-buy-with > .text
    {
        font-family: -apple-system;
        font-size: calc(1em * var(--apple-pay-scale));
        font-weight: 300;
        align-self: center;
        margin-right: calc(2px * var(--apple-pay-scale));
    }
    .pm-apple-pay-button-white-buy-with > .logo,
    .pm-apple-pay-button-white-buy-with-no-border > .logo,
    .pm-apple-pay-button-black-buy-with > .logo
    {
        width: calc(35px * var(--apple-pay-scale));
        height: 100%;
        background-size: 100% 60%;
        background-repeat: no-repeat;
        background-position: 0 50%;
        margin-left: calc(2px * var(--apple-pay-scale));
        border: none;
    }
}

/* Order page */
.pm-apple-pay-container.pm-apple-pay-order .pm-apple-pay-button-white-buy-with,
.pm-apple-pay-container.pm-apple-pay-order .pm-apple-pay-button-white-buy-with-no-border,
.pm-apple-pay-container.pm-apple-pay-order .pm-apple-pay-button-black-buy-with
{
    --apple-pay-scale: 1.875; /* (height / 32) */
    height: 60px;
}
.pm-apple-pay-container.pm-apple-pay-order .pm-apple-pay-button {
    width: 100%;
    height: 60px;
}

/* Specific styles for grid mode into product list */
.grid .pm-apple-pay-product-list, .grid .pm-apple-pay-product-list div {
    float: none !important;
    width: 100% !important;
}

/* Specific style for product-list - PS 1.7 */
.product-miniature .product-description .pm-apple-pay-product-list {
    margin-top: -94px;
}
.product-miniature .product-description .pm-apple-pay-product-list button {
    width: 100%;
}
/* Specific style for shopping cart - PS 1.7 */
.page-cart .pm-apple-pay-container.pm-apple-pay-shopping-cart {
    text-align: center;
    margin-top: 20px;
    border-top: 1px solid #cccccc;
    padding-top: 22px;
}
.page-cart .pm-apple-pay-container.pm-apple-pay-shopping-cart .pm-apple-pay-invite-text {
    margin-bottom: 10px;
}
.page-cart .pm-apple-pay-container.pm-apple-pay-shopping-cart button {
    width: 250px;
}

/* Product page */
.pm-apple-pay-container.pm-apple-pay-product-page {
    border-top: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    padding-top: 22px;
    padding-bottom: 22px;
}
/* Product page - Quickview */
.pm-apple-pay-container.pm-apple-pay-product-page.pm-apple-pay-product-page-quickview {
    border-top: unset;
    padding-top: unset;
    text-align: center
}
.pm-apple-pay-container.pm-apple-pay-product-page .pm-apple-pay-invite-text {
    margin-bottom: 10px;
}

/* Advanced EU Compliance */
#pm-apple-pay-eu-container a.payment_module_adv {
    padding-left: 0;
    padding-right: 0;
}