/* ============================================
   v2/css/comments.css
   استایل نظرات (مشترک بین خبر و ویدئو)
   سایت اخبار استقلال — نسخه ۲
   نسخه: 2.2 — اسم کاربر عادی طوسی + VIP طلایی حفظ شده
   ============================================ */

.comments-section {
  margin-top: 12px;
  padding: 0 4px;
}

/* 🎯 عنوان نظرات — همه طوسی */
.comments-section h4 {
  color: #7a8a9a;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
}

.comments-section h4 i { color: #7a8a9a; }

.comment-item {
  padding: 12px 0;
  border-bottom: 1px solid var(--bg);
}

.comment-item:last-child { border-bottom: none; }

/* 🎯 نام کاربر عادی — طوسی */
.comment-item .comment-author {
  font-weight: 700;
  color: #7a8a9a;
  font-size: .85rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  touch-action: manipulation;
}

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

/* 🎯 wrapper آواتار کامنت */
.comment-item .comment-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
  position: relative;
}

.comment-item .comment-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* 🎯 آواتار VIP در کامنت‌ها — قاب طلایی */
.comment-item .comment-avatar.vip-avatar-sm {
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(245, 200, 66, .35), 0 0 6px rgba(245, 200, 66, .5);
  background: #fff;
}

.comment-item .comment-text {
  font-size: .85rem;
  color: var(--text-secondary);
  margin: 6px 0 4px;
  line-height: 1.7;
  padding-right: 30px;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.comment-item .comment-actions {
  display: flex;
  gap: 14px;
  font-size: .7rem;
  color: #7a8a9a;
  margin-top: 4px;
  padding-right: 30px;
  flex-wrap: wrap;
}

.comment-item .comment-actions button {
  background: none;
  border: none;
  color: #7a8a9a;
  cursor: pointer;
  font-size: .72rem;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px;
  border-radius: 6px;
  transition: background .2s;
  touch-action: manipulation;
}

.comment-item .comment-actions button:active { background: var(--bg); }

/* 🎯 حالت فعال لایک/دیسلایک — رنگ حفظ می‌شه */
.comment-item .comment-actions .like-comment-btn.liked {
  color: var(--danger);
  font-weight: 700;
}

.comment-item .comment-actions .dislike-comment-btn.disliked {
  color: var(--info);
  font-weight: 700;
}

/* ============================================
   🎯 VIP: اسم طلایی برای VIP — حفظ شده
   ============================================ */
.comment-item .comment-author.vip-author {
  color: #d4a017;
  background: linear-gradient(90deg, #d4a017, #f5c842, #d4a017);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.comment-item .comment-author.vip-author:hover {
  text-decoration: none;
}

/* آیکون تاج کوچیک کنار اسم VIP */
.comment-item .comment-author .vip-icon {
  color: var(--gold);
  font-size: .7rem;
  filter: drop-shadow(0 0 3px rgba(245,200,66,.7));
  -webkit-text-fill-color: var(--gold);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
  margin-right: 2px;
  vertical-align: middle;
}

/* ============================================
   پاسخ‌ها (Replies)
   ============================================ */
.replies {
  padding-right: 20px;
  margin-top: 8px;
  border-right: 2px solid var(--border);
}

.reply-item {
  padding: 8px 12px;
  margin-bottom: 4px;
  background: var(--bg-light);
  border-radius: 10px;
}

/* 🎯 نام کاربر عادی در پاسخ — طوسی */
.reply-item .reply-author {
  font-weight: 700;
  color: #7a8a9a;
  font-size: .75rem;
  margin-bottom: 4px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
}

.reply-item .reply-author:hover { text-decoration: underline; }

/* 🎯 wrapper آواتار پاسخ */
.reply-item .reply-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--bg);
  border: 1px solid var(--border);
}

.reply-item .reply-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}

/* 🎯 آواتار VIP در پاسخ‌ها */
.reply-item .reply-avatar.vip-avatar-sm {
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 1px rgba(245, 200, 66, .3), 0 0 4px rgba(245, 200, 66, .4);
  background: #fff;
}

/* 🎯 اسم طلایی پاسخ VIP — حفظ شده */
.reply-item .reply-author.vip-author {
  color: #d4a017;
  background: linear-gradient(90deg, #d4a017, #f5c842, #d4a017);
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  font-weight: 800;
}

.reply-item .reply-author.vip-author:hover {
  text-decoration: none;
}

.reply-item .reply-author .vip-icon {
  color: var(--gold);
  font-size: .65rem;
  -webkit-text-fill-color: var(--gold);
  background: none;
  -webkit-background-clip: initial;
  background-clip: initial;
}

.reply-item .reply-text {
  font-size: .78rem;
  color: var(--text-secondary);
  line-height: 1.6;
  word-wrap: break-word;
}

/* ============================================
   Input — فروم ارسال نظر جدید
   ============================================ */
.comment-input-area {
  display: flex;
  gap: 8px;
  margin-top: 16px;
  padding: 12px 0;
}

.comment-input-area input {
  flex: 1;
  padding: 10px 16px;
  border: 2px solid var(--border-light);
  border-radius: 30px;
  font-size: .85rem;
  outline: none;
  background: var(--bg-light);
  transition: border-color .3s, background .3s;
}

.comment-input-area input:focus {
  border-color: var(--gold);
  background: #fff;
}

.comment-input-area button {
  padding: 10px 20px;
  background: var(--grad-primary);
  color: #fff;
  border: none;
  border-radius: 30px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 12px rgba(21,96,189,.25);
  touch-action: manipulation;
}

.comment-input-area button:active { transform: scale(0.97); }

/* ============================================
   Login Prompt — وقتی کاربر لاگین نیست
   ============================================ */
.login-prompt-box {
  background: linear-gradient(145deg, var(--bg-light), #eef2f7);
  border: 2px dashed var(--primary);
  border-radius: 14px;
  padding: 20px;
  text-align: center;
  margin-top: 12px;
}

.login-prompt-box i {
  font-size: 2rem;
  color: var(--primary);
  margin-bottom: 10px;
  display: block;
}

.login-prompt-box p {
  font-size: .85rem;
  color: #5a6a7a;
  margin-bottom: 12px;
  line-height: 1.6;
}

.login-prompt-box button {
  background: var(--grad-primary);
  color: #fff;
  border: none;
  padding: 10px 24px;
  border-radius: 30px;
  font-weight: 700;
  cursor: pointer;
  font-size: .85rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: 0 4px 14px rgba(21,96,189,.25);
  touch-action: manipulation;
}