/* ================================================================
   استایل تکمیلی تالار گفتگو
   ----------------------------------------------------------------
   چرا لازم است — دو دلیل، و دومی مهم‌تر است:

   ۱. app.css با Tailwind JIT از روی قالب‌های زمان بیلد ساخته شده،
      پس چند کلاسی که این بخش تازه معرفی می‌کند قاعده‌ای ندارند.

   ۲. کلاس‌های نشان وضعیت از یک آرایهٔ PHP می‌آیند و کلاس‌های رأی
      «مفید بود» را جاوااسکریپت هنگام اجرا اضافه می‌کند. این‌ها هرگز
      به‌صورت متن در سورس نیستند، پس Tailwind **حتی با بیلد مجدد هم**
      نمی‌سازدشان. اینجا صریح تعریف شده‌اند.

   همهٔ رنگ‌ها از توکن‌های موجود می‌آیند؛ هیچ رنگ خامی نوشته نشده.
   ================================================================ */

/* --- ته‌رنگ وضعیت (پویا از PHP و JS) --- */
/* اگر بستهٔ دوره‌ها هم نصب باشد این دو تکراری می‌شوند؛ مقدار یکی است. */
.jj-tint-ok   { background-color: rgb(var(--c-ok) / .10); }
.jj-tint-warn { background-color: rgb(var(--c-warn) / .10); }

/* --- ابزارهای پایه‌ای که در بیلد فعلی نیستند --- */
.jj-forum-scope .mt-auto     { margin-top: auto; }
.jj-forum-scope .h-px        { height: 1px; }
.jj-forum-scope .first\:pt-0:first-child { padding-top: 0; }
.jj-forum-scope .last\:pb-0:last-child   { padding-bottom: 0; }
.jj-forum-scope .text-on-surface-variant\/50 { color: rgb(var(--c-ink-3) / .5); }

/* --- حاشیهٔ پاسخ تودرتو --- */
.jj-forum-scope .border-r-primary\/30 { border-right-color: rgb(var(--c-primary) / .30); }

/* --- گرادیان جداکنندهٔ جمع‌بندی --- */
.jj-forum-scope .from-transparent   { --tw-gradient-from: transparent; }
.jj-forum-scope .to-primary\/40     { --tw-gradient-to: rgb(var(--c-primary) / .40); }
.jj-forum-scope .to-secondary\/5    { --tw-gradient-to: rgb(var(--c-secondary) / .05); }

/* --- تیتر بنر در دسکتاپ --- */
@media (min-width: 768px) {
  .jj-forum-scope .md\:text-headline-lg {
    font-size: 2.25rem;
    line-height: 1.25;
  }
}

/* ================================================================
   بلوک جمع‌بندی استاد
   ----------------------------------------------------------------
   این بلوک باید در نگاه اول از بقیهٔ پاسخ‌ها متمایز باشد؛ چون
   نتیجهٔ مباحثه است نه یکی از نظرها.
   ================================================================ */
.jj-forum-scope #verdict article {
  position: relative;
}

.jj-forum-scope #verdict article::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: linear-gradient(to bottom, rgb(var(--c-primary)), rgb(var(--c-secondary)));
}

/* ================================================================
   متن استنادها
   ----------------------------------------------------------------
   متن عربی آیه و روایت به فاصلهٔ سطر بازتر و اندازهٔ کمی بزرگ‌تر
   نیاز دارد تا اعراب خوانا بماند.
   ================================================================ */
.jj-forum-scope .jj-cite-text {
  line-height: 2.2;
  font-size: 1.0625rem;
  text-align: justify;
}

/* ================================================================
   فرم دیدگاه وردپرس
   ----------------------------------------------------------------
   comment_form() نشانه‌گذاری خودش را دارد؛ اینجا با ظاهر قالب
   هماهنگ می‌شود بدون اینکه فرم دست‌ساز بنویسیم و قلاب‌های
   ضدهرزنامه را از دست بدهیم.
   ================================================================ */
.jj-forum-scope #respond .comment-reply-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}

.jj-forum-scope #respond .comment-reply-title small a {
  font-size: .8125rem;
  font-weight: 400;
  color: rgb(var(--c-ink-3));
  text-decoration: underline;
}

.jj-forum-scope #respond .form-submit {
  margin: 0;
}

.jj-forum-scope #respond .logged-in-as {
  font-size: .8125rem;
  color: rgb(var(--c-ink-2));
  margin: 0;
}

.jj-forum-scope #respond textarea:focus {
  outline: none;
}

/* ================================================================
   دسترس‌پذیری
   ================================================================ */
.jj-forum-scope .jj-helpful-btn[aria-pressed="true"] .material-symbols-outlined {
  font-variation-settings: 'FILL' 1;
}

.jj-forum-scope button:disabled {
  opacity: .55;
  cursor: wait;
}

/* ================================================================
   اقدام‌های دیدگاه (ویرایش، حذف و نقل‌قول)
   ================================================================ */
.jj-forum-scope .jj-comment-action-btn {
  display: inline-flex;
  align-items: center;
  gap: .25rem;
  font-size: .8125rem;
  line-height: 1.25rem;
  cursor: pointer;
  transition: all .15s ease;
}

.jj-forum-scope .jj-comment-action-btn:disabled {
  opacity: .5;
  cursor: wait;
}

.jj-forum-scope .text-ink-muted {
  color: rgb(var(--c-ink-3) / .7);
}

.jj-forum-scope .jj-quote-box {
  background-color: rgb(var(--c-surface-container-high) / .6);
}

/* در چاپ، اقدام‌ها و ستون کناری لازم نیستند. */
@media print {
  .jj-forum-scope aside,
  .jj-forum-scope #respond,
  .jj-forum-scope .jj-helpful-btn,
  .jj-forum-scope .jj-reply-btn,
  .jj-forum-scope .jj-verdict-btn,
  .jj-forum-scope .jj-comment-action-btn,
  .jj-forum-scope .jj-edit-form {
    display: none;
  }
}

