/* ========= PYM Comments (thread wrapper approach) ========= */

.comments-area-pym {
  margin: 10px 10px 20px;
  direction: rtl;
  font-family: inherit;
  color: #222230;
}

/* Normalize inside scope */
.comments-area-pym ol,
.comments-area-pym ul { margin: 0; padding: 0; list-style: none; }
.comments-area-pym p { margin: 0; }

/* Header (بدون border-bottom) */
.comments-area-pym .comments-header-pym {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 24px; padding-bottom: 0;
}
.comments-area-pym .comments-title-pym {
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 600; line-height: 32px; margin: 0; color: #222230;
}
.comments-area-pym .comments-title-pym .comments-count-pym {
  color: #8d8d8d; font-weight: 600; font-size: 14px;
  border: 1px solid #E7E7E7;
  width: 20px; height: 20px; display: inline-flex; justify-content: center; align-items: center;
  border-radius: 50%; line-height: 20px; align-self: center;
}
.comments-area-pym .add-comment-pym {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff !important;
  border-radius: 8px;
  padding: 8px 16px;
  text-decoration: none;
  background-color: #F46F27 !important;
}
.comments-area-pym .add-comment-pym .plus { font-weight: 500; font-size: 20px; }

/* List & items */
.comments-area-pym .comment-list-pym { display: grid; gap: 20px; }
.comments-area-pym .comment-item-pym { margin: 0; }

/* --- کاور مشترک ترد --- */
.comments-area-pym .comment-thread-pym {
  /* پیش‌فرض (بدون پاسخ): بدون بردر */
  position: relative;
  padding: 0; /* وقتی پاسخ ندارد، padding نده تا فضا نگیرد */
}

/* فقط وقتی پاسخ دارد: بردر دور کل ترد (والد + children) */
.comments-area-pym .comment-thread-pym.has-children {
  border: 1px solid #E7E7E7;
  border-radius: 8px;
  padding: 12px;              /* فاصله قاب بیرونی از محتوا (والد + children) */
}

/* بدنه هر کامنت (والد و پاسخ‌ها) */
.comments-area-pym .comment-body-pym {
  display: grid; grid-template-columns: 1fr; gap: 0;
  background: #F5F5F5;
  border-radius: 8px;
  padding: 24px;
}

/* لیست پاسخ‌ها (داخل همان کاور) */
.comments-area-pym .children {
  margin-top: 12px;
  padding-right: 0;          /* اگر تورفتگی خواستی، اینجا بده */
  display: grid; gap: 12px;
  border-right:none !important;
}

/* Header row inside a comment item */
.comments-area-pym .comment-main-pym { display: grid; gap: 10px; }
.comments-area-pym .comment-header-pym { display: flex; align-items: center; gap: 8px; }
.comments-area-pym .comment-author-pym { font-weight: 700; color: #222230; }
.comments-area-pym .comment-badge-pym {
  font-size: 12px; font-weight: 400; color: #fff;
  background: #222230; padding: 6px 10px; border-radius: 8px;
}
.comments-area-pym .comment-date-pym {
  color: #989898; font-size: 12px; position: relative; padding-right: 22px;
}
.comments-area-pym .comment-date-pym::before {
  content: ""; width: 16px; height: 16px; display: inline-block;
  position: absolute; right: 0; top: 50%; transform: translateY(-50%);
  background: url('https://deniro.seoamoozan.ir/wp-content/uploads/2025/08/clock-hour-1.svg') no-repeat center/16px 16px;
}

/* Text */
.comments-area-pym .comment-text-pym { line-height: 2.0; color: #222230; }

/* Footer / actions */
.comments-area-pym .comment-footer-pym {
  display: flex; align-items: center; justify-content: flex-start; margin-top: 6px;
}
.comments-area-pym .comment-actions-pym { display: flex; align-items: center; gap: 12px; }
.comments-area-pym .comment-actions-pym a { text-decoration: none; }

/* Reply button */
.comments-area-pym .comment-actions-pym .comment-reply-link {
  color: #8B8B8B; font-size: 14px; font-weight: 500; line-height: 32px;
  background: none; padding: 0; display: inline-flex; align-items: center; gap: 8px;
}
.comments-area-pym .comment-actions-pym .comment-reply-link::before {
  content: ""; width: 20px; height: 20px; display: inline-block;
  background: url('https://deniro.seoamoozan.ir/wp-content/uploads/2025/08/corner-down-left.svg') no-repeat center/20px 20px;
}

/* فرم */
.comment-form-comment { margin: 10px 0 14px !important; }
.comments-area-pym .reply-title-pym { font-size: 18px; margin: 28px 0 14px; color: #222230; }
.comments-area-pym .comment-form-comment textarea {
  width: 100%; min-height: 150px; padding: 14px 16px; border-radius: 16px;
  border: 1px solid #E7E7E7; background: #f4f4f4;
}
.comments-area-pym .comment-form-author input,
.comments-area-pym .comment-form-email input {
  width: 100%; padding: 12px 14px; border-radius: 12px;
  border: 1px solid #e5e7eb; background: #fafafa;
}
.comments-area-pym .submit-btn-pym {
  background: #111827; color: #fff; padding: 10px 16px; border-radius: 12px; border: 0; cursor: pointer;
}
.comments-area-pym .submit-btn-pym:hover { background: #000; }

/* Fields row */
.comments-area-pym .pym-fields-row { display: flex; gap: 15px; margin-bottom: 15px; }
.comments-area-pym .pym-fields-row .comment-form-author,
.comments-area-pym .pym-fields-row .comment-form-email { flex: 1; margin: 0; }
.comments-area-pym p.comment-form-cookies-consent { display: flex; gap: 5px; }
.comments-area-pym p.form-submit { margin-top: 30px; }
.comments-area-pym span.required-field-message { display: none; }

/* Mobile */
@media (max-width: 640px) {
  .comments-area-pym .pym-fields-row { flex-direction: column; gap: 12px; }
}

/* فاصله‌ی پاسخ‌ها از والد (فقط وقتی children هست) */
.comments-area-pym .comment-thread-pym > .children {
  margin-top: 20px !important;
}



