﻿/*html {
    overflow-y: scroll;
}
body {
    overflow-y: scroll;
    overflow-x: hidden;
}*/


.star-rating {
    direction: rtl; /* مهم: جهت ستاره‌ها از چپ به راست */
    font-size: 1.5rem;
    unicode-bidi: bidi-override;
    display: inline-block;
}

.star {
    cursor: pointer;
    color: #FFD700;
    transition: color 0.2s;
    user-select: none;
}

    .star.empty {
        color: #fff;
        stroke: #FFD700;
        stroke-width: 2px;
        filter: drop-shadow(0 0 1px #FFD700);
    }

#ratingValue {
    min-width: 100px;
    text-align: center;
    display: inline-block;
}

/* Tabs and Opinion Items Styles */
.tabs {
    display: flex;
    border-bottom: 2px solid #ddd;
    margin-bottom: 1rem;
    gap: 1rem;
}

.tab-btn {
    padding: 0.5rem 2rem;
    background: #f9f9f9;
    border: none;
    border-top-left-radius: 15px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    font-size: 0.9rem;
    transition: border-color 0.2s, color 0.2s;
    outline: none;
}

    .tab-btn.active {
        border-bottom: 2px solid #1d9d50;
        color: #1d9d50;
        font-weight: bold;
        background: #fff;
    }

.tab-content {
    display: none;
    margin-top: 1rem;
    word-break: break-word;
    overflow-x: hidden;
    max-width: 100%;
    box-sizing: border-box;
}

    .tab-content.active {
        display: block;
    }

.tab-content-parent {
    min-width: 180px; /* این عدد را مطابق بیشترین محتوای هر تب تنظیم کن */
    transition: min-height 0.3s;
    overflow-x: hidden;
    max-width: 100%;
}

.tab-content-parent, .tab-content, .item-list {
    max-width: 100% !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

.item-list {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    white-space: normal;
    word-break: break-word;
    /*    max-width: 100%;
    overflow-x: hidden;
    justify-content: flex-start;
*/
}

.tab-content, .item-list {
    word-break: break-word;
    white-space: normal;
}

.opinion-item {
    padding: 0.7rem 1.5rem;
    border-radius: 8px;
    border: 1px solid #aaa;
    font-size: 0.8rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
    user-select: none;
    /*max-width: 180px;
    min-width: 80px;
    width: 100%;*/ /* باعث می‌شود دکمه در ردیف خودش بماند و اسکرول افقی ایجاد نشود */
    /*text-align: center;
    box-sizing: border-box;
    white-space: normal;
    margin-bottom: 0.5rem;
    flex: 1 1 120px;*/ /* مهم: اجازه بده عرض دکمه قابل انعطاف باشد */
}

    /* انتخاب شده مثبت */
    .opinion-item.selected.positive {
        background: #1d9d50;
        color: #fff;
        border-color: #1d9d50;
    }
    /* انتخاب نشده مثبت */
    .opinion-item.positive {
        background: #fff;
        color: #1d9d50;
        border-color: #1d9d50;
    }
    /* انتخاب نشده منفی */
    .opinion-item.negative {
        background: #fff;
        color: #e53935;
        border-color: #e53935;
    }
    /* انتخاب شده منفی */
    .opinion-item.selected.negative {
        background: #e53935;
        color: #fff;
        border-color: #e53935;
    }

.opinion-item-published {
    padding: 0.2rem 0.3rem;
    border-radius: 9px;
    border: 1px solid #aaa;
    font-size: 0.6rem;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
    user-select: none;
}
    .opinion-item-published.positive {
        background: #fff;
        color: #1d9d50;
        border-color: #1d9d50;
    }
    .opinion-item-published.negative {
        background: #fff;
        color: #e53935;
        border-color: #e53935;
    }

.opinion-item-animated {
    animation: fadeInUp 0.6s ease forwards;
}

.opinion-comment-collapsed {
    display: -webkit-box;
    -webkit-line-clamp: 2; /* تعداد خطوط قابل نمایش */
    -webkit-box-orient: vertical;
    overflow: hidden;
    position: relative;
}

.opinion-comment-expanded {
    display: block;
    -webkit-line-clamp: unset;
}
