/* Comment Styles */

.comments-section {
  margin-top: 2rem;
}

.comments-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.comments-header h3 {
  margin: 0;
}

.comment-count {
  color: var(--text-light);
  font-size: 0.875rem;
}

.comments-list {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.comment {
  display: flex;
  gap: 1rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
}

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

.comment-avatar {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.comment-avatar-placeholder {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.125rem;
}

.comment-body {
  flex: 1;
  min-width: 0;
}

.comment-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.comment-author {
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

.comment-author:hover {
  color: var(--primary);
}

.comment-time {
  color: var(--text-light);
  font-size: 0.875rem;
}

.comment-edited {
  color: var(--text-light);
  font-size: 0.75rem;
  font-style: italic;
}

.comment-content {
  line-height: 1.5;
  word-wrap: break-word;
}

.comment-content p {
  margin: 0;
  white-space: pre-wrap;
}

.comment-actions {
  margin-top: 0.5rem;
  display: flex;
  gap: 1rem;
  font-size: 0.875rem;
}

.comment-form {
  margin-top: 1.5rem;
}

.comment-form textarea {
  width: 100%;
  min-height: 100px;
  padding: 0.75rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.comment-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.comment-form-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comment-char-count {
  color: var(--text-light);
  font-size: 0.75rem;
}

.no-comments {
  padding: 2rem;
  text-align: center;
  color: var(--text-light);
  font-style: italic;
}

.comments-disabled {
  padding: 1.5rem;
  text-align: center;
  color: var(--text-light);
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-style: italic;
}

/* Reply Styles */
.comment-reply {
  margin-left: 3rem;
  padding-left: 1rem;
  border-left: 2px solid var(--border);
}

.comment-replies {
  margin-top: 0.5rem;
}

.reply-form {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: var(--bg);
  border-radius: 8px;
  border: 1px solid var(--border);
}

.reply-form textarea {
  width: 100%;
  min-height: 60px;
  padding: 0.5rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.875rem;
  resize: vertical;
  margin-bottom: 0.5rem;
}

.reply-form textarea:focus {
  outline: none;
  border-color: var(--primary);
}

.reply-form-actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}

.btn-reply {
  background: none;
  border: none;
  color: var(--primary);
  cursor: pointer;
  padding: 0;
  font-size: 0.875rem;
  font-weight: 500;
}

.btn-reply:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .comment-reply {
    margin-left: 1rem;
    padding-left: 0.75rem;
  }

  .comment {
    gap: 0.75rem;
    padding: 0.75rem;
  }

  .comment-avatar,
  .comment-avatar-placeholder {
    width: 32px;
    height: 32px;
    font-size: 0.875rem;
  }
}
