#payment, #payment *, #payment *:before, #payment *:after {
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    box-sizing: border-box;
}

#payment-cards{
    overflow: auto;
    padding: 0;
}

#payment .option{
    border-bottom: 1px solid #d9dfe0;
    height: 54px;
    line-height: 54px;
    margin-left: 15px;
    margin-right: 15px;
    position: relative;
    cursor: pointer;
    overflow: hidden; /* without this, container will have a weird extra height */
}

#payment .option:active{
    background-color: #E1E6E8;
}

#payment .option .brand{
    position: absolute;
    top: 0; bottom: 0; left: 10px;
    width: 30px;
    height: 30px;
    margin-top: auto;
    margin-bottom: auto;
}

#payment .option .name{
    position: absolute;
    font-size: 14px;
    top: 0; bottom: 0;
    left: 51px;
}

#payment .option .name .detail{
    margin-left: 5px;
}

#payment .option .default{
    margin-left: 5px;
}
#payment .option:not([data-default='true']) .default{
    display: none;
}

#payment .add-method{
    color: #00bfda;
    border: 0;
}

#payment .add-method .brand{
    background-image: none;
    border-radius: 3px;
    border: 1px solid #dde4e6;
    height: 20px;
    background-size: 10px 10px;
    text-align: center;
    background-image: url(/images/payment/add.svg);
}

#payment-edit{
    position: absolute;
    top: 0; bottom: 0; left: 20px; right: 20px; 
    margin: auto;
    max-width: 300px;
    height: 108px;
    background-color: rgba(255,255,255,0.98);
    border-radius: 3px;
}

#payment-edit .item{
    width: 100%;
    border-bottom: 1px solid #E1E6E8;
    line-height: 54px;
    height: 54px;
    overflow: hidden;
    padding-left: 20px;
    cursor: pointer;
    display: block;
}
#payment-edit .item:active{
    background-color: #E1E6E8;
}

#payment-edit .item:last-child {
    border-bottom-color: transparent;
}



/* page loader */
#payment-loader .icon{
    background-image: url(/images/payment/secure-payment.svg);
}

/* adding payment method loader */
#process-pay{
    background-color: rgba(0,0,0,0.63);
}
#process-pay .icon{
    background-image: url(/images/payment/secure-payment.svg);
}


/* add payment popup */
#payment-add{
    top: 0px; 
    bottom: 0px;
    left: 0px;
    right: 0px;
    width: 100%;
    min-height: 380px;
    margin: auto;
}

/* on desktop, increase top and bottom margin */
@media only screen and (min-width: 660px){
    #payment-add{
        top: 60px;
        bottom: 80px;
        max-width: 660px;
        border-radius: 4px;
    }
}

#payment-add .title{
    width: 100%;
    line-height: 50px;
    height: 50px;
    border-bottom: 1px solid #E1E6E8;
    text-align: center;
    font-weight: 500;
    font-size: 16px;
}

#payment-add .close{
    position: absolute;
    width: 50px;
    height: 50px;
    background-image: url(/images/ui/close-black.svg);
    background-size: 12px 12px;
    top: 0; right: 0;
    cursor: pointer;
}

#payment-add .close:active{
    opacity: 0.5;
}

/* on mobile, replace X by < */
@media only screen and (max-width: 440px){
    #payment-add .close{
        background-image: url(/images/arrow/prev-black.svg);
        top: -1px; left: 0px;
        background-size: 14px 14px;
    }
}

#payment-add .main{
    top: 50px; left: 0; right: 0; bottom: 0;
    width: 100%;
    position: absolute;
    background-color: #f6f8f8;
    display: none;
}

#payment-add .methods{
    margin-top: 20px;
    border-top: 1px solid #E1E6E8;
    background-color: white;
}

#payment-add .method{
    overflow: hidden;
    border-bottom: 1px solid #E1E6E8;
    cursor: pointer;
    position: relative;
}

#payment-add .method:active{
    background-color: #fafafa;
}

#payment-add .method .left{
    float: left;
    width: 70px;
    height: 66px;
    position: relative;
}

#payment-add .method .left .icon{
    position: absolute;
    top: 0; right: 0; left: 0; bottom: 0;
    margin: auto;
    width: 32px;
    height: 32px;
}

#payment-add .method[data-method='card'] .left .icon{ background-image: url(/images/payment/card2.svg); }
#payment-add .method[data-method='paypal'] .left .icon{ background-image: url(/images/payment/paypal2.png); width: 32px; height: 32px; }

#payment-add .method .right{
    margin-left: 60px;
    padding-right: 50px;
    padding-bottom: 10px;
}

#payment-add .method .right .name{
    margin-top: 11px;
    margin-bottom: 3px;
    font-size: 15px;
    line-height: 24px;
}

#payment-add .method .right .info{
    overflow: hidden;
    color: #919599;
    font-size: 11px;
}

#payment-add .method .check{
    position: absolute;
    top: 0; bottom: 0; right: 15px;
    margin-top: auto;
    margin-bottom: auto;
    width: 20px;
    height: 20px;
    border-radius: 100px;
    border: 1px solid #ccd1d4;
}

#payment-add .method.checked .check{
    background-color: #06BFAC;
    background-size: 10px 10px;
    background-image: url(/images/payment/check.svg);
    border: 0;
}

#payment-add .confirm-method{
    margin-top: 35px;
}

#payment-add  .black-btn{
    margin-left: 20px; 
    margin-right: 20px;
}

#payment-add .black-btn-notice{
    margin-left: 20px;
    margin-right: 20px;
    height: 40px;
    margin-top: 10px;
}

#payment-add .select-method{
    display: block;
}

#payment-add .card-detail{

}

#payment-add .card-error{
    padding: 10px;
    display: none; 
    color: #ed0000;
    font-weight: 600;
    text-align: center;
    background-color: #ffcece;
}

#payment-add .fields{
    padding: 20px;
    overflow: hidden;
}

#payment-add .field{
    overflow: hidden;
}

#payment-add .field .field-name{
    margin-bottom: 6px;
    margin-left: 5px;
    font-size: 12px;
    font-weight: 600;
}

#payment-add .card-number{
    margin-bottom: 15px;
}

#payment-add .exp-month, #payment-add .exp-year, #payment-add .cvv{
    width: -ms-calc(33.33% - 10px);
    width: -moz-calc(33.33% - 10px);
    width: -webkit-calc(33.33% - 10px);
    width: -o-calc(33.33% - 10px);
    width: calc(33.33% - 10px);
    margin-right: 10px;
    float: left;
}
#payment-add .cvv{
    margin-right: 0;
}

#payment-add .triple-fields{
    overflow: hidden;
    margin-right: -10px;
}


#payment-add .add-card{
    margin-top: 2px;
}