/* 
Theme Name: Hello Elementor Child
Theme URI: https://github.com/elementor/hello-theme-child/
Description: Hello Elementor Child is a child theme of Hello Elementor, created by Elementor team
Author: Elementor Team
Author URI: https://elementor.com/
Template: hello-elementor
Version: 2.0.0
Text Domain: hello-elementor-child
License: GNU General Public License v3 or later.
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Tags: flexible-header, custom-colors, custom-menu, custom-logo, editor-style, featured-images, rtl-language-support, threaded-comments, translation-ready
*/

/* Add your custom styles here */

/* ===== تنظیمات کلی بخش نظرات ===== */
#comments {
  margin: 3rem auto;
  padding: 2rem;
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
  border: 1px solid rgba(148, 163, 184, 0.35);
}

/* عنوان بخش نظرات */
#comments h2,
#reply-title {
  font-size: 1.6rem;
  margin-bottom: 1.5rem;
  font-weight: 700;
  color: #0f172a;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

#comments h2::before,
#reply-title::before {
  content: "";
  width: 6px;
  height: 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #6366f1, #ec4899);
}

/* متن توضیحی زیر عنوان (در صورت وجود) */
#comments > p {
  color: #64748b;
  font-size: 0.95rem;
}

/* ===== لیست نظرات ===== */
.commentlist,
#comments ol.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

/* هر آیتم نظر */
.commentlist > li,
#comments ol.comment-list > li.comment {
  margin-bottom: 1.25rem;
}

/* باکس اصلی هر نظر */
.comment-body {
  position: relative;
  padding: 1.2rem 1.3rem 1.1rem;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid rgba(148, 163, 184, 0.35);
  transition: all 0.2s ease;
}

.comment-body:hover {
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.14);
  transform: translateY(-1px);
  background: #ffffff;
}

/* نظرات نویسنده سایت (author) */
.bypostauthor > .comment-body {
  border: 1px solid rgba(56, 189, 248, 0.8);
  background: linear-gradient(135deg, #ecfeff, #fdf2ff);
}

/* آواتار */
.comment-author .avatar {
  float: right; /* راست‌چین برای فارسی */
  margin-left: 0.9rem;
  border-radius: 999px;
  width: 44px;
  height: 44px;
  border: 2px solid #e2e8f0;
}

/* نام نویسنده نظر */
.comment-author .fn {
  font-weight: 600;
  color: #0f172a;
  font-size: 0.98rem;
}

.comment-author .fn a {
  color: inherit;
  text-decoration: none;
}

.comment-author .fn a:hover {
  text-decoration: underline;
}

/* متای نظر (تاریخ و لینک) */
.comment-meta {
  font-size: 0.8rem;
  color: #94a3b8;
  margin-top: 0.1rem;
}

.comment-meta a {
  color: #64748b;
  text-decoration: none;
}

.comment-meta a:hover {
  color: #6366f1;
}

/* متن نظر */
.comment-content {
  clear: both;
  margin-top: 0.7rem;
  color: #111827;
  line-height: 1.8;
  font-size: 0.95rem;
}

.comment-content p {
  margin: 0 0 0.5rem;
}

/* لینک‌ها داخل متن نظر */
.comment-content a {
  color: #6366f1;
  text-decoration: underline;
}

/* دکمه پاسخ دادن */
.comment-reply-link,
.comment-body .reply a {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: #64748b;
  text-decoration: none;
  margin-top: 0.3rem;
  background: #f8fafc;
  transition: all 0.18s ease;
}

.comment-reply-link::before,
.comment-body .reply a::before {
  content: "↩";
  font-size: 0.8rem;
}

.comment-reply-link:hover,
.comment-body .reply a:hover {
  border-color: #6366f1;
  color: #4f46e5;
  background: #eef2ff;
}

/* سطح تو در تویی (نظرات پاسخ) */
.comment .children {
  list-style: none;
  margin: 0.75rem 1.5rem 0 0; /* حاشیه راست برای حالت RTL */
  padding: 0;
  border-right: 2px solid rgba(148, 163, 184, 0.35);
}

.comment .children .comment-body {
  background: #f9fafb;
}

/* ===== فرم ارسال نظر ===== */
.comment-respond {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.7);
}

.comment-form {
  display: grid;
  gap: 1rem;
}

/* لیبل‌ها */
.comment-form label {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.25rem;
  display: inline-block;
}

/* فیلدهای ورودی */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border-radius: 12px;
  border: 1px solid #cbd5f5;
  padding: 0.55rem 0.7rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: #f9fafb;
  transition: all 0.15s ease;
}

.comment-form textarea {
  min-height: 140px;
  resize: vertical;
}

.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.2);
  background: #ffffff;
}

/* متن زیر فیلدها (hint) */
.comment-form .comment-notes,
.comment-form .logged-in-as,
.comment-form .form-allowed-tags {
  font-size: 0.78rem;
  color: #94a3b8;
}

/* چک باکس‌ها (notify me…) */
.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.82rem;
  color: #6b7280;
}

.comment-form-cookies-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* دکمه ارسال نظر */
.comment-form input[type="submit"],
#submit {
  border: none;
  border-radius: 999px;
  padding: 0.6rem 1.4rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #ffffff;
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.comment-form input[type="submit"]:hover,
#submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.6);
}

.comment-form input[type="submit"]:active,
#submit:active {
  transform: translateY(0);
  box-shadow: 0 10px 20px rgba(79, 70, 229, 0.45);
}

/* حالت دیسیبل شدن دکمه */
.comment-form input[type="submit"]:disabled,
#submit:disabled {
  cursor: not-allowed;
  opacity: 0.6;
  box-shadow: none;
}

/* ===== ریسپانسیو ===== */
@media (max-width: 600px) {
  #comments {
    padding: 1.4rem;
    margin: 2rem 1rem;
  }

  .comment-body {
    padding: 1rem;
  }

  .comment .children {
    margin-right: 0.9rem;
  }

  .comment-author .avatar {
    width: 38px;
    height: 38px;
  }
}



/* برچسب مدیریت جلوی نام نویسنده (مدیر / نویسنده پست) */
.bypostauthor .comment-author .fn::before {
  content: "مدیریت";
  font-size: 0.78rem;
  padding: 0.1rem 0.45rem;
  border-radius: 999px;
  background: #eef2ff;
  color: #4f46e5;
  margin-left: 0.35rem;  /* چون فارسیه، برچسب و نام قشنگ از هم فاصله بگیرن */
}





/* ===== چیدمان کلی فرم دیدگاه ===== */
.comment-respond {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px dashed rgba(148, 163, 184, 0.45);
}

/* گرید برای فیلدها */
.comment-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  direction: rtl;
}

/* هر فیلد داخل فرم */
.comment-form p {
  margin: 0;
}

/* لیبل‌ها بالا و راست‌چین */
.comment-form label {
  display: block;
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 0.25rem;
  text-align: right;
}

/* فیلدهای ورودی و textarea */
.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  padding: 0.7rem 1rem;
  font-size: 0.9rem;
  font-family: inherit;
  background: #f9fafb;
  transition: all 0.15s ease;
}

/* textarea گرد ولی کمتر از input‌ها */
.comment-form textarea {
  border-radius: 18px;
  min-height: 160px;
  resize: vertical;
}

/* فوکوس */
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: #6366f1;
  box-shadow: 0 0 0 1px rgba(99, 102, 241, 0.18);
  background: #ffffff;
}

/* متن‌های توضیحی زیر فرم */
.comment-form .comment-notes,
.comment-form .logged-in-as,
.comment-form .form-allowed-tags {
  font-size: 0.78rem;
  color: #94a3b8;
}

/* چک‌باکس ذخیره نام و ایمیل */
.comment-form-cookies-consent {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: #6b7280;
}

.comment-form-cookies-consent input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

/* دکمه ارسال */
.form-submit {
  text-align: left; /* چون دکمه سمت راست قرار می‌گیره در RTL، اصلاح می‌شه */
}

.form-submit #submit {
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.9rem;
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  background: linear-gradient(135deg, #6366f1, #ec4899);
  color: #ffffff;
  box-shadow: 0 12px 25px rgba(79, 70, 229, 0.45);
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
}

.form-submit #submit:hover {
  transform: translateY(-1px);
  filter: brightness(1.03);
  box-shadow: 0 18px 40px rgba(79, 70, 229, 0.6);
}

/* ===== چیدمان دو ستونه در دسکتاپ ===== */
@media (min-width: 768px) {
  .comment-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* نام و ایمیل کنار هم */
  .comment-form-author,
  .comment-form-email {
    grid-column: span 1;
  }

  /* متن دیدگاه، وب‌سایت، چک‌باکس و دکمه تمام عرض */
  .comment-form-comment,
  .comment-form-url,
  .comment-form-cookies-consent,
  .form-submit {
    grid-column: 1 / -1;
  }
}
