// Variables
@danger-color:        #e90e0e;
@stripe-element-border: 1px solid #e6e6e6;
@stripe-element-border-radius: 5px;

/* Sidebar at checkout */
.opc-block-summary {
    &.subscription-update {
        a.cancel {
            color: @danger-color;
            text-decoration: none;
            cursor: pointer;
        }
    }
}

/* OnePage Checkout payment section */
.opc-payment {
    .subscription-update.review {
        .payment-method-content {
            display: block;
            padding: 1em 0;
            div.plan {
                th {
                    font-weight: normal;
                }
                @media (min-width: 1200px) {
                    display: inline-block;
                    width: 45%;
                    margin-right: 4%;
                }
                margin-bottom: 1em;
            }
            @media (max-width: 770px) {
                padding: 1em;
            }
        }
    }

}

/* Payment Element */
.stripe-payments-elements.no-wrap {
    white-space: nowrap;
    margin-bottom: 10px;
}
.stripe-permanent-error {
    font-size: 1.5rem;
}

/* Currency Selector (WCS-flow / Adaptive Pricing) */
.stripe-currency-selector-wrapper {
    min-height: 0;
    margin-bottom: 22px;
}

/* Payment Element */
/* (shared with legacy flow - see .stripe-payments-elements above) */

/* My Subscriptions customer account section */
a.subscription-name {
    display: block;
}
.subscription-payment-method input {
    margin-right: 5px;
}
.subscription-payment-method {
    padding: 5px 0 0 5px;
}
.subscription-payment-method .exp, .details.stripe-payments .exp {
    color: #aaa;
}
.subscription-payment-method.add-new {
    padding: 10px;
    text-align: center;
}

.stripe-subscriptions {
    .section b {
        padding-bottom: 0.5em;
        display: inline-block;
    }
    .subscription-name {
        font-size: 1.1em;
    }
    div.billed {
        font-size: smaller;
        color: #999;
    }
    .canceled-subscriptions-header {
        border-top: 0
    }
}

body.stripe_payments-customer-subscriptions {

    .stripe-subscription-edit {
        margin-left: -5px; // Make some space for the controls focus blue stroke
        max-height: 30em;
        overflow: hidden;
        transition: max-height;
        transition-duration: 0.8s;
        vertical-align: top;
        display: inline-block;

        .section {
            padding: 5px; // Make some space for the controls focus blue stroke
        }
        span.label
        {
            margin-left: 5px;
        }
        &.payment-method {
            img.icon
            {
                position: relative;
                top: 10px;
                height: 32px;
            }
            span.exp
            {
                margin-left: 12px;
            }
            label
            {
                position: relative;
                top:  -2px;
                padding-left: 5px;
            }
        }
        .details {
            padding-bottom: 1.2em;
        }
        .action.edit {
            margin-left: 10px;
        }

        &.show {
            max-height: 30em;
        }
        .section {
            margin: 5px 0;
        }
        .mutable {
            display: none;
        }
        .actions {
            margin-top: 10px;
        }
        input {
            margin: 2px 0;
        }
    }

    /* Actions dropdown */
    @media only screen and (max-width: 639px) {
        .stripe-actions-dropdown {
            margin-top: 1em;
            .action.toggle {
                display: none;
            }
        }
    }
    @media only screen and (min-width: 640px) {
        .stripe-actions-dropdown {
            ul {
                display: none;
                position: absolute;
                border: 1px solid #ccc;
                border-radius: 5px;
                background: white;
                padding: 12px 12px 6px 12px;
                list-style: none;
                margin-top: 5px;
                box-shadow: 0 3px 3px #ccc;
                width: 170px;
                margin-left: -148px;

                li {
                    &.cancel {
                        border-top: 1px solid #ccc;
                        padding-top: 10px;

                        a.delete, button.delete {
                            color: red;
                        }
                    }
                }

                &:before {
                    // border: 6px solid;
                    z-index: 99;
                    right: 18px;
                    top: -6px;
                    border-bottom-style: solid;
                    content: '';
                    display: block;
                    height: 0;
                    position: absolute;
                    width: 0;

                    border-left: 6px solid transparent;
                    border-right: 6px solid transparent;
                    border-bottom: 6px solid #ccc;
                }
            }
            &.active {
                ul {
                    display: block;
                }

                span.toggle {
                    cursor: pointer;
                    border: 1px solid #ccc;
                    border-radius: 5px;
                    padding: 9px 15px 4px 15px;
                }
            }
            span.toggle {
                padding: 10px 16px 5px 16px;
                display: inline-block;
                &:hover {
                    cursor: pointer;
                    border: 1px solid #ccc;
                    border-radius: 5px;
                    padding: 9px 15px 4px 15px;
                }
            }
        }
    }

    .stripe-actions-dropdown {
        a, .stripe-link {
            text-decoration: none;
        }
    }
}

/* My Payment Methods section */
body.stripe_payments-customer-paymentmethods .stripe-payments.delete-method {
    padding-left: 20px;
    background-image: url('data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjAiIGhlaWdodD0iMjAiIHZpZXdCb3g9IjAgMCAyMCAyMCIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj48dGl0bGU+ZGVsZXRlLS1saW5rPC90aXRsZT48cGF0aCBkPSJNMTEuODY2IDkuOTk5bDIuNzQzLTIuNzQ0YTEuMzIyIDEuMzIyIDAgMCAwIC4wMDItMS44NjggMS4zMTggMS4zMTggMCAwIDAtMS44NjguMDAyTDEwIDguMTMzIDcuMjUyIDUuMzg0YTEuMzIzIDEuMzIzIDAgMCAwLTEuODYzLjAwMyAxLjMxNCAxLjMxNCAwIDAgMC0uMDAzIDEuODYzTDguMTM0IDEwbC0yLjc0MyAyLjc0M2ExLjMyMiAxLjMyMiAwIDAgMC0uMDAyIDEuODY4IDEuMzE4IDEuMzE4IDAgMCAwIDEuODY4LS4wMDJMMTAgMTEuODY0bDIuNzQ4IDIuNzQ5YTEuMzIzIDEuMzIzIDAgMCAwIDEuODYzLS4wMDNjLjUyLS41MTkuNTE3LTEuMzUuMDAzLTEuODYzbC0yLjc0OC0yLjc0OHoiIGZpbGw9IiMwMDk5RTUiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvc3ZnPg==');
    background-repeat: no-repeat;
}
body.stripe_payments-customer-paymentmethods .saved-payment-methods img.saved-payment-method-icon {
    position: relative;
    top: 8px;
}
body.stripe_payments-customer-paymentmethods .saved-payment-methods td {
    line-height: 28px;
}
body.stripe_payments-customer-paymentmethods .saved-payment-methods td.saved-payment-method-name {
    padding:  0 10px 10px 10px;
}
body.stripe_payments-customer-paymentmethods .saved-payment-methods td.saved-payment-method-name label {
    margin-left: 10px;
}
body.stripe_payments-customer-paymentmethods .saved-payment-methods {
    margin-bottom: 3em;
}
body.stripe_payments-customer-paymentmethods .actions-toolbar {
    margin-top: 1.5em;
}
body.stripe_payments-customer-subscriptions td.col.order {
    width: 120px;
}
/* Card Icons */
.stripe-payments span.type.Visa,
.stripe-payments span.type.visa { background: url(../img/cards/visa.svg) no-repeat; }

.stripe-payments span.type.American.Express,
.stripe-payments span.type.amex { background: url(../img/cards/amex.svg) no-repeat; }

.stripe-payments span.type.MasterCard,
.stripe-payments span.type.mastercard { background: url(../img/cards/mastercard.svg) no-repeat; }

.stripe-payments span.type.Discover,
.stripe-payments span.type.discover { background: url(../img/cards/discover.svg) no-repeat; }

.stripe-payments span.type.Diners,
.stripe-payments span.type.diners { background: url(../img/cards/diners.svg) no-repeat; }

.stripe-payments span.type.JCB,
.stripe-payments span.type.jcb { background: url(../img/cards/jcb.svg) no-repeat; }

.stripe-payments span.type.Cartes.Bancaires,
.stripe-payments span.type.cartes_bancaires { background: url(../img/svg/cartes_bancaires.svg) no-repeat; }

.stripe-payments span.type.Visa, .stripe-payments span.type.visa,
.stripe-payments span.type.American.Express, .stripe-payments span.type.amex,
.stripe-payments span.type.MasterCard, .stripe-payments span.type.mastercard,
.stripe-payments span.type.Discover, .stripe-payments span.type.discover,
.stripe-payments span.type.Diners, .stripe-payments span.type.diners,
.stripe-payments span.type.JCB, .stripe-payments span.type.jcb,
.stripe-payments span.type.Cartes.Bancaires, .stripe-payments span.type.cartes_bancaires {
    padding-left: 40px;
    background-position-y: -3px;
    display: inline-block;
    height: 22px;
    font-size: 16px;
    background-size: 30px;
}

.payment-method.stripe-payments .checkout-agreements-block {
    margin-top: 1em;
    margin-bottom: 1em;
}
.payment-method.stripe-payments.mobile {
    padding: 1rem 0;
    display: block;
}
@media only screen and (max-width: 767px) {
    .checkout-payment-method .step-title.mobile {
        padding-left: 0;
    }
}

/* MSI Installments */
.stripe-element-border {
    border: 1px solid #e6e6e6;
    border-radius: 5px;
}
.stripe-element-font {
    font-family: 'Open Sans','Helvetica Neue',Helvetica,Arial,sans-serif;
    font-size: 16px;
}
.stripe-element-font .instructions span {
    padding-left: 3px;
}

.stripe-checkout-icon-container {
    padding: 1em 0;
}
.stripe-checkout-icon-container .stripe-icon {
    height: 2em;
    margin-right: 0.25em;
}

/* Trialing Subscriptions */
.trialing_shipping .mark,
.trialing_tax .mark,
.trialing_discount .mark {
    text-indent: 0.5em;
}
.trialing_shipping .mark::before,
.trialing_tax .mark::before,
.trialing_discount .mark::before {
    content: "- ";
}

button.stripe-link {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    font-weight: normal;
}


.modal-popup.installments-modal {
    .modal-header {
        .action-close {
            display: none;
        }
        .modal-title {
            border: none;
        }
    }
    .modal-inner-wrap {
        max-width: 400px;
        width: 90%
    }
    .installment-options {
        display: flex;
        flex-direction: column;
        margin: 0 0 20px 0;
        border: @stripe-element-border;
        border-radius: @stripe-element-border-radius;
        .installment-option {
            display: flex;
            align-items: center;
            padding: 12px 16px;
            cursor: pointer;
            border-bottom: @stripe-element-border;
            opacity: 0.8;
            &.selected {
                opacity: 1;
            }
            &:last-child {
                border-bottom: none;
            }
            input[type="radio"] {
                margin-right: 12px;
                transform: scale(1.2);
                &:focus {
                    box-shadow: none;
                }
            }
            .option-label {
                display: flex;
                flex-direction: column;
                .option-main {
                    font-weight: bold;
                    font-size: 0.8em;
                    color: #222;
                }
                .option-sub {
                    font-size: 0.6em;
                    color: #666;
                    margin-top: 2px;
                }
            }
        }
    }
}

.modal-popup.subscriptions-new-payment-modal {
    .modal-header {
        .modal-title {
            border: none;
        }
    }
    .modal-inner-wrap {
        max-width: 540px;
        width: 90%
    }
}