/*
 * Note: Do not use rem here, we do not control the pages base font size.
 */

iframe.pay-advantage-credit-card-capture {
    width: 100%;
    /*
    This is the height needed to perform payer authentication.
    The iframe will adjust itself to be smaller if it doesn't need the space.
     */
    height: 620px;
    border: none;
    max-width: 550px;
}

/* Selectors are very specific to override other styling that may be on the page. ie WordPress themes */
button.pay-advantage-credit-card-button:not(:hover),
button.pay-advantage-credit-card-button:not(:hover):not(:active),
button.pay-advantage-credit-card-button:hover {
    display: inline-block;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid #ced4da;
    padding: 6px 12px;
    font-size: 16px;
    line-height: 1.5;
    border-radius: 4px;

    color: #6c757d;
    background-color: #ffffff;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    text-decoration: none;
    text-transform: none;
}

/* Selectors are very specific to override other styling that may be on the page. ie WordPress themes */
button.pay-advantage-credit-card-button--primary:not(:hover),
button.pay-advantage-credit-card-button--primary:not(:hover):not(:active),
button.pay-advantage-credit-card-button--primary:hover {
    color: #ffffff;
    background-color: #dc3545;
    border-color: #dc3545;
}

button.pay-advantage-credit-card-button:hover {
    filter: brightness(0.85);
}

button.pay-advantage-credit-card-button:disabled {
    opacity: 0.65;
}

.pay-advantage-credit-card-capture-modal-overlay {
    position: fixed;
    display: none;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0,0,0,0.5);
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    text-decoration: none;
    text-transform: none;
}

.pay-advantage-credit-card-capture-modal {
    display: none;
    position: absolute;
    left: calc(50% - 250px);
    top: calc(50% - 250px);
    width: 500px;
    border: 1px solid #6c757d;
    border-radius: 4px;
    background-color: #FFFFFF;
    color: #6c757d;
    font-family: "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    text-decoration: none;
    text-transform: none;
}

@media only screen and (max-width: 576px) {
    .pay-advantage-credit-card-capture-modal {
        margin: 0 0 0 0;
        left: 0;
        top: 0;
        width: 100%;
        height: auto;
        border: none;
        border-radius: 0;
    }
}

.pay-advantage-credit-card-capture-modal__header {
    border-bottom: 1px solid #dee2e6;
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pay-advantage-credit-card-capture-modal__header__text {
    font-size: 18px;
    margin-left: 16px;
}

.pay-advantage-credit-card-capture-modal__header__close {
    margin-right: 8px;
    font-size: 36px;
    margin-top: -6px;
    cursor: pointer;
}

.pay-advantage-credit-card-capture-modal__footer {
    font-size: 16px;
    margin: 12px 16px 12px 0;
    display: flex;
    align-items: flex-end;
    flex-direction: column;
}

.pay-advantage-credit-card-capture-modal__buttons {
    font-size: 16px;
    display: flex;
    justify-content: space-between;
    margin-left: 16px;
    margin-right: 16px;
}

.pay-advantage-credit-card-capture-modal__buttons .pay-advantage-credit-card-button {
    width: 50%;
}

.pay-advantage-credit-card-capture-modal__buttons .pay-advantage-credit-card-button + .pay-advantage-credit-card-button {
    margin-left: 8px;
}

@media only screen and (max-width: 576px) {
    .pay-advantage-credit-card-capture-modal__buttons {
        flex-direction: column;
    }

    .pay-advantage-credit-card-capture-modal__buttons .pay-advantage-credit-card-button {
        display: block;
        width: 100%;
    }

    .pay-advantage-credit-card-capture-modal__buttons .pay-advantage-credit-card-button + .pay-advantage-credit-card-button {
        margin-left: 0;
        margin-top: 16px;
    }
}

.pay-advantage-credit-card-button--block {
    display: block;
    width: 100% !important;
    margin: 0 !important;
}


.pay-advantage-credit-card-capture-modal__content {
    margin: 16px 12px 0 12px;
}

.pay-advantage-credit-card-capture-modal__content__details {
    display: flex;
    justify-content: space-between;
    margin-left: 4px; /* To match the iframe. contents */
    margin-right: 4px; /* To match the iframe. contents */
    margin-bottom: 8px;
}

.pay-advantage-credit-card-capture-modal__content__details__description {
}

.pay-advantage-credit-card-capture-modal__content__details__amounts {
    text-align: right;
}

.pay-advantage-credit-card-capture-modal__content__details__amount {
}

.pay-advantage-credit-card-capture-modal__content__details__fees {
}

.pay-advantage-credit-card-capture-modal__content__approved,
.pay-advantage-credit-card-capture-modal__content__undetermined {
    display: none;
    flex-direction: column;
    align-items: center;
    margin-bottom: 16px;
}

.pay-advantage-credit-card-capture-modal__content__approved .pay-advantage-credit-card-capture-modal__content__receipt__header,
.pay-advantage-credit-card-capture-modal__content__undetermined .pay-advantage-credit-card-capture-modal__content__receipt__header {
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
}

.pay-advantage-credit-card-capture-modal__content__approved .pay-advantage-credit-card-capture-modal__content__receipt__icon {
    fill: #2bb85e;
    width: 48px;
    height: 48px;
    margin-right: 16px;
}

.pay-advantage-credit-card-capture-modal__content__undetermined .pay-advantage-credit-card-capture-modal__content__receipt__icon {
    width: 48px;
    height: 48px;
    margin-right: 16px;
}

.pay-advantage-credit-card-capture-modal__content__receipt__text {
    margin-top: 16px;
}

.pay-advantage-credit-card-capture-modal__error {
    display: none;
    color: #dc3545;
    margin: 0 16px 8px 16px;
}

.pay-advantage-credit-card-capture-modal__processing {
    display: none;
    background-color: rgba(255, 255, 255, 0.8);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    justify-content: center;
    align-items: center;
}

.pay-advantage-credit-card-capture-modal__processing__details {
    background-color: #FFFFFF;
    box-shadow: 0 0 32px 32px #ffffff;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    margin: 16px;
}

.pay-advantage-credit-card-capture-modal__processing__loader {
    border: 5px solid #f3f3f3;
    border-radius: 50%;
    border-top: 5px solid #343a40;
    width: 25px;
    height: 25px;
    -webkit-animation: pay-advantage-credit-card-capture-spin 2s linear infinite; /* Safari */
    animation: pay-advantage-credit-card-capture-spin 2s linear infinite;
}

.pay-advantage-credit-card-capture-modal__processing__text {
    margin-top: 16px;
}

@keyframes pay-advantage-credit-card-capture-spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}