/* SHOPPING CART */

#frmCart {
    .cart-promo {
        color: #000;
        font-family: 'Public Sans';
        font-size: 15px;
        line-height: 1.5;
        padding: 15px;
        
        p {
            margin: 0 0 5px 0;
        }

        progress {
            height: 40px;
            width: 100%;
            
            &::-webkit-progress-value { 
                background: #275bc3; 
            }
        }
    }

    select,
    input[type=text] {
        background-color: #f3f3f3;
        border: 1px solid #888;
        border-radius: 2px;
        box-shadow: inset 1px 1px 3px rgb(150 150 150 / 30%);
        box-sizing: border-box;
        color: #000;
        font-family: 'Public Sans';
        font-feature-settings: 'tnum';
        font-weight: 500;
        height: 43px;
        line-height: 1;
        margin: 0;
        padding: 0 6px;
        
        &:focus {
            background-color: #fff;
            border-color: #275bc3;
            color: #000;
            outline: 0;
        }
    }
    
    select {
        font-size: 16px;
    }

    input[type=text] {
        font-size: 18px;
        max-width: 90%;
        text-transform: uppercase;
        width: 240px;
    }
    
    #cart-coupon-terms {
        color: #333;
        font-family: 'Public Sans';
        font-size: 13px;
        font-style: italic;
        font-weight: 400;
        line-height: 1.4;
        margin: 0 auto;
        padding: 10px 20px;
        text-align: left;
    }    
    
    #cart-subtotal {
        color: #000;
        display: flex;
        font-family: 'Public Sans';
        font-feature-settings: 'tnum';
        font-size: 18px;
        font-weight: 600;
        line-height: 1;
        padding: 15px 0;
        
        &>div {
            flex: 1;
            text-align: center;
            
            &:nth-child(2) {
                color: #275bc3;
                font-weight: 700;
            }
        }
    }
}

#cart-coupon-code {
    color: #275bc3;
    font-family: 'Public Sans';
    font-feature-settings: 'tnum';
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .8px;
    line-height: 1;
    padding: 11px 0;
}

#cart-coupon-discount {
    color: #000;
    display: flex;
    font-family: 'Public Sans';
    font-feature-settings: 'tnum';
    font-size: 15px;
    font-weight: 500;
    line-height: 1;
    padding: 5px 0;
    
    &>div {
        flex: 1;
        text-align: center;
    }
}

.j-discount button {
    margin: 10px 0 20px 0;
    padding: 9px 13px;
}

/* OVERLAY BLUR */

#checkout-overlay {
    background: rgb(255 255 255 / 50%);
    backdrop-filter: blur(5px);
    color: #275bc3;
    font-size: 20px;
    font-weight: 800;
    height: 100%;
    left: 0;
    padding-top: 50px;
    position: absolute;
    text-align: center;
    top: 0;
    width: 100%;
}

/* CHECKOUT */

#checkout {
    color: #000;
    column-gap: 35px;
    display: flex;
    font-family: 'Public Sans';
    
    /* MAIN COLUMN */
    
    #checkout-main {
        flex: 1;
        font-size: 15px;
        padding: 5px 25px;
        position: relative;
        
        hr {
            border: 0;
            border-bottom: 3px solid #e1eaf3;
            height: 0;
            margin: 30px 0;
            padding: 0;
        }
        
        .columns {
            display: flex;
            gap: 20px;
            
            &>div {
                flex: 1;
            }
        }
        
        .checkout-title {
            color: #275bc3;
            font-size: 20px;
            font-weight: 800;
            line-height: 1;
            margin: 0;
            padding: 5px 5px 30px 5px;
            text-align: center;
        }
        
        .field-row {
            padding: 10px 0px;
            
            &>div:first-child {
                font-weight: 600;
                padding-bottom: 5px;
            }
            
            &>span:first-child {
                display: inline-block;
                font-weight: 600;
                width: 180px;
            }
            
            .required {
                color: #275bc3;
            }
        }
        
        .field {
            align-items: center;
            display: flex;
            padding: 10px 0;
            
            &>div:first-child {
                flex: 0 0 180px;
                font-weight: 600;
            }
            
            &.required>div:first-child {
                color: #275bc3;
            }
        }
        
        .option {
            padding: 15px 0;
        }
        
        .fields {
            padding: 5px 0 5px 36px;
        }
        
        ul.options {
            list-style: none;
            margin: 0;
            padding: 0;
            
            li {
                margin: 0;
                padding: 15px 0;

                div {
                    padding: 5px 0 0 36px;
                }
            }
        }
        
        label {
            cursor: pointer;
            font-size: 17px;
            font-weight: 600;
            line-height: 1;
            
            &:hover {
                color: #275bc3;
            }
            
            &:has(input:checked) {
                color: #275bc3;
                font-weight: 700;
            }
        }
        
        input[type=checkbox],
        input[type=radio] {
            accent-color: #275bc3;
            cursor: pointer;
            height: 20px;
            margin: 0 15px 0 0;
            vertical-align: text-bottom;
            width: 20px;
        }

        select,
        input[type=number],
        input[type=text] {
            background-color: #f3f3f3;
            border: 1px solid #888;
            border-radius: 2px;
            box-shadow: inset 1px 1px 3px rgb(150 150 150 / 30%);
            box-sizing: border-box;
            color: #000;
            font-family: 'Public Sans';
            font-size: 14px;
            font-weight: 500;
            height: 38px;
            line-height: 1;
            margin: 0;
            
            &:focus {
                background-color: #fff;
                border-color: #275bc3;
                color: #000;
                outline: 0;
            }
        }
        
        input[type=text] {
            width: 400px;
            
            &.onlynumeric {
                font-feature-settings: 'tnum';
            }
        }
        
        input[type=number],
        input[type=text] {
            padding: 0 6px;
            
            &.field-sm {
                width: 90px;
            }
            
            &.field-md {
                width: 150px;
            }

            
            &::placeholder {
                color: #aaa;
            }
        }
        
        select {
            cursor: pointer;
            font-feature-settings: 'tnum';
            padding: 0 3px;
        }
        
        .field-submit {
            padding: 25px 0;
            text-align: center;
        }
        
        #checkout-items {
            &>div {
                align-items: center;
                border-bottom: 2px solid #e1eaf3;
                display: flex;
                margin: 10px 0;
                padding-bottom: 10px;
                
                &>div {
                    box-sizing: border-box;
                    padding: 0 15px;
                }
                
                &>div:nth-child(1) {
                    flex: 0 0 80px;
                    text-align: center;
                }
                
                &>div:nth-child(2) {
                    flex: 1;
                    font-weight: 700;
                    
                    span {
                        color: #333;
                        display: block;
                        font-feature-settings: 'tnum';
                        font-weight: 500;
                    }
                }
                
                &>div:nth-child(3),
                &>div:nth-child(4),
                &>div:nth-child(5) {
                    border-left: 1px dashed #e1eaf3;
                    font-feature-settings: 'tnum';
                    text-align: center;
                }
                
                &>div:nth-child(3),
                &>div:nth-child(5) {
                    flex: 0 0 150px;
                }
                
                &>div:nth-child(4) {
                    flex: 0 0 100px;
                }
                
                &>div:nth-child(5) {
                    color: #275bc3;
                    font-weight: 700;
                }
            }
        }
        
        #checkout-totals {
            padding: 20px;
            
            &>div {
                display: flex;
                font-weight: 500;
                gap: 20px;
                margin: 5px 0;

                &.hl {
                    color: #275bc3;
                    font-size: 16px;
                    font-weight: 700;
                }
                
                &>div:first-child {
                    flex: 1;
                    text-align: right;
                }
                
                &>div:last-child {
                    flex: 0 0 130px;
                    font-feature-settings: 'tnum';
                    text-align: right;
                }
            }
        }

        #checkout-autoship {
            background: linear-gradient(45deg, #cccfff, #e1f3e2);
            border-radius: 20px;
            color: #000;
            margin-bottom: 30px;
            padding: 40px;
            position: relative;
            
            #checkout-autoship-faq {
                font-size: 13px;
                padding-top: 10px;
                text-align: right;
                
                a {
                    color: #0b53c9;
                    font-weight: 700;
                    text-decoration: underline;
                }
            }
            
            #autoship_date_text {
                padding: 10px 0;
                
                strong {
                    border-bottom: 1px dotted #275bc3;
                    color: #275bc3;
                    font-feature-settings: 'tnum';
                    letter-spacing: .3px;
                    margin: 0 2px;
                }
            }
        }
        
        #checkout-fee {
            display: none;
            font-size: 18px;
            margin-top: 25px;
            text-align: center;
            
            strong {
                color: #275bc3;
            }
        }
    }
    
    /* SIDEBAR */

    #checkout-summary {
        background: #e1eaf3;
        border-radius: 20px;
        flex: 0 0 260px;
        font-family: 'Public Sans';
        font-size: 15px;
        line-height: 1.4;
        padding: 25px 15px;
        text-align: center;
        
        .checkout-summary-block {
            padding: 15px 0;
            
            .checkout-summary-block-title {
                color: #275bc3;
                font-weight: 800;
            }
            
            button {
                padding: 10px 15px;
            }
        }
        
        #checkout-summary-title {
            display: none;
        }
    }
}

/* MOBILE DEVICES */

@media only screen and (max-width: 1000px) 
{
    #checkout {
        flex-direction: column-reverse;
        flex-wrap: wrap;
        
        #checkout-summary {
            #checkout-summary-title {
                color: #275bc3;
                cursor: pointer;
                display: block;
                font-size: 18px;
                font-weight: 700;
                text-decoration: none;
                
                &:after {
                    content: "\f054";
                    display: inline-block;
                    font-family: 'Font Awesome 5 Free';
                    margin-left: 8px;
                    width: 15px;
                }
                
                &.checkout-summary-title-active:after {
                    content: "\f078";
                }
            }
        }
    }
}

@media only screen and (max-width: 850px) 
{
    #checkout {
        padding: 10px;
        row-gap: 30px;
        
        #checkout-main {
            box-sizing: border-box;
            padding: 10px;
            
            .columns {
                flex-direction: column;
                gap: 0;
            }
            
            .fields {
                padding-left: 5px;;
            }
            
            .field-row {
                &>span:first-child {
                    display: block;
                    padding-bottom: 5px;
                    width: 100%;
                }
            }
            
            .field {
                row-gap: 10px;
                flex-direction: column;
                padding: 10px 0;
                
                &>div:first-child,
                &>div:last-child {
                    align-self: flex-start;
                    flex: 1;
                    line-height: 1;
                    width: 100%;
                }
            }
            
            input[type=text],
            input[type=number],
            select {
                font-size: 16px;
                height: 45px;
            }
            
            input[type=text],
            input[type=number] {
                padding: 0 10px;
                width: 100%;
            }
            
            select {
                padding: 0 10px;
                max-width: 100%;
            }
            
            #checkout-items {
                &>div {
                    flex-wrap: wrap;
                    row-gap: 10px;
                    
                    &>div {
                        padding: 0;
                    
                        &:nth-child(1) {
                            flex: 0 0 100%;
                            text-align: center;
                        }
                        
                        &:nth-child(2) {
                            border-left: none;
                            flex: 0 0 100%;
                            font-size: 16px;
                            text-align: center;
                        }
                        
                        &:nth-child(3),
                        &:nth-child(4),
                        &:nth-child(5) {
                            border-left: 0;
                            flex: 1;
                        }
                        
                        &:nth-child(3),
                        &:nth-child(4) {
                            border-right: 1px dashed #e1eaf3;
                        }
                    }
                }
            }
            
            #checkout-totals {
                padding: 10px;
                
                &>div {
                    gap: 10px;
                
                    &>div:last-child {
                        flex: 0 0 110px;
                    }
                }
            }            

            #checkout-autoship {
                padding: 25px 20px;
            }
        }
        
        #checkout-summary {
            flex: 0;
            padding: 10px;
            
            #checkout-summary-content {
                display: none;
            }
        }
    }
}