/* =====================================================
   COMMENTS
   - Форма "Залишити відповідь"
   - Список опублікованих коментарів
   ===================================================== */

.comments-area,
#comments {
  max-width: 760px;
  margin: 48px 0 0;
}

.comments-title,
.comment-reply-title,
#reply-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0 0 20px;
  letter-spacing: -0.01em;
}

/* === FORM === */
.comment-form {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.comment-form p {
  margin: 0 0 16px;
}
.comment-form p:last-of-type { margin-bottom: 0; }

.comment-form label {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-secondary);
  margin-bottom: 6px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 0.95rem;
  line-height: 1.5;
  transition: all var(--transition);
  resize: vertical;
}

.comment-form input[type="text"]:focus,
.comment-form input[type="email"]:focus,
.comment-form input[type="url"]:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-card);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

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

.comment-form .comment-notes,
.comment-form .logged-in-as {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 20px;
}

.comment-form .logged-in-as a {
  color: var(--accent);
}

.comment-form .required {
  color: var(--accent);
  margin-left: 2px;
}

/* Checkbox для GDPR */
.comment-form .comment-form-cookies-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.comment-form .comment-form-cookies-consent label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin: 0;
}

/* === SUBMIT BUTTON === */
.comment-form .form-submit {
  margin-top: 8px;
  margin-bottom: 0;
}

.comment-form input[type="submit"],
.comment-form .submit {
  padding: 12px 28px;
  background: var(--accent);
  color: #fff;
  border: 0;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
}

.comment-form input[type="submit"]:hover,
.comment-form .submit:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
  box-shadow: var(--shadow-card);
}

.comment-form input[type="submit"]:active {
  transform: translateY(0);
}

/* === COMMENT LIST === */
.comment-list {
  list-style: none;
  padding: 0;
  margin: 0 0 32px;
}

.comment-list .comment {
  margin-bottom: 20px;
}

.comment-list .comment-body {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
}

.comment-author {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.comment-author img.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.comment-author .fn,
.comment-author b {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  font-style: normal;
}

.comment-metadata {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 12px;
}
.comment-metadata a { color: inherit; }

.comment-content {
  font-size: 0.95rem;
  line-height: 1.7;
  color: var(--text-secondary);
}

.comment-content p { margin: 0 0 12px; }
.comment-content p:last-child { margin-bottom: 0; }

.reply .comment-reply-link {
  display: inline-block;
  margin-top: 12px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--accent);
}
.reply .comment-reply-link:hover {
  text-decoration: underline;
}

/* Nested replies */
.comment-list .children {
  list-style: none;
  padding-left: 24px;
  margin-top: 16px;
  border-left: 2px solid var(--border);
}

/* === MOBILE === */
@media (max-width: 768px) {
  .comment-form {
    padding: 18px;
  }

  .comments-title,
  .comment-reply-title,
  #reply-title {
    font-size: 1.25rem;
  }

  .comment-list .children {
    padding-left: 14px;
  }
}
