.product-comments{
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.product-comments .comment-item{
   display: flex;
   align-items: flex-start;
   gap: 1.5rem;
   border-bottom: 1px solid #E8E8E8;
   padding-bottom: 1rem;
}

.product-comments .comment-item:last-child {
   border-bottom: none;
   padding-bottom: 0; 
}

.star-wrapper{
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.star-wrapper .star-value{
    position: absolute;
    font-size: 16px;
    font-weight: 700;
    color: #fff;
    top: 50%;
    left: 50%;
    margin-top:3.5px;
    transform: translate(-50%, -50%);
}

.comment-body, .comment-content{
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  width: 100%;
}

.comment-body{
    gap:0;
}

.comment-info, .comment-reply-wrapper{
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.comment-author-date{
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.comment-author{
    font-size: 14px;
    font-weight: 500;
    color: #212121;
}

.comment-date{
    font-size: 12px;
    font-weight: 400;
    color: #939393;
}

.comment-text{
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    margin: 0;
}

.toggle-reply-comments{
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    font-weight: 500;
    color: #939393;
    cursor: pointer;
}

.reply-to-comment{
    display: flex;
    align-items: center;
    gap: 4px;
    color: #0499DE;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
}

.comment-children {
    display: none;
    margin-top: 1rem;
    border-top: 1px solid #E8E8E8;
}

.comment-children .comment-item {
    padding-top: 1rem;
}

.toggle-reply-comments svg {
    transition: transform 0.3s ease;
}

.toggle-reply-comments.opened svg {
    transform: rotate(180deg);
}

.load-more-comments-wrapper{
    display: flex;
    justify-content: center;
    margin-top: 2rem;
}

#load-more-comments{
    color:#0499DE;
    font-size:14px;
    font-weight:500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap:4px;
}

.comment-like-dislike{
    display: flex;
    align-items: center;
    gap:1.5rem;
}

.like-comment, .dislike-comment{
    display: flex;
    align-items: center;
    gap:4px;
    font-size:14px;
    font-weight:500;
    color:#939393;
    cursor: pointer;
    transform: color 0.3s ease;
}

.dislike-comment.voted, .dislike-comment:hover {
    color: red;
}

.like-comment.voted, .like-comment:hover {
    color: green;
}

#tf-open-add-comment{
    cursor: pointer;
}



.tf-add-comment-content, .tf-comment-reply-content{
    background: #fff;
    max-width: 380px;
    width: 100%;
    border-radius: 16px;
    position: relative;
    overflow: hidden;
    z-index: 999;
}

.tf-add-comment-content-header{
    display: flex;
    align-items: center;
    padding: 16px 20px;
    gap: 1rem;
}

.tf-add-comment-content-header > svg{
    cursor: pointer;
}

.tf-add-comment-content-header .divider{
    width: 1px;
    height: 42px;
    background: #E8E8E8;
}

.tf-add-comment-hdeader-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 9px;
    background: #DFF1FF;
}

.tf-add-comment-header-wrapper{
    display: flex;
    align-items: center;
    gap: 12px;
}

.tf-add-comment-header-title{
    font-size: 15px;
    font-weight: 700;
    color: #212121;
}

.tf-add-comment-header-desc{
    font-size: 12px;
    font-weight: 500;
    color: #939393;
}

.tf-add-comment-product-info, .replay-to-wrapper{
    border-top: 1px solid #E8E8E8;
    border-bottom: 1px solid #E8E8E8;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background-color: #F8FAFC;
}

.tf-add-comment-product-image{
    width: 48px;
    height: 48px;
    border-radius: 15px;
    object-fit: cover;
    border: 1px solid #E8E8E8;
    background-color: white;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-add-comment-product-image img{
    width: 40px;
    height: 40px;
    object-fit: cover;
}

.tf-add-comment-product-title{
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    display: -webkit-box;
    -webkit-line-clamp: 2;   
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tf-add-comment-form {
    display: flex;
    flex-direction: column;
}

.tf-add-comment-form label{
    font-size: 14px;
    font-weight: 700;
    color: #212121;
    margin-bottom: 1rem;
}

.tf-add-comment-rating-wrapper, .tf-add-comment-textarea-wrapper{
    padding: 16px 20px;
    border-bottom: 1px solid #E8E8E8;
}

.tf-add-comment-rating-stars{
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: #E8E8E8;
}

.tf-add-comment-rating-stars .star-value{
    color: #939393;
}

.select-star{
    cursor: pointer;
    transition: color 0.3s ease;
}

.tf-add-comment-inputs-wrapper{
    display: flex;
    margin-top:1rem;
    gap: 10px;
    margin-bottom: 10px;
}

.tf-add-comment-submit-btn-wrapper{
    padding: 16px 20px;
    border-top: 1px solid #E8E8E8;
}

.tf-add-comment-submit-btn-wrapper button{
    width: 100%;
    background: #0499DE;
    color: #fff;
    padding: 10px 0;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 700;
    transition: background 0.3s ease;
}

.product-comments.loading {
  position: relative;
  opacity: 0.5;
  pointer-events: none;
}

.product-comments.loading::after {
  content: "در حال بارگذاری...";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(255, 255, 255, 0.8);
  padding: 8px 14px;
  border-radius: 6px;
  font-size: 14px;
  color: #333;
}

.replay-to-excerpt{
    font-size: 14px;
    font-weight: 500;
    color: #212121;
    display: -webkit-box;
    -webkit-line-clamp: 1;   
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.repay-to-name-warapper{
    color: #939393;
    font-weight: 500;
    font-size: 12px;
}

.replay-to-icon{
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 9px;
    background: #fff;
    border: 1px solid #E8E8E8
}

.tf-comment-reply-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tf-comment-reply-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 998;
    display: flex;
    align-items: center;
    justify-content: center;  
}

.tf-comment-reply-close {
    position: absolute;
    top: 10px;
    left: 10px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
}

.tf-comment-reply-form .tf-comment-input-textarea,
.tf-comment-reply-form .tf-comment-input {
    width: 100%;
    margin-bottom: 10px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 14px;
}

.tf-comment-submit-btn {
    background: #0499DE;
    color: #fff;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

.tf-comment-submit-btn:hover {
    background: #037bb5;
}
