/*
 * Copyright Magmodules.eu. All rights reserved.
 * See COPYING.txt for license details.
 */

& when (@media-common = true) {

    // ---- Saved-card radio list ------------------------------------------ //

    .mollie-saved-cards {
        margin-bottom: @indent__s;

        .mollie-saved-cards__heading {
            font-size: 1.4rem;
            font-weight: @font-weight__semibold;
            margin-bottom: @indent__xs;
            color: @color-gray34;
        }

        .field.choice {
            margin-bottom: @indent__xs;

            .label {
                display: inline-flex;
                align-items: center;
                gap: 8px;
            }
        }

        .mollie-card-logo {
            vertical-align: middle;
            border-radius: 3px;
        }
    }

    // ---- "Save your card" checkbox row ------------------------------------ //

    .mollie-save-card {
        margin-top: @indent__s;
        padding-top: @indent__s;
        border-top: 1px solid @color-gray80;
    }

    // ---- Consent notice block --------------------------------------------- //

    .mollie-save-card-consent {
        margin-top: @indent__xs;
        padding: @indent__s @indent__base;
        background-color: @color-gray95;
        border-left: 3px solid @color-gray60;
        border-radius: 0 3px 3px 0;

        .mollie-save-card-consent__text {
            font-size: 1.2rem;
            line-height: 1.6;
            color: @color-gray34;
            margin-bottom: @indent__s;
        }

        .field.choice {
            margin-bottom: 0;

            .label {
                font-size: 1.2rem;
                font-weight: @font-weight__semibold;
            }
        }
    }
}

.apple-pay-button {
  display: inline-block;
  cursor: pointer;
  -webkit-appearance: -apple-pay-button;
  &:extend(.abs-button-l all);
  box-sizing: border-box;
  font-size: 0 !important;

  > * {
    visibility: hidden;
  }
}

.media-width(@extremum, @break) when (@extremum = 'min') and (@break = @screen__m) {
  .mollie-product-page-apple-pay-button {
      margin-bottom: 0;
      margin-right: 1%;
      width: 49%;
  }
}

& when (@media-common = true) {
  .apple-pay-button {
    &:extend(.abs-button-responsive all);
  }
}

@supports (-webkit-appearance: -apple-pay-button) {
    .apple-pay-button-with-text {
        display: inline-block;
        cursor: pointer;
        -webkit-appearance: -apple-pay-button;
        -apple-pay-button-type: buy;
    }
    .apple-pay-button-with-text > * {
        visibility: hidden;
    }
    .apple-pay-button-black-with-text {
        -apple-pay-button-style: black;
    }
    .apple-pay-button-white-with-text {
        -apple-pay-button-style: white;
        cursor: pointer;
    }
    .apple-pay-button-white-with-line-with-text {
        -apple-pay-button-style: white-outline;
    }

    .apple-pay-button-color-black { -apple-pay-button-style: black; }
    .apple-pay-button-color-white { -apple-pay-button-style: white; }
    .apple-pay-button-color-white-outline { -apple-pay-button-style: white-outline; }
    .apple-pay-button-text-buy { -apple-pay-button-type: buy; }
    .apple-pay-button-text-donate { -apple-pay-button-type: donate; }
    .apple-pay-button-text-plain { -apple-pay-button-type: plain; }
    .apple-pay-button-text-book { -apple-pay-button-type: book; }
    .apple-pay-button-text-check-out { -apple-pay-button-type: check-out; }
    .apple-pay-button-text-subscribe { -apple-pay-button-type: subscribe; }
    .apple-pay-button-text-add-money { -apple-pay-button-type: add-money; }
    .apple-pay-button-text-contribute { -apple-pay-button-type: contribute; }
    .apple-pay-button-text-order { -apple-pay-button-type: order; }
    .apple-pay-button-text-reload { -apple-pay-button-type: reload; }
    .apple-pay-button-text-rent { -apple-pay-button-type: rent; }
    .apple-pay-button-text-support { -apple-pay-button-type: support; }
    .apple-pay-button-text-tip { -apple-pay-button-type: tip; }
    .apple-pay-button-text-top-up { -apple-pay-button-type: top-up; }

    .mollie-applepay-minicart-button {
        width: 100%;
        height: 52px;
        margin-top: 5px;
    }
}

@supports not (-webkit-appearance: -apple-pay-button) {
    .apple-pay-button-with-text {
        display: inline-flex;
        justify-content: center;
        font-size: 12px;
        border-radius: 5px;
        padding: 0px;
        box-sizing: border-box;
        min-width: 200px;
        min-height: 32px;
        max-height: 64px;
    }
    .apple-pay-button-black-with-text {
        background-color: black;
        color: white;
    }
    .apple-pay-button-white-with-text {
        background-color: white;
        color: black;
    }
    .apple-pay-button-white-with-line-with-text {
        background-color: white;
        color: black;
        border: .5px solid black;
    }
    .apple-pay-button-with-text.apple-pay-button-black-with-text > .logo {
        background-image: -webkit-named-image(apple-pay-logo-white);
        background-color: black;
    }
    .apple-pay-button-with-text.apple-pay-button-white-with-text > .logo {
        background-image: -webkit-named-image(apple-pay-logo-black);
        background-color: white;
    }
    .apple-pay-button-with-text.apple-pay-button-white-with-line-with-text > .logo {
        background-image: -webkit-named-image(apple-pay-logo-black);
        background-color: white;
    }
    .apple-pay-button-with-text > .text {
        font-family: -apple-system;
        font-size: 1em;
        font-weight: 300;
        align-self: center;
        margin-right: 2px;
    }
    .apple-pay-button-with-text > .logo {
        width: 35px;
        height: 100%;
        background-size: 100% 60%;
        background-repeat: no-repeat;
        background-position: 0 50%;
        margin-left: 2px;
        border: none;
    }
}

.mollie-applepay-button-hidden {
    display: none;
}
