:root {
    --popup-width: 900px;
    --popup-height: auto;
    --close-x: 20px;
    --close-y: 25px;
}
#popup-checkout .popup-content {
    width: var(--popup-width);
    height: var(--popup-height);
    padding: 50px 15px 30px;
    background-color: #fdf236;
}
#popup-checkout .popup-close {
    width: auto;
    height: auto;
    top: 0;
    right: 0;
    padding: var(--close-y) var(--close-x);
    text-indent: -9999px;
}

/* Two-column wrapper: the main content (title, card form, disclaimer) stacks in
   the left column, the pay-in-store option sits in the right column. */
#popup-checkout .popup-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    column-gap: 40px;
    align-content: start;
    width: 100%;
}
#popup-checkout .popup-form > * {
    grid-column: 1;
    min-width: 0;
}
#popup-checkout .pdr-pay-in-store {
    grid-column: 2;
    grid-row: span 4;
    margin: 0;
}
/* uni-style fixes the form at 639px; let it fill the left column instead. */
#popup-checkout form {
    width: 100%;
    grid-row: 3;
}

#popup-checkout .pdr-title {
    text-align: center;
    font-size: 24px;
    line-height: 1.25;
    width: 360px;
    margin: 0 auto 4px;
    grid-row: 1;
}

#popup-checkout .pdr-title span {
    font-size: 13px;
    line-height: 17px;
}

#popup-checkout .cc-image {
    margin-top: 15px;
    margin-bottom: 22px;
    grid-row: 2;
}

#popup-checkout .pdr-total {
    margin: 0 -15px;
}

#popup-checkout .pdr-total p {
    font-size: 20px;
    line-height: 1.4;
    text-align: center;
    margin-bottom: 16px;
}

#popup-checkout .pdr-total p span:not(.pd-price) {
    font-size: 2.35em;
    line-height: normal;
    letter-spacing: -7.3%;
}

#popup-checkout .pdr-total p span sup {
    font-size: 60%;
}

#popup-checkout .pdr-total p.pdr-product-title {
    font-size: 18px;
    line-height: 1.222;
    margin-bottom: 21px;
}

#popup-checkout .form-action .button {
    width: 240px;
    height: 40px;
    border-radius: 20px;
    font-size: 16px;
    text-transform: none;
}

#popup-checkout .payment-disclaimer {
    font-size: 10px;
    line-height: 1.7;
    margin-top: 23px;
    width: 290px;
    grid-row: 4;
}

#popup-checkout hr {
    margin-top: 28px;
    margin-bottom: 24px;
}

#popup-checkout .pdr-pay-in-store p.avenir-bold {
    font-size: 23px;
    line-height: normal;
    margin-bottom: 5px;
}

#popup-checkout .pdr-pay-in-store p.avenir {
    width: 310px;
    max-width: 100%;
    font-size: 16px;
    line-height: 1.375;
    margin-bottom: 22px;
}

#popup-checkout .pdr-pay-in-store .button {
    width: 240px;
    height: 40px;
    border-radius: 20px;
    font-size: 16px;
    text-transform: none;
    margin-bottom: 32px;
}

#popup-checkout .in-store-disclaimer {
    font-size: 13px;
    line-height: 18px;
    margin-left: auto;
    margin-right: auto;
    width: 436px;
    max-width: 100%;
}

@media screen and (max-width: 567px) {
    :root {
        --popup-width: 100%;
        --popup-height: 100%;
        --close-x: 16px;
        --close-y: 20px;
    }
    #popup-checkout .popup-content {
        overflow: auto;
        padding-bottom: 60px;
    }
    #popup-checkout .popup-close {
        width: 47px;
    }
    /* Stack back to a single column on phones. */
    #popup-checkout .popup-form {
        grid-template-columns: 1fr;
    }
    #popup-checkout .pdr-pay-in-store {
        grid-column: 1;
    }
    #popup-checkout .pdr-title {
        font-size: 24px;
        line-height: 1.25;
        margin-bottom: 0;
    }

    #popup-checkout .pdr-total p,
    #popup-checkout .pdr-total p.pdr-product-title {
        font-size: 16px;
        line-height: 23px;
    }

    #popup-checkout .pdr-total p.pdr-product-title {
        width: 210px;
        margin-left: auto;
        margin-right: auto;
    }

    #popup-checkout .in-store-disclaimer {
        font-size: 12px;
        line-height: 1.25;
    }
}
