/* =========================================================
   MishiLand Reviews v1 — نظرات دیجی‌کالا-استایل + FOMO واقعی
   Scope: فقط body.single-product یا کلاس‌های .ml- — هیچ سلکتور
   عمومی ووکامرس/وودمارت خارج از این صفحه دستکاری نمی‌شود. رنگ‌ها/
   شعاع‌ها هم‌خانواده product-v15 هستند تا سایت یکدست بماند.
   ========================================================= */

body.single-product {
  --mlr-ink: #171b23;
  --mlr-muted: #8a93a3;
  --mlr-line: #ece6de;
  --mlr-green: #1f8a4c;
  --mlr-green-tint: #edf9f1;
  --mlr-red: #c0392b;
  --mlr-red-tint: #fdecea;
  --mlr-brand: #c1743c;
  --mlr-radius-md: 14px;
}

/* ---------- بج خریدار تأییدشده ---------- */
.ml-verified-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-bottom: 8px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--mlr-green-tint, #edf9f1);
  color: var(--mlr-green, #1f8a4c);
  font-size: 11px;
  font-weight: 800;
}

/* ---------- Pros / Cons ---------- */
.ml-pros-cons {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.ml-pros-list,
.ml-cons-list {
  margin: 0;
  padding-inline-start: 18px;
  font-size: 12.5px;
  line-height: 1.8;
}
.ml-pros-list li {
  color: var(--mlr-green, #1f8a4c);
}
.ml-cons-list li {
  color: var(--mlr-red, #c0392b);
}
.ml-recommend-badge {
  display: inline-block;
  margin-top: 8px;
  font-size: 12px;
  font-weight: 700;
  color: var(--mlr-brand, #c1743c);
}

/* ---------- فیلدهای فرم نظر ---------- */
body.single-product #commentform .comment-form-ml-pros textarea,
body.single-product #commentform .comment-form-ml-cons textarea {
  width: 100%;
  min-height: 60px;
  border: 1px solid var(--mlr-line, #ece6de);
  border-radius: 12px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 13px;
}
body.single-product #commentform .ml-optional {
  font-weight: 400;
  color: var(--mlr-muted, #8a93a3);
  font-size: 11px;
}
body.single-product #commentform .ml-char-hint {
  display: block;
  margin-top: 3px;
  font-size: 10.5px;
  color: var(--mlr-muted, #8a93a3);
}
body.single-product #commentform .comment-form-ml-recommend label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  min-height: 48px; /* حداقل ناحیه لمسی */
}
body.single-product #commentform .comment-form-ml-recommend input[type="checkbox"] {
  width: 20px;
  height: 20px;
  accent-color: var(--mlr-brand, #c1743c);
}

/* ---------- باکس خلاصه امتیاز ---------- */
.ml-review-summary {
  margin: 16px 0;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--mlr-line, #ece6de);
  border-radius: var(--mlr-radius-md, 14px);
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}
.ml-review-summary__row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
  font-size: 12px;
}
.ml-review-summary__star-label {
  flex: 0 0 52px;
  color: var(--mlr-muted, #8a93a3);
}
.ml-review-summary__bar {
  flex: 1 1 auto;
  height: 8px;
  border-radius: 999px;
  background: #f1eee8;
  overflow: hidden;
  display: block;
}
.ml-review-summary__bar span {
  display: block;
  height: 100%;
  background: var(--mlr-brand, #c1743c);
  border-radius: 999px;
}
.ml-review-summary__count {
  flex: 0 0 24px;
  text-align: end;
  color: var(--mlr-muted, #8a93a3);
  font-size: 11px;
}
.ml-review-summary__recommend {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--mlr-line, #ece6de);
  font-size: 12.5px;
  color: var(--mlr-ink, #171b23);
}
.ml-review-summary__recommend strong {
  color: var(--mlr-green, #1f8a4c);
  font-size: 15px;
}

/* ---------- هشدار موجودی کم / بج فروش اخیر ----------
   ارتفاع ثابت از پیش تعیین شده تا هیچ CLS (Cumulative Layout
   Shift) ایجاد نشود؛ هر دو Inline-flex با آیکون هم‌سایز. */
.ml-low-stock,
.ml-recent-sales {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 6px 8px 6px 0;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.ml-low-stock svg,
.ml-recent-sales svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.ml-low-stock {
  background: var(--mlr-red-tint, #fdecea);
  color: var(--mlr-red, #c0392b);
}
.ml-recent-sales {
  background: var(--mlr-green-tint, #edf9f1);
  color: var(--mlr-green, #1f8a4c);
}

/* ---------- انیمیشن نقطه‌ی چشمک‌زن (برای استفاده‌های آینده) ---------- */
.ml-pulse-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--mlr-red, #c0392b);
  flex: 0 0 auto;
}
@media (prefers-reduced-motion: no-preference) {
  .ml-pulse-dot {
    animation: mlPulseDot 1.6s ease-in-out infinite;
  }
}
@keyframes mlPulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.75); }
}

/* ---------- موبایل ---------- */
@media (max-width: 480px) {
  .ml-low-stock,
  .ml-recent-sales {
    display: flex;
    width: 100%;
  }
}
