/**=====================
    Tabs scss
==========================**/

.custom-nav-tabs {
    border: none;
    padding-bottom: 3px;

    .swiper-pagination {
        position: relative;
        inset: unset;
        margin-top: 9px;

        .swiper-pagination-bullet {
            background-color: rgba(229, 232, 234, 0.8);
            opacity: 1;
            border-radius: 100px;
            transition: 0.25s;

            &-active {
                background-color: var(--primary-color);
                width: 28px;
            }
        }
    }

    .nav-item {
        border: none;
        padding: 0;

        .nav-link {
            border-radius: 10px;
            padding: calc(8px + (20 - 8) * ((100vw - 320px) / (1920 - 320)));
            display: flex;
            flex-direction: column;
            background-color: $white;
            border: 1px solid $gray-color;
            margin-bottom: 0;
            width: 100%;
            transition: all 0.2s ease-in-out;
            position: relative;
            z-index: 0;
            overflow: hidden;


            &::before {
                @extend %bg-primary-color;
                opacity: 0;
                transition: all 0.2s ease-in-out;
            }

            span,
            small {
                transition: all 0.2s ease-in-out;
            }

            &.active {
                border-color: transparent;

                &::before {
                    opacity: 0.1;
                }

                span {
                    color: var(--primary-color);
                }

                .img-box {
                    background-color: $white;
                }

                img {

                    &.inactive {
                        display: none;
                    }

                    &.active {
                        display: block;
                    }
                }
                &.active {
                    &:hover {
                        border-color: transparent;

                        &::before {
                            opacity: 0.1;
                        }

                        span {
                            color: var(--primary-color);
                        }

                        .img-box {
                            background-color: $white;
                        }

                        img {

                            &.inactive {
                                display: none;
                            }

                            &.active {
                                display: block;
                            }
                        }
                    }
                }
                
                &:hover {
                @media screen and (max-width:768px) {
                        border: 1px solid $gray-color;

                        .img-box {
                            background-color: rgba($gray-color, 0.4);
                        }

                        &::before {
                            opacity: 0;
                        }
                    }
                }
            }

            @media (min-width: 576px) {
                &:hover {
                    border-color: transparent;

                    &::before {
                        opacity: 0.1;
                    }

                    span {
                        color: var(--primary-color);
                    }

                    .img-box {
                        background-color: $white;
                    }

                    img {

                        &.inactive {
                            display: none;
                        }

                        &.active {
                            display: block;
                        }
                    }
                }
            }

            .img-box {
                width: 100%;
                height: calc(66px + (95 - 66) * ((100vw - 320px) / (1920 - 320)));
                margin-bottom: 12px;
                background-color: rgba($gray-color, 0.4);
                padding: calc(13px + (25 - 13) * ((100vw - 320px) / (1920 - 320)));
                border-radius: 4px;
                transition: all 0.2s ease-in-out;
            }

            img {
                width: 100%;
                height: 100%;
                object-fit: contain;

                &.active {
                    display: none;
                }

                &.inactive {
                    display: block;
                }
            }

            span {
                font-family: "DM Sans", serif !important;
                margin: 0 auto;
                font-size: calc(15px + (18 - 15) * ((100vw - 320px) / (1920 - 320)));
                color: $title-color;
                line-height: 23px;
                overflow: hidden;
                width: 100%;
                display: -webkit-box;
                -webkit-line-clamp: 2;
                -webkit-box-orient: vertical;
                text-overflow: ellipsis;
                height: 52px;
            }

            small {
                font-family: "DM Sans", serif !important;
                margin: 0 auto;
                font-size: calc(14px + (16 - 14) * ((100vw - 320px) / (1920 - 320)));
                color: rgba($title-color, 0.6);
                line-height: 10px;
                white-space: nowrap;
                margin-top: 6px;
            }
        }
    }
}

.tab-content {
    margin-top: 30px;
}

.review-tab {
    margin: 0;

    .tab-pane {
        padding: 20px;
        min-height: 290px;
    }

    .nav-item {
        .nav-link {
            padding: 10px 20px;
            font-size: 16px;
            font-weight: 500;
            color: $light-color;
            border: none;

            &.active {
                background-color: transparent;
                border: none;
                color: $title-color;
                border-bottom: 2px solid $title-color;

                &:hover {
                    border-bottom: 2px solid $title-color;

                }
            }

            &:hover {
                border: none;
            }
        }
    }
}

.favorite-tab {
    @include flex_common ($dis: flex, $align: center, $justify: space-between);
    gap: 8px;
    border-bottom: 1px solid $gray-color;
    padding-bottom: 16px;
    flex-wrap: wrap;
    @media (max-width: 480.98px) {
        flex-direction: column;
        align-items: unset;
    }

    h3 {
        font-weight: 700;
        font-size: calc(18px + (20 - 18) * ((100vw - 320px) / (1920 - 320)));
    }

    .nav-tabs {
        border: none;
        gap: 12px;

        .nav-item {
            .nav-link {
                color: var(--primary-color);
                border: none;
                border-radius: calc(6px + (10 - 6) * ((100vw - 320px) / (1920 - 320)));
                font-size: calc(16px + (18 - 16) * ((100vw - 320px) / (1920 - 320)));
                position: relative;
                z-index: 0;
                overflow: hidden;
                padding: 9px calc(22px + (27 - 22) * ((100vw - 320px) / (1920 - 320)));
                &::before{
                    @extend %bg-primary-color;
                    opacity: 0.1;
                }

                &.active {
                    background-color: var(--primary-color);
                    color: $white;
                    font-weight: 500;
                }
            }
        }
    }

    ~.tab-content{
        margin-top: calc(18px + (30 - 18) * ((100vw - 320px) / (1920 - 320)));
    }
}

.provider-detail-tab {
    .nav-tabs {
        flex-direction: column;
        gap: 16px;

        .nav-item {
            .nav-link {
                border: 2px solid var(--primary-color);
                color: var(--primary-color);
                border-radius: 8px;
                width: 100%;
                font-size: 18px;
                font-weight: 500;
                padding: 12px;
                background-color: transparent;
            }
        }
    }
}

.overview-list {
    list-style: disc;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;

    [dir="rtl"] & {
        padding-left: 0;
        padding-right: 20px;
    }

    li {
        display: list-item;
        font-size: calc(15px + (16 - 15) * ((100vw - 320px) / (1920 - 320)));
    }
}

.provider-service-tab {
    padding-bottom: 16px;
    gap: 12px;

    .nav-item {
        .nav-link {
            background-color: rgba($primary-color, 0.10);
            color: var(--primary-color);
            border: none;
            border-radius: 30px;
            font-size: 16px;
            padding: 6px 16px;

            &.active {
                background-color: var(--primary-color);
                color: $white;
                font-weight: 500;
            }
        }
    }
}