/* ==========================================================================
   Arcopet v2 · دیدگاه‌ها
   ده رشته‌ی اول نمایش داده می‌شود و بقیه با دکمه. پاسخ‌ها با خط عمودی نازک.
   ========================================================================== */

.v2-comments{ max-width:var(--v2-article); margin-inline:auto; padding-block:8px 64px; scroll-margin-top:84px; }

.v2-comments-head{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  padding-bottom:16px; border-bottom:1px solid var(--v2-border);
}
.v2-comments-title{ display:flex; align-items:center; gap:10px; margin:0; font-size:var(--v2-fs-22); font-weight:800; line-height:1.6; }
.v2-comments-count{
  display:inline-grid; place-items:center; min-width:34px; height:28px; padding-inline:10px;
  border-radius:999px; background:var(--v2-surface-subtle);
  font-size:var(--v2-fs-14); font-weight:700; color:var(--v2-text-subtle);
}
.v2-comments-closed{ margin:16px 0 0; font-size:var(--v2-fs-14); color:var(--v2-text-subtle); }

/* ---------- فرم ---------- */
.v2-respond{
  margin-top:20px; padding:18px 14px;
  background:var(--v2-surface);
  border:1px solid var(--v2-border); border-radius:var(--v2-radius-xl);
  box-shadow:var(--v2-shadow-form);
  scroll-margin-top:84px;
}
/* با جاوااسکریپت فرم بسته است تا دکمه‌ی «ارسال دیدگاه» زده شود. */
.v2-js .v2-respond:not(.is-open){ display:none; }
.v2-reply-title{
  display:flex; align-items:center; justify-content:space-between; gap:12px;
  margin:0 0 18px; font-size:var(--v2-fs-18); font-weight:700; line-height:1.7;
}
.v2-reply-title small{ font-size:var(--v2-fs-14); font-weight:500; }
#cancel-comment-reply-link{ color:var(--v2-text-subtle); text-decoration:underline; text-underline-offset:4px; }
.v2-comment-form{ display:grid; grid-template-columns:minmax(0,1fr); gap:20px; margin:0; }
.v2-comment-form > p{ margin:0; }
.v2-form-grid{ display:grid; grid-template-columns:minmax(0,1fr); gap:24px; }
.v2-field{ min-width:0; }
.v2-field label{ display:block; margin-bottom:6px; font-size:var(--v2-fs-14); font-weight:700; }
.v2-required{ color:var(--v2-text-subtle); }
.v2-field input[type="text"],
.v2-field input[type="email"],
.v2-field textarea{
  display:block; width:100%; max-width:100%; padding:10px 12px;
  background:var(--v2-surface-subtle); color:var(--v2-text);
  border:1px solid transparent; border-radius:12px;
  font:inherit; font-size:var(--v2-fs-16); line-height:1.8;
  transition:border-color .15s, background-color .15s, box-shadow .15s;
}
.v2-field textarea{ min-height:112px; resize:vertical; }
.v2-field input::placeholder, .v2-field textarea::placeholder{ color:var(--v2-text-subtle); opacity:1; }
.v2-field input:focus, .v2-field textarea:focus{
  outline:0; background:var(--v2-surface);
  border-color:var(--v2-brand); box-shadow:0 0 0 3px var(--v2-brand-ring);
}
.v2-field [aria-invalid="true"]{ border-color:var(--v2-error); }
.v2-field-error{ margin:6px 0 0; font-size:var(--v2-fs-14); line-height:1.7; color:var(--v2-error); font-weight:500; }
.v2-field-error[hidden]{ display:none; }

.v2-consent{ display:flex; align-items:flex-start; gap:10px; font-size:var(--v2-fs-14); line-height:1.8; color:var(--v2-text-subtle); }
.v2-consent input{
  appearance:none; -webkit-appearance:none; flex:none;
  width:22px; height:22px; margin:2px 0 0; cursor:pointer;
  background:var(--v2-check-bg); border:1.5px solid var(--v2-check-border); border-radius:6px;
  transition:background-color .15s, border-color .15s;
}
.v2-consent input:checked{
  background:var(--v2-brand) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center/16px no-repeat;
  border-color:var(--v2-brand);
}
.v2-consent input:focus-visible{ outline:2px solid var(--v2-brand); outline-offset:2px; }

.v2-form-submit{ display:flex; align-items:center; gap:10px; margin:0; }
.v2-form-status{ margin:0; font-size:var(--v2-fs-14); line-height:1.8; font-weight:500; }
.v2-form-status:empty{ display:none; }
.v2-logged-in-as, .must-log-in{ margin:0; font-size:var(--v2-fs-14); color:var(--v2-text-subtle); }

/* ---------- فهرست ---------- */
.v2-comment-list, .v2-comment-list .children{ list-style:none; margin:0; padding:0; }
.v2-comment-list > .v2-comment{ padding-block:12px; border-bottom:1px solid var(--v2-border); }
.v2-comment-list > .v2-comment[hidden]{ display:none; }
.v2-comment-list > .v2-comment:focus{ outline:0; }
.v2-comment-body{
  display:grid; grid-template-columns:40px minmax(0,1fr); column-gap:12px; align-items:start;
  padding:12px; border-radius:var(--v2-radius-l);
}
.v2-comment-avatar{
  display:grid; place-items:center; width:40px; height:40px; border-radius:50%; overflow:hidden; flex:none;
  background:var(--v2-avatar-bg); color:var(--v2-avatar-fg);
}
.v2-comment-avatar .v2-icon{ display:block; width:100%; height:100%; }
.v2-comment-meta{ display:flex; flex-wrap:wrap; align-items:baseline; gap:2px 10px; }
.v2-comment-author{ font-style:normal; font-weight:700; font-size:var(--v2-fs-16); line-height:1.8; }
.v2-comment-date{ font-size:var(--v2-fs-14); color:var(--v2-text-subtle); }
.v2-comment-awaiting{ margin:4px 0 0; font-size:var(--v2-fs-14); color:var(--v2-tint-text); }
.v2-comment-content{ margin-top:4px; font-size:var(--v2-fs-16); line-height:2; overflow-wrap:anywhere; }
.v2-comment-content p{ margin:0 0 .6em; }
.v2-comment-content p:last-child{ margin-bottom:0; }
.v2-comment-actions{ display:flex; align-items:center; gap:6px; margin:6px 0 0 -10px; }
.v2-like-btn, .v2-comment-actions .comment-reply-link{
  display:inline-flex; align-items:center; gap:6px; min-height:40px; padding-inline:12px;
  border-radius:999px; font-size:var(--v2-fs-14); color:var(--v2-text-subtle);
  transition:background-color .15s, color .15s;
}
.v2-like-btn:hover, .v2-comment-actions .comment-reply-link:hover{ background:var(--v2-surface-subtle); color:var(--v2-text); }
.v2-comment-actions .comment-reply-link{ font-weight:700; }
.v2-like-btn .v2-icon{ width:20px; height:20px; }
.v2-like-btn .v2-icon-fill{ opacity:0; }
.v2-like-btn[aria-pressed="true"]{ color:var(--v2-tint-text); }
.v2-like-btn[aria-pressed="true"] .v2-icon-fill{ opacity:1; }
.v2-like-count{ min-width:1ch; font-variant-numeric:tabular-nums; }

/* دیدگاه کاربران عضو (مثل تیم آرکوپت): فقط رنگ متفاوت */
.byuser > .v2-comment-body{ background:var(--v2-tint); }
.byuser > .v2-comment-body .v2-comment-avatar{ background:var(--v2-brand); color:var(--v2-on-brand); }
.byuser > .v2-comment-body .v2-comment-author{ color:var(--v2-tint-text); }
.byuser > .v2-comment-body .v2-like-btn:hover,
.byuser > .v2-comment-body .comment-reply-link:hover{ background:var(--v2-brand-soft); }

/* پاسخ‌ها: یک سطح با خط عمودی؛ سطح‌های عمیق‌تر هم‌تراز همان سطح */
.v2-comment-list .children{ margin-inline-start:20px; padding-inline-start:12px; border-inline-start:2px solid var(--v2-border); }
.v2-comment-list .children .children{ margin-inline-start:0; padding-inline-start:0; border:0; }
.v2-comment-list .children > .v2-comment{ padding-block:4px; }
.v2-comment-list .children .v2-comment-body{ grid-template-columns:32px minmax(0,1fr); column-gap:10px; padding:10px; }
.v2-comment-list .children .v2-comment-avatar{ width:32px; height:32px; }
.v2-respond.is-inline{ margin:4px 0 8px; }

/* دیدگاه‌های بیشتر */
.v2-comments-more{ display:grid; justify-items:center; gap:10px; margin-top:24px; }
.v2-comments-more[hidden]{ display:none; }
.v2-comments-progress{ margin:0; font-size:var(--v2-fs-14); color:var(--v2-text-subtle); }
.v2-more-btn{
  display:flex; align-items:center; justify-content:center; gap:8px;
  width:100%; max-width:420px; min-height:52px; padding-inline:20px; border-radius:14px;
  background:var(--v2-surface-subtle); color:var(--v2-text);
  font-weight:700; font-size:var(--v2-fs-16); transition:background-color .15s;
}
.v2-more-btn:hover{ background:var(--v2-surface-hover); }
.v2-more-count{ font-weight:500; color:var(--v2-text-subtle); }
.v2-comments-pages{ display:flex; justify-content:center; gap:8px; margin-top:20px; }
.v2-comments-pages .page-numbers{ display:inline-grid; place-items:center; min-width:40px; height:40px; padding-inline:10px; border-radius:var(--v2-radius-s); background:var(--v2-surface-subtle); }
.v2-comments-pages .current{ background:var(--v2-brand); color:var(--v2-on-brand); }

@media (min-width:768px){
  .v2-respond{ padding:24px; }
  .v2-form-grid{ grid-template-columns:minmax(0,1fr) minmax(0,1fr); gap:28px; }
  .v2-comment-body{ grid-template-columns:48px minmax(0,1fr); column-gap:16px; padding:16px; }
  .v2-comment-avatar{ width:48px; height:48px; }
  .v2-comment-list .children{ margin-inline-start:32px; padding-inline-start:20px; }
  .v2-comment-list .children .v2-comment-body{ grid-template-columns:40px minmax(0,1fr); column-gap:12px; padding:14px; }
  .v2-comment-list .children .v2-comment-avatar{ width:40px; height:40px; }
}

/* موبایل: دکمه‌ی رفتن به بالا هنگام باز بودن فرم پنهان می‌شود */
@media (max-width:991px){
  .v2-comment-form-open .v2-to-top{ opacity:0!important; visibility:hidden!important; }
}
