/**=====================
    Rating scss
==========================**/

.star-rating {
    @include flex_common ($dis: flex, $align: center, $justify: start);
    flex-wrap: wrap;
    gap: 7px;
    flex-direction: row;
    font-size: 1.5em;

    input {
        display: none;
    }

    label {
        display: flex;
        align-items: center;
        background-color: $white;
        color: $light-color;
        gap: 6px;
        padding: 10px;
        border-radius: 8px;
        border: 1px solid $border-color;
        line-height: 0;
        cursor: pointer;
        font-size: 16px;
        font-weight: 500;

        i {
            --Iconsax-Size: 18px;
            --Iconsax-Color: #808B97;
        }

        &:hover {
            background-color: var(--theme-color);
            color: $white;

            i {
                --Iconsax-Color: #ffffff;
            }
        }
    }

    :checked {
        ~label {
            background-color: var(--theme-color);
            color: $white;
            border-color: var(--theme-color);

            i {
                --Iconsax-Color: #ffffff;
            }
        }
    }
}

.reviews {
    background-color: $white;
    padding: 16px;
    border-radius: 8px;
    @include flex_common ($dis: flex, $align: start, $justify: space-between);
    gap: 12px;
    margin-bottom: 16px;

    &:last-child {
        margin: 0;
    }

    .person-detail {
        display: flex;
        align-items: center;
        gap: 6px;
        color: $title-color;

        img {
            border-radius: 100%;
            height: 45px;
            width: 45px;
        }

        p {
            line-height: 1.5;
            color: $light-color;
            margin: 0;
            font-size: 16px;
            width: 100%;
            overflow: hidden;
            display: -webkit-box;
            -webkit-line-clamp: 2;
            -webkit-box-orient: vertical;
            text-overflow: ellipsis;
        }

        h5 {
            line-height: 1.5;
            font-weight: 500;
        }
    }

    .rating {
        .rate {
            justify-content: end;
            color: $title-color;

            small {
                font-size: 16px;
            }
        }

        .overview-list {
            list-style: none;

            li {
                white-space: nowrap;
            }
        }

        @media (max-width: 575.98px) {
            margin-left: 50px;
        }
    }

    @media (max-width: 575.98px) {
        flex-direction: column;
        align-items: start;
        justify-content: unset;
        gap: 4px;

        .rating {
            margin-left: 50px;
            display: flex;
            align-items: center;
            flex-direction: row-reverse;
            gap: 10px;

            .rate {
                margin: 0;
            }
        }
    }
}

.rating-bars {
    border-top: 1px solid $border-color;
    margin-top: 16px;
    padding: 16px 0 0;
    white-space: nowrap;
    display: flex;
    gap: 10px;
    flex-direction: column;

    body.dark & {
        border-color: #454851;

        .bar {
            background-color: #454851;
        }

        .right {
            color: rgba($white, 0.6);
        }
    }

    .rating-bar {
        display: flex;
        align-items: center;
        gap: 8px;
        text-align: left;

        [dir="rtl"] & {
            text-align: right;
        }

        .bar {
            @include pseudowh($width: 100%, $height: 8px);
            background-color: $section-bg;
            border-radius: 4px;

            .bar-item {
                height: 8px;
                background-color: var(--theme-color);
                border-radius: 4px;

                &-5 {
                    width: 84%;
                }

                &-4 {
                    width: 30%;
                }

                &-3 {
                    width: 12%;
                }

                &-2 {
                    width: 6%;
                }

                &-1 {
                    width: 3%;
                }
            }
        }

        .left {
            min-width: 43px;
            font-size: 15px;
            font-weight: 500;
        }

        .right {
            color: $light-color;
            text-align: left;
            min-width: 40px;
            font-size: 15px;
            font-weight: 500;

            [dir="rtl"] & {
                text-align: right;
            }

        }
    }
}