<style>
  .comment-status {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
  }
  .comment-status.moderation {
    background: #ffc107;
    color: #212529;
  }
  .comment-status.approved {
    background: #28a745;
    color: #fff;
  }
  .list-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-light);
  }
  .list-item:last-child { border-bottom: none; }
  .list-item .meta { font-size: 0.9rem; color: var(--text-light); }
  .list-item .article-link {
    font-weight: 600;
    color: var(--primary);
    text-decoration: none;
    transition: color 0.2s;
  }
  .list-item .article-link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
  }
</style>

<h3>💬 Мои комментарии</h3>
{% if comments %}
  {% for comment in comments %}
    <div class="list-item">
      <div>
        <a href="{{ comment.article.get_absolute_url }}" class="article-link">
          {{ comment.article.title }}
        </a>
        {% if not comment.is_moderated %}
          <span class="comment-status moderation">⏳ На модерации</span>
        {% else %}
          <span class="comment-status approved">✅ Одобрен</span>
        {% endif %}
      </div>
      <div class="meta">
        {{ comment.time_create|date:"d.m.Y H:i" }}
        <br>
        {{ comment.content|truncatechars:150 }}
      </div>
    </div>
  {% endfor %}
{% else %}
  <p>Вы ещё не оставили ни одного комментария.</p>
{% endif %}