@use "../../utils" as *;

/*----------------------------
checkout section design
------------------------------*/
.td-checkout {
    margin-top: 100px;

    @media #{$xl} {
        margin-top: 100px;
    }

    @media #{$lg,$md} {
        margin-top: 70px;
    }

    @media #{$xs} {
        margin-top: 60px;
    }

    &-left {
        &-title {
            border-bottom: 1px solid #E3E3E3;

            h2 {
                color: var(--td-theme-bg-color);
                font-size: 20px;
                font-weight: 600;
                padding-bottom: 16px;
            }
        }

        &-forms {
            margin-top: 30px;
        }
    }

    &-right {
        margin-inline-start: 40px;

        @media #{$md,$xs} {
            margin-inline-start: 0px;
        }

        &-title {
            border-bottom: 1px solid #E3E3E3;

            @media #{$md,$xs} {
                margin-top: 30px;
            }

            &-2 {
                margin-top: 50px;
            }

            h2 {
                color: var(--td-theme-bg-color);
                font-size: 20px;
                font-weight: 600;
                padding-bottom: 16px;
            }
        }

        &-card {
            border-radius: 16px;
            background-color: #F6F6F6;
            padding: 30px;
            margin-top: 30px;

            @media #{$lg,$md} {
                padding: 25px;
            }

            @media #{$xs} {
                padding: 20px;
            }

            img {
                width: 100%;
                height: auto;
                border-radius: 8px;
            }

            &-content {
                padding: 0px 0 30px 0;
                border-bottom: 1px solid #E1E1E1;

                @media #{$lg,$md,$xs} {
                    padding: 10px 0 20px 0;
                }

                &-row {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin-top: 24px;

                    &:last-child {
                        margin-bottom: 0;
                    }

                    p {
                        color: #666;
                        font-size: 16px;
                        font-weight: 500;
                        line-height: 22px;

                        @media #{$xs} {
                            font-size: 14px;
                        }

                        &.title {
                            color: var(--td-theme-bg-color);
                        }
                    }
                }
            }

            &-total {
                &-row {
                    display: flex;
                    justify-content: space-between;
                    align-items: center;
                    margin-top: 30px;

                    @media #{$lg,$md,$xs} {
                        margin-top: 20px;
                    }

                    p {
                        color: #666;
                        font-size: 16px;
                        font-weight: 500;
                        line-height: 22px;

                        @media #{$xs} {
                            font-size: 14px;
                        }

                        &.title {
                            color: var(--td-theme-bg-color);
                        }
                    }
                }
            }
        }

        &-paymentCard {
            border-radius: 16px;
            background-color: #F6F6F6;
            padding: 30px 50px;
            margin-top: 30px;

            @media #{$lg,$md} {
                padding: 25px 45px;
            }

            @media #{$xs} {
                padding: 0px;
                margin-bottom: 10px;
            }

            &-forms {
                margin-top: 10px;
            }
        }

        &-checkoutButton {
            margin-top: 40px;

            @media #{$xs} {
                margin-top: 30px;
            }
        }
    }
}

.other-facilities {
    list-style-type: none;
    margin-top: 30px;
    border-bottom: 1px solid #E1E1E1;
    padding-bottom: 20px;
    li{
        margin-bottom: 10px;
    }

    h2 {
        color: var(--td-theme-bg-color);
        font-size: 20px;
        font-weight: 600;
        padding-bottom: 16px;
    }



    .form-check {
        label {
            margin-inline-start: 8px;
            font-size: 16px;
            cursor: pointer;
            user-select: none;
        }
    }

    .form-check-input {
        width: 20px;
        height: 20px;
    }

    .form-check-input:checked {
        background-color: var(--td-theme-color) !important;
        border: 0;
    }

    .form-check-input:focus,
    .label::after,
    label.form-check-label:focus,
    .form-check-input::after,
    .form-check-input:not(:disabled):not(.disabled):active:focus {
        color: black;
        outline: 0;
        border: 0;
        box-shadow: 0 0 0 0.1rem var(--td-theme-color) !important;
    }
}



.custom-time {
    input[type=number] {
        outline: none;
        background-color: transparent;
        height: 40px;
        width: 100%;
        line-height: 56px;
        font-size: 14px;
        color: var(--td-theme-bg-color);
         padding-inline-start: 0px;
         padding-inline-end: 26px;
        border: unset;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
}

.payment-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;

    .payment-card {
        position: relative;
        width: 58px;
        height: 40px;
        border: 1px solid #ddd;
        border-radius: 5px;
        display: flex;
        justify-content: center;
        align-items: center;
        cursor: pointer;
        transition: all 0.3s ease-in-out;
        background-color: #fff;

        img {
            max-width: 80%;
            height: auto;
        }

        .checkmark {
            position: absolute;
            top: 5px;
            inset-inline-end: 5px;
            width: 15px;
            height: 15px;
            background-color: #28a745;
            border-radius: 50%;
            display: none;
            justify-content: center;
            align-items: center;

            &:before {
                content: "✔";
                color: #fff;
                font-size: 7px;
                font-weight: bold;
            }
        }

        &.selected {
            border-color: #28a745;
            background-color: #f0fdf4;

            .checkmark {
                display: flex;
            }
        }

        input[type="radio"] {
            display: none;
        }

        &-2{
            width: 160px;
            height: 100%;
            padding: 10px;

            .img-text{
                display: flex;
                flex-direction: column;
                align-items: center;

                .img{
                    width: unset !important;
                    height: 35px !important;
                    max-width: unset !important;
                    margin-bottom: 5px;

                    img{
                        max-width: unset !important;
                        width: 100%;
                        height: 100%;
                        object-fit: cover;
                    }
                }

                span{
                    font-size: 14px;
                    color: #666;
                    text-align: center;
                }
            }
        }
    }
}

.td-checkout{
    .flatpickr-calendar:not(.noCalendar) .flatpickr-time {
        border-top: 1px solid black;
    }
}

.custom-list-group{
    margin-top: 20px;

    .list-group-item{
        p{
            margin-bottom: 0;
            text-align: left;
        }
    }
}

.custom-payment-button{
    background-color: rgba(255, 204, 0, 0.1);
    padding: 16px !important;

    p{
        color: var(--td-black)!important;
        margin-bottom: 0 !important;
    }
}

.td-checkout-right-paymentCard-2{
    width: 100%;
    background-color: transparent;

    .select-label{
        font-size: 16px;
        font-weight: 500;
        color: var(--td-black);
        margin-bottom: 5px;
    }

    .select2-container .select2-selection--single {
        height: 42px;
    }

    .select2-container--default .select2-selection--single .select2-selection__rendered {
        line-height: 40px;
    }

    .select2-container--default .select2-selection--single .select2-selection__arrow {
        height: 40px;
    }

    .select2-container--default .select2-results__option--highlighted.select2-results__option--selectable {
        background-color: #049A47!important;
        color: white;
    }
}