/* برای نظرات */
.star-rating-container {
  display: flex;
  align-items: center;
  gap: 5px;
}

.rating-number {
  font-size: 16px;
  color: #f5a623; /* رنگ نارنجی برای عدد */
}

.comment_container {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin: 0 0 16px 0;
  padding: 16px;
  border: 1px solid #E7EEF2;
  border-radius: 12px;
  background: #fff;
  transition: box-shadow 0.2s ease;
}
.commentlist li {
  box-shadow: none !important;
  border: 1px solid #DDE4E8 !important;
  border-radius: 16px !important;
}

.commentlist li:hover {
  box-shadow: 0 8px 24px rgba(1, 13, 10, 0.06);
}

.comment_container {
  border: none !important;
  border-radius: 16px !important;
  padding-bottom: 5px !important;
}

.comment-content-section { margin-top: 0px !important; }
.review-text { margin-bottom: 0px !important; }
.interaction-buttons { margin-top: 5px !important; }
.like-button { background: transparent !important; border: none !important; padding: 2px !important; }
.dislike-button { background: transparent !important; border: none !important; padding: 2px !important; position: relative; }
.interaction-buttons { margin-right: auto !important; gap: 9px !important; }

.dislike-button::before {
  content: "";
  display: inline-block;
  width: 1px;
  height: 24px;
  background-color: #DDE4E8;
  margin: 0 4px;
}

.review-text {
  color: #717C91;
  font-size: 14px;
  font-weight: 400;
  line-height: 24px;
}

.helpful-text {
  color: #717C91 !important;
  font-size: 14px !important;
  font-weight: 400;
  line-height: 24px;
}

.comment-top-section { margin-bottom: 2px !important; }


.comment-text {
  flex: 1;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.comment-actions {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
}

.usefulness {
  display: flex;
  gap: 10px;
  align-items: center;
}

.usefulness span {
  font-size: 14px;
  color: #666;
}

.useful-yes,
.useful-no,
.reply-link {
  font-size: 14px;
  color: #007bff;
  text-decoration: none;
}

.useful-yes:hover,
.useful-no:hover,
.reply-link:hover {
  text-decoration: underline;
}

/* استایل کلی بخش نظرات */
.woocommerce-Reviews {
  direction: rtl;
  margin-top: 20px;
}


/* استایل لیست نظرات */
.commentlist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.comment-text {
  flex: 1;
}

.comment-top-section {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-profile-section {
  display: flex;
  align-items: center;
  gap: 12px;
}

.user-avatar img,
.user-avatar .avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
}

.user-info-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.reviewer-name {
  font-size: 14px;
  color: #010D0A;
}

.review-date {
  font-size: 12px;
  color: #828282;
}

/* بج امتیاز: عدد قبل از آیکون ستاره سفارشی */
.rating-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFBEF;
  padding: 4px 8px;
  border-radius: 6px;
}

.rating-pill .rating-number {
  color: #FFC300;
  font-size: 16px;
  font-weight: 400;
  line-height: 28px;
}

.rating-pill .rating-star {
  width: 20px;
  height: 20px;
  display: block;
}

.star-rating-wrapper {
  display: flex;
  align-items: center;
  gap: 5px;
}

.star-icon {
  width: 16px;
  height: 16px;
}

.star-icon.filled { fill: #FFC87D; }
.star-icon.empty { fill: #E0E0E0; }

.rating-number {
  font-size: 14px;
  color: #010D0A;
  font-weight: 400;
}

.user-info {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-right: 40px; /* فاصله از ستاره‌ها (20px + فضای ستاره‌ها و امتیاز) */
}

.user-info .avatar {
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.woocommerce-review__author {
  font-size: 16px;
  font-weight: 400;
  color: #010D0A;
}

.comment-date {
  font-size: 12px;
  color: #828282;
  margin-bottom: 15px !important;
  line-height: 1.6;
}

.description.pymnwrew-comment-text {
  font-size: 16px !important;
  color: #010D0A !important;
  font-weight: 600 !important;
  line-height: 1.6;
  margin-bottom: 15px;
}

.comment-content-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.review-text {
  font-size: 14px;
  color: #010D0A;
  line-height: 1.9;
}

.interaction-buttons { display: flex; align-items: center; gap: 12px; }

.interaction-buttons .helpful-text {
  font-size: 13px;
  color: #828282;
  margin-left: 8px;
}

.usefulness {
  display: flex;
  align-items: center;
  gap: 10px;
}

.usefulness span {
  font-size: 14px;
  color: #828282;
  line-height: 1.6;
}

.like-button,
.dislike-button {
  display: flex;
  align-items: center;
  gap: 5px;
  text-decoration: none;
}

.like-button img,
.dislike-button img {
  width: 16px;
  height: 16px;
}

.like-button .like-count,
.dislike-button .dislike-count {
  font-size: 14px;
  color: #666;
}

.like-button:hover .like-count,
.dislike-button:hover .dislike-count {
  color: #333;
}

.like-button.voted .like-count { color: #0F8B7F; }
.dislike-button.voted .dislike-count { color: #B3261E; }

.comment_container .comment-reply-link {
  margin-right: auto;
  font-size: 13px;
  color: #F46F27;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 8px;
  transition: all 0.2s ease;
}

.comment_container .comment-reply-link:hover {
  background: rgba(244, 111, 39, 0.1) !important;
  color: #F46F27 !important;
  text-decoration: none !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
}

.comment_container .comment-reply-link:hover::before {
  filter: brightness(1.2);
}

.comment_container .comment-reply-link::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 20px;
  background-image: url('https://saeisun.seoamoozan.ir/wp-content/uploads/2025/09/corner-down-left.svg');
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

/* --- Reply/Comment Threading Styles --- */

.comment_container .children {
  margin-top: 24px;
  margin-right: 40px;
  border-right: 2px solid #E8F4FD;
  padding-right: 24px;
  position: relative;
}

.comment_container .children::before {
  content: '';
  position: absolute;
  right: -2px;
  top: -24px;
  width: 2px;
  height: 24px;
  background: linear-gradient(to bottom, transparent, #E8F4FD);
}

.children .comment_container {
  margin-bottom: 0 !important;
}

.children .comment_container .comment-top-section {
  margin-bottom: 12px;
}

.children .comment_container .user-avatar {
  width: 48px;
  height: 48px;
}

.children .comment_container .user-avatar img {
  width: 48px;
  height: 48px;
}

.children .comment_container .reviewer-name {
  font-size: 14px;
  font-weight: 600;
  color: #005D52;
}

.children .comment_container .review-date {
  font-size: 12px;
  color: #666;
}

.children .comment_container .review-text {
  font-size: 14px;
  line-height: 1.6;
  color: #333;
  margin-bottom: 12px;
}

.children .comment_container .interaction-buttons {
  justify-content: flex-start;
  gap: 16px;
}

.children .comment_container .like-button,
.children .comment_container .dislike-button {
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 8px;
}

.children .comment_container .comment-reply-link {
  font-size: 12px;
  color: #F46F27 !important;
  text-decoration: none !important;
  padding: 6px 12px !important;
  border-radius: 8px !important;
  transition: all 0.2s ease !important;
  margin-right: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.children .comment_container .comment-reply-link:hover {
  background: rgba(244, 111, 39, 0.1) !important;
  color: #F46F27 !important;
  text-decoration: none !important;
}

.children .comment_container .comment-reply-link:hover::before {
  filter: brightness(1.2);
}

/* Nested replies (replies to replies) */
.children .children {
  margin-top: 16px;
  margin-right: 32px;
  border-right-color: #D1E7F7;
}

.children .children::before {
  background: linear-gradient(to bottom, transparent, #D1E7F7);
}

/* Hide reply button for nested comments beyond level 2 */
.children .children .comment-reply-link {
  display: none;
}

/* حذف استایل‌های قدیمی */
.woocommerce #reviews #comments ol.commentlist li .comment-text {
  margin: 0 !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
}





/* ریسپانسیو */
@media (max-width: 768px) {
  .comment_container { 
    padding: 2px 6px !important; 
    margin: 0 !important;
  }

  a.comment-reply-link {
    font-size: 12px !important;
}

.children .comment_container .user-avatar {
  width: 36px !important;
  height: 36px !important;
}

  .user-avatar img,
  .user-avatar .avatar { 
    width: 36px !important; 
    height: 36px !important; 
  }

  /* کوچکتر کردن ستاره‌های امتیاز در موبایل */
  .rating-pill {
    padding: 2px 6px !important;
    gap: 4px !important;
  }
  .rating-pill .rating-number {
    font-size: 14px !important;
    line-height: 20px !important;
  }
  .rating-pill .rating-star {
    width: 16px !important;
    height: 16px !important;
  }
  .star-icon {
    width: 14px !important;
    height: 14px !important;
  }

  /* کاهش فاصله‌های بخش‌های نظر */
  .comment-top-section {
    margin-bottom: 8px !important;
    gap: 8px !important;
  }
  .comment-content-section {
    gap: 8px !important;
  }
  .review-text {
    margin-bottom: 8px !important;
  }
  .interaction-buttons {
    margin-top: 4px !important;
    gap: 8px !important;
  }

  /* کاهش فاصله‌های پاسخ‌های تو در تو در موبایل */
  .children {
    margin-top: 16px !important;
    margin-right: 20px !important;
    padding-right: 16px !important;
  }
  .children::before {
    height: 16px !important;
    top: -16px;
  }
  .children .children {
    margin-top: 12px !important;
    margin-right: 16px !important;
  }

  .usefulness {
    justify-content: space-between !important;
    gap: 8px !important;
  }

  /* کوچکتر کردن فونت‌ها در موبایل */
  .reviewer-name {
    font-size: 13px !important;
  }
  .review-date {
    font-size: 11px !important;
  }
  .review-text {
    font-size: 13px !important;
    line-height: 1.6 !important;
  }
  .helpful-text {
    font-size: 12px !important;
  }
}


/* استایل‌های پاپ‌آپ شخصی‌سازی شده */
#pymnwrew-review-popup {
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#pymnwrew-review-popup .pymnwrew-popup-inner {
    transition: transform 0.3s ease-out;
}

/* پاپ‌آپ: ابعاد و استایل دسکتاپ */
#pymnwrew-review-popup .pymnwrew-popup-inner {
    max-width: 694px !important;
    width: 100% !important;
    height: auto !important;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.pymnwrew-custom-form textarea {
    min-height: 182px !important;
    height: 182px !important;
    background: #F2F3F6 !important;
    border-radius: 15px !important;
    resize: vertical;
}

/* موبایل: پاپ‌آپ فیکس پایین و ابعاد */
@media (max-width: 768px) {
    #pymnwrew-review-popup {
        align-items: flex-end !important;
        justify-content: center !important;
    }
    #pymnwrew-review-popup .pymnwrew-popup-inner {
        margin: 0 !important;
        border-radius: 18px 18px 0 0 !important;
        max-width: 100% !important;
        width: 100% !important;
        height: auto !important;
        position: fixed !important;
        left: 0;
        right: 0;
        bottom: 0;
        top: auto;
        box-sizing: border-box;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
    }
}

/* استایل‌های فرم شخصی‌سازی شده */
.pymnwrew-custom-form {
    direction: rtl;
}

.pymnwrew-custom-form h3 {
    font-family: inherit;
}

.pymnwrew-custom-form h4 {
    font-family: inherit;
}

.pymnwrew-stars span {
    cursor: pointer;
    transition: color 0.2s;
}

.pymnwrew-stars span:hover {
    color: #f5a623 !important;
}

.pymnwrew-slider {
    cursor: pointer;
    transition: all 0.2s;
}

.pymnwrew-slider:hover {
    background: #d0d0d0 !important;
}

.pymnwrew-custom-form button {
    transition: background 0.2s;
}

.pymnwrew-custom-form button:hover {
    background: #00796b !important;
}

/* اسکرول در موبایل */
@media (max-width: 768px) {
    .pymnwrew-custom-form {
        padding-bottom: 20px;
    }
    
    /* فیلدهای نام و ایمیل در موبایل زیر هم */
    .pymnwrew-user-info > div {
        flex-direction: column;
    }
    
    .pymnwrew-user-info > div > div {
        width: 100%;
        margin-bottom: 12px;
    }
    
    .pymnwrew-user-info > div > div:last-child {
        margin-bottom: 0;
    }
} 

/* رنگ ستاره و اهرم‌ها */
/* حذف رنگ ثابت ستاره‌ها */
/* حذف شد: #pymnwrew-dynamic-stars span { color: #FFC87D !important; } */
/* حذف شد: .pymnwrew-stars span:hover { color: #f5a623 !important; } */
.pymnwrew-custom-form .pymnwrew-slider {
    accent-color: #FFC87D !important;
}

.pymnwrew-custom-form .pymnwrew-slider-value {
    color: #DFA24F !important;
}

/* استایل فیلدهای ورودی و textarea */
.pymnwrew-custom-form input[type="text"],
.pymnwrew-custom-form input[type="email"],
.pymnwrew-custom-form textarea {
    background: #F2F3F6 !important;
    border: none !important;
    border-radius: 15px !important;
    font-size: 13px !important;
    box-sizing: border-box;
    outline: none !important;
}

/* دسکتاپ: فونت و فاصله‌ها کوچکتر، اهرم‌ها جمع و جور */
#pymnwrew-review-popup .pymnwrew-popup-inner {
    padding: 16px 24px 16px 24px !important;
}
.pymnwrew-custom-form h3,
.pymnwrew-custom-form h4 {
    font-size: 15px !important;
    margin-bottom: 10px !important;
}
.pymnwrew-custom-form label {
    font-size: 12px !important;
    margin-bottom: 4px !important;
}
.pymnwrew-custom-form .pymnwrew-user-info > div {
    gap: 8px !important;
    margin-bottom: 10px !important;
}
.pymnwrew-custom-form .pymnwrew-rating-item {
    margin-bottom: 7px !important;
}
.pymnwrew-custom-form .pymnwrew-slider-value {
    font-size: 11px !important;
}
#pymnwrew-avg-label {
    font-size: 12px !important;
}
.pymnwrew-custom-form textarea {
    min-height: 120px !important;
    height: 120px !important;
    max-height: 160px !important;
    font-size: 13px !important;
    margin-bottom: 10px !important;
}

/* موبایل: همه چیز جمع و جور و فیلدها کنار هم */
@media (max-width: 768px) {
    #pymnwrew-review-popup .pymnwrew-popup-inner {
        padding: 16px 16px 1px 16px !important;
    }
    .pymnwrew-custom-form .pymnwrew-submit-section {
        margin-top: 8px !important;
        margin-bottom: 0 !important;
        width: 100%;
        display: flex;
        justify-content: center;
    }
    .pymnwrew-custom-form button {
        margin-bottom: 0 !important;
        padding: 13px 0 !important;
        font-size: 15px !important;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }
    .pymnwrew-custom-form .pymnwrew-rating-section {
        margin-bottom: 10px !important;
    }
    .pymnwrew-custom-form .pymnwrew-overall-rating {
        margin-bottom: 8px !important;
    }
    .pymnwrew-custom-form .pymnwrew-stars {
        margin-bottom: 4px !important;
    }
    .pymnwrew-custom-form .pymnwrew-comment-section {
        margin-bottom: 8px !important;
    }
    .pymnwrew-custom-form h3,
    .pymnwrew-custom-form h4 {
        font-size: 13px !important;
        margin-bottom: 7px !important;
    }
    .pymnwrew-custom-form label {
        font-size: 11px !important;
        margin-bottom: 2px !important;
    }
    .pymnwrew-custom-form .pymnwrew-user-info > div {
        flex-direction: row !important;
        gap: 6px !important;
        margin-bottom: 7px !important;
    }
    .pymnwrew-custom-form .pymnwrew-user-info > div > div {
        margin-bottom: 0 !important;
    }
    .pymnwrew-custom-form .pymnwrew-rating-item {
        margin-bottom: 5px !important;
    }
    .pymnwrew-custom-form .pymnwrew-slider-value {
        font-size: 10px !important;
    }
    #pymnwrew-avg-label {
        font-size: 11px !important;
    }
    .pymnwrew-custom-form textarea {
        min-height: 70px !important;
        height: 70px !important;
        max-height: 100px !important;
        font-size: 12px !important;
        margin-bottom: 7px !important;
    }
}