/**
 * Copyright since 2007 PrestaShop SA and Contributors
 * PrestaShop is an International Registered Trademark & Property of PrestaShop SA
 *
 * NOTICE OF LICENSE
 *
 * This source file is subject to the Academic Free License 3.0 (AFL-3.0)
 * that is bundled with this package in the file LICENSE.md.
 * It is also available through the world-wide-web at this URL:
 * https://opensource.org/licenses/AFL-3.0
 * If you did not receive a copy of the license and are unable to
 * obtain it through the world-wide-web, please send an email
 * to license@prestashop.com so we can send you a copy immediately.
 *
 * DISCLAIMER
 *
 * Do not edit or add to this file if you wish to upgrade PrestaShop to newer
 * versions in the future. If you wish to customize PrestaShop for your
 * needs please refer to https://devdocs.prestashop.com/ for more information.
 *
 * @author    PrestaShop SA and Contributors <contact@prestashop.com>
 * @copyright Since 2007 PrestaShop SA and Contributors
 * @license   https://opensource.org/licenses/AFL-3.0 Academic Free License 3.0 (AFL-3.0)
 */

/**
 *  استایل مدرن و مینیمال نظرات محصول - راست چین
 *  رنگ‌بندی: خاکستری و آبی
 */

/* تنظیمات اصلی راست‌چین */
body {
  direction: rtl;
  text-align: right;
}

.product-comment-modal .material-icons[data-icon]:before,
.product-comment-list-item .material-icons[data-icon]:before,
.product-comments-additional-info .material-icons[data-icon]:before,
#product-comments-list-header .material-icons[data-icon]:before,
#product-comments-list-footer .material-icons[data-icon]:before {
  content: attr(data-icon);
}

/* دکمه‌های مدرن با رنگ آبی و خاکستری */
.btn-comment,
.btn-comment-inverse {
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
  color: #ffffff;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
  padding: 10px 20px;
  border: none;
  transition: all 0.3s ease;
  cursor: pointer;
}

.btn-comment .material-icons,
.btn-comment-inverse .material-icons {
  font-size: 20px;
  margin-left: 8px;
  margin-right: 0;
}

.btn-comment:hover {
  background: linear-gradient(135deg, #357ABD 0%, #2868A8 100%);
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.35);
  transform: translateY(-1px);
}

.btn-comment-inverse {
  background: #ffffff;
  color: #5A6C7D;
  border: 1.5px solid #E1E8ED;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
}

.btn-comment-inverse:hover {
  background: #F7F9FA;
  border-color: #4A90E2;
  color: #4A90E2;
}

.btn-comment-big {
  padding: 14px 24px;
  height: 48px;
  font-size: 15px;
}

.btn-comment-huge {
  padding: 16px 32px;
  height: 52px;
  font-size: 16px;
}

.link-comment {
  color: #4A90E2;
  text-decoration: none;
  transition: color 0.2s ease;
}

.link-comment:hover,
.link-comment:active {
  color: #357ABD;
  text-decoration: none;
}

/**
 * اطلاعات اضافی محصول - استایل دیجی‌کالا
 */
.product-comments-additional-info {
  margin: 24px 0;
  font-weight: 400;
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  font-size: 14px;
  color: #5A6C7D;
  gap: 16px;
}

.product-comments-additional-info .link-comment.post-product-comment {
  border: none;
  padding: 12px 24px;
  margin: 0;
  background: #4A90E2;
  color: #ffffff;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(74, 144, 226, 0.25);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.product-comments-additional-info .link-comment.post-product-comment:hover {
  background: #357ABD;
  box-shadow: 0 4px 12px rgba(74, 144, 226, 0.35);
  transform: translateY(-1px);
  text-decoration: none;
}

.product-comments-additional-info .comments-note {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  color: #333;
  font-weight: 500;
}

/**
 *  مودال نظر مدرن
 */
.product-comment-modal .modal-header {
  border: none;
  padding: 32px 32px 16px;
  background: #F7F9FA;
}

.product-comment-modal .modal-body {
  padding: 24px 32px 32px;
  background: #ffffff;
}

.product-comment-modal .modal-header .h2 {
  float: right;
  font-size: 22px;
  font-weight: 600;
  color: #2C3E50;
}

.product-comment-modal .modal-dialog {
  width: calc(100% - 30px);
  max-width: 774px;
  border-radius: 12px;
  overflow: hidden;
}

.product-comment-modal .modal-dialog .h3 {
  font-size: 15px;
  color: #5A6C7D;
}

.product-comment-modal .modal-dialog .product-flag {
  display: none;
}

.product-comment-modal .modal-dialog .product-cover,
.product-comment-modal .modal-dialog .product-cover img {
  width: 99px;
  height: 99px;
  border-radius: 8px;
}

.product-comment-modal label.form-label {
  font-size: 15px;
  font-weight: 500;
  margin: 12px 0 8px;
  color: #2C3E50;
}

.product-comment-modal input {
  width: 100%;
  height: 46px;
  border: 1.5px solid #E1E8ED;
  border-radius: 8px;
  padding: 0 16px;
  font-size: 14px;
  transition: border-color 0.2s ease;
  background: #FAFBFC;
}

.product-comment-modal input:focus {
  border-color: #4A90E2;
  outline: none;
  background: #ffffff;
}

.product-comment-modal textarea {
  width: 100%;
  min-height: 100px;
  border: 1.5px solid #E1E8ED;
  border-radius: 8px;
  margin-bottom: 12px;
  padding: 14px 16px;
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s ease;
  background: #FAFBFC;
  resize: vertical;
}

.product-comment-modal textarea:focus {
  border-color: #4A90E2;
  outline: none;
  background: #ffffff;
}

.product-comment-modal .btn-comment,
.product-comment-modal .btn-comment-inverse {
  font-size: 15px;
  line-height: 18px;
  font-weight: 500;
}

.product-comment-modal .required {
  font-size: 12px;
  margin-right: 6px;
  margin-left: 0;
  color: #E74C3C;
}

.product-comment-modal .post-comment-buttons {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

.product-comment-modal .post-comment-buttons .btn-comment {
  margin-right: 12px;
  margin-left: 0;
}

#product-comment-posted-modal .post-comment-buttons,
#product-comment-post-error .post-comment-buttons,
#update-comment-usefulness-post-error .post-comment-buttons {
  margin-top: 30px;
}

.modal-header .material-icons {
  color: #27AE60;
  font-size: 32px;
  line-height: 28px;
}

.modal-header .material-icons.error {
  color: #E74C3C;
}

.modal-header .material-icons.feedback {
  color: #F39C12;
}

/**
 *  ستاره‌های مدرن
 */
.star-content {
  margin: 0 5px 0 0;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
}

.star-content div.star,
.star-content div.star-on,
.star-content div.star-hover {
  display: block;
  width: 20px;
  height: 20px;
  background: url(../img/stars.png) no-repeat 0 0 transparent;
  flex: auto;
  margin-right: 3px;
  margin-left: 0;
}

.star-content div.star-on,
.star-content div.star-hover {
  background-position: -24px 0;
}

.small-stars .star-content div.star,
.small-stars .star-content div.star-on,
.small-stars .star-content div.star-hover {
  background: url(../img/small_stars.png) no-repeat 0 0 transparent;
  width: 16px;
  height: 16px;
  margin-right: 2px;
  margin-left: 0;
}

.small-stars .star-content div.star-on,
.small-stars .star-content div.star-hover {
  background-position: -19px 0;
}

.star-content div.star-hover {
  cursor: pointer;
}

.grade-stars {
  position: relative;
  height: 20px;
  min-width: 120px;
  display: inline-block;
}

.grade-stars.small-stars {
  min-width: 100px;
}

.grade-stars .star-content {
  position: absolute;
  top: 3px;
  right: 0;
  left: auto;
}

.criterion-rating .grade-stars .star-content {
  top: 0;
}

#post-product-comment-modal .star-content div.star a {
  display: block;
  position: absolute;
  text-indent: -5000px;
}

#post-product-comment-modal .criterion-rating {
  display: flex;
  flex-direction: row;
  justify-content: flex-start;
}

#post-product-comment-modal .criterion-rating label {
  color: #2C3E50;
  font-size: 14px;
  font-weight: 500;
}

#ratingNotChosen {
  font-size: 13px;
  color: #E74C3C;
  text-align: right;
}

#post-product-comment-form input.error,
#post-product-comment-form textarea.error {
  background-color: #FFEBEE;
  border: 1.5px solid #E74C3C;
}

#post-product-comment-form input.valid,
#post-product-comment-form textarea.valid {
  border: 1.5px solid #27AE60;
  background-color: #F1F8F4;
}

/**
 *  لیست نظرات مدرن
 */
#product-comments-list-header {
  padding: 24px 20px;
  color: #1a1a1a;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  justify-content: space-between;
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  margin-bottom: 20px;
}

#product-comments-list-header .comments-nb {
  padding-right: 0;
  padding-left: 0;
  padding-top: 3px;
  font-weight: 600;
  font-size: 16px;
}

#product-comments-list-header .comments-nb .material-icons {
  margin-left: 6px;
  margin-right: 0;
}

#product-comments-list .btn-comment {
  margin: 0 auto;
  display: block;
}

/* کارت نظر مدرن و مینیمال */
.product-comment-list-item {
  padding: 24px;
  margin: 0 0 20px;
  background-color: #ffffff;
  text-align: right;
  border-radius: 16px;
  border: none;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
  position: relative;
}

.product-comment-list-item:hover {
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

#empty-product-comment {
  text-align: center;
  padding: 60px 20px;
  color: #8A9BA8;
}

.product-comment-list-item .grade-stars .star-content {
  margin: 0 0 12px;
}

.product-comment-list-item .comment-infos {
  height: auto;
  color: #7a7a7a;
  font-size: 13px;
  line-height: 1.6;
  min-height: auto;
  padding-bottom: 16px;
  border-bottom: 1px solid #f0f0f0;
  margin-bottom: 16px;
}

.product-comment-list-item .comment-infos .grade-stars {
  margin-bottom: 12px;
}

.product-comment-list-item .comment-infos .comment-date {
  margin-bottom: 6px;
  font-size: 13px;
  color: #999;
}

.product-comment-list-item .comment-infos .comment-author {
  font-weight: 600;
  color: #333;
  font-size: 14px;
}

.product-comment-list-item .comment-content .h4 {
  height: auto;
  color: #1a1a1a;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.4;
  margin-bottom: 14px;
}

.product-comment-list-item .comment-content p {
  color: #4a4a4a;
  font-size: 15px;
  line-height: 1.8;
  word-break: break-word;
  white-space: pre-wrap;
  margin-bottom: 20px;
}

.product-comment-list-item .comment-content .comment-buttons {
  display: flex;
  gap: 20px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid #f5f5f5;
}

.product-comment-list-item .comment-content .comment-buttons a {
  color: #666;
  font-size: 14px;
  line-height: 1.5;
  margin-right: 0;
  margin-left: 0;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: 20px;
  background: #f8f9fa;
}

.product-comment-list-item .comment-content .comment-buttons a:hover {
  color: #4A90E2;
  background: #e8f4ff;
}

.product-comment-list-item .comment-content .comment-buttons a .material-icons {
  font-size: 18px;
  cursor: pointer;
}

/*
** استایل نمای سریع
*/
.product-quickview-review {
  display: flex;
  flex-direction: row-reverse;
}

.product-quickview-review .grade-stars .star-content {
  margin: 0;
  top: 0;
}

/*
** بازنویسی لیست محصولات
*/
#products .thumbnail-container.has-reviews:hover .highlighted-informations,
#products .thumbnail-container.has-reviews:focus .highlighted-informations,
.featured-products .thumbnail-container.has-reviews:hover .highlighted-informations,
.featured-products .thumbnail-container.has-reviews:focus .highlighted-informations,
.product-accessories .thumbnail-container.has-reviews:hover .highlighted-informations,
.product-miniature .thumbnail-container.has-reviews:hover .highlighted-informations,
.product-miniature .thumbnail-container.has-reviews:focus .highlighted-informations {
  height: 4.5rem;
}

#products .thumbnail-container.has-reviews:hover .highlighted-informations .variant-links,
#products .thumbnail-container.has-reviews:focus .highlighted-informations .variant-links,
.featured-products .thumbnail-container.has-reviews:hover .highlighted-informations .variant-links,
.featured-products .thumbnail-container.has-reviews:focus .highlighted-informations .variant-links,
.product-accessories .thumbnail-container.has-reviews:hover .highlighted-informations .variant-links,
.product-miniature .thumbnail-container.has-reviews:hover .highlighted-informations .variant-links,
.product-miniature .thumbnail-container.has-reviews:focus .highlighted-informations .variant-links {
  min-height: 3.7rem;
}

#products .thumbnail-container.has-reviews:hover .highlighted-informations.no-variants,
#products .thumbnail-container.has-reviews:focus .highlighted-informations.no-variants,
.featured-products .thumbnail-container.has-reviews:hover .highlighted-informations.no-variants,
.featured-products .thumbnail-container.has-reviews:focus .highlighted-informations.no-variants,
.product-accessories .thumbnail-container.has-reviews:hover .highlighted-informations.no-variants,
.product-miniature .thumbnail-container.has-reviews:hover .highlighted-informations.no-variants,
.product-miniature .thumbnail-container.has-reviews:focus .highlighted-informations.no-variants {
  height: 4.125rem;
}

#products .product-miniature .thumbnail-container.has-reviews .discount-amount.online-only,
#products .product-miniature .thumbnail-container.has-reviews .discount-percentage.online-only,
#products .product-miniature .thumbnail-container.has-reviews .on-sale.online-only,
#products .product-miniature .thumbnail-container.has-reviews .online-only.online-only,
#products .product-miniature .thumbnail-container.has-reviews .pack.online-only,
#products .product-miniature .thumbnail-container.has-reviews .product-flags .new.online-only,
.featured-products .product-miniature .thumbnail-container.has-reviews .discount-amount.online-only,
.featured-products .product-miniature .thumbnail-container.has-reviews .discount-percentage.online-only,
.featured-products .product-miniature .thumbnail-container.has-reviews .on-sale.online-only,
.featured-products .product-miniature .thumbnail-container.has-reviews .online-only.online-only,
.featured-products .product-miniature .thumbnail-container.has-reviews .pack.online-only,
.featured-products .product-miniature .thumbnail-container.has-reviews .product-flags .new.online-only,
.product-accessories .product-miniature .thumbnail-container.has-reviews .discount-amount.online-only,
.product-accessories .product-miniature .thumbnail-container.has-reviews .discount-percentage.online-only,
.product-accessories .product-miniature .thumbnail-container.has-reviews .on-sale.online-only,
.product-accessories .product-miniature .thumbnail-container.has-reviews .online-only.online-only,
.product-accessories .product-miniature .thumbnail-container.has-reviews .pack.online-only,
.product-accessories .product-miniature .thumbnail-container.has-reviews .product-flags .new.online-only {
  top: 11.5rem;
}

.product-list-reviews {
  position: absolute;
  top: -26px;
  right: 0;
  left: auto;
  display: flex;
  flex-direction: row-reverse;
  flex-wrap: nowrap;
  justify-content: center;
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
  padding: 6px 0;
  visibility: hidden;
  border-radius: 8px 8px 0 0;
}

.product-list-reviews .grade-stars .star-content {
  top: 1px;
}

.product-list-reviews .comments-nb {
  margin-right: 8px;
  margin-left: 0;
  font-size: 13px;
  color: #5A6C7D;
}

/* صفحه‌بندی مدرن */
@media (min-width: 960px) {
  #product-comments-list-footer {
    position: relative;
    min-height: 52px;
    padding: 20px 0;
  }

  #product-comments-list-footer .post-product-comment {
    margin: 0 auto;
    display: block;
  }

  #product-comments-list-pagination {
    position: absolute;
    left: 0;
    right: auto;
    top: 20px;
  }
}

@media (max-width: 960px) {
  #product-comments-list-footer {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 20px 0;
  }
}

@media (max-width: 768px) {
  #product-comments-list-footer {
    display: flex;
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: center;
  }

  #product-comments-list-pagination {
    margin-bottom: 16px;
  }
}

#product-comments-list-pagination {
  height: 38px;
}

#product-comments-list-pagination ul {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 6px;
}

#product-comments-list-pagination ul li span {
  height: 38px;
  min-width: 38px;
  padding: 0 10px;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 15px;
  font-weight: 500;
  color: #5A6C7D;
  border-radius: 8px;
  background: #F7F9FA;
  border: 1px solid #E1E8ED;
  transition: all 0.2s ease;
}

#product-comments-list-pagination ul li span:hover {
  background: #4A90E2;
  color: #ffffff;
  border-color: #4A90E2;
}

#product-comments-list-pagination ul li.active span {
  background: #4A90E2;
  color: #ffffff;
  border-color: #4A90E2;
  cursor: default;
}

#product-comments-list-pagination ul li span.next i,
#product-comments-list-pagination ul li span.prev i {
  font-weight: 600;
}

#product-comments-list-pagination ul li.disabled span {
  opacity: 0.4;
  cursor: not-allowed;
  background: #F7F9FA;
  color: #8A9BA8;
}

#product-comments-list-pagination ul li.disabled span:hover {
  background: #F7F9FA;
  color: #8A9BA8;
  border-color: #E1E8ED;
}

#product-comments-list-pagination ul li.hidden {
  display: none;
}




.main-commnetbox {
    display: flex;
    flex-direction: row;
    gap: 16px;
    align-items: flex-start;
}

div#product-comments-list {
    width: 100%;
}
div#product-comments-list-header {
    display: flex;
    flex-direction: column;
    gap: 20px;
}
.main-commnetbox:has(div#empty-product-comment) {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.main-commnetbox:has(div#empty-product-comment) div#product-comments-list-header {
    width: 100%;
}
.main-commnetbox:has(div#empty-product-comment) div#empty-product-comment {
    width: 100%;
}