{% extends "base.j2" -%}

{% block title %}Reply to Comment{% endblock %}

{% block content %}
<div class="container">
    <h2>Reply to Comment</h2>
    
    <div class="original-comment" style="background-color: #f5f5f5; padding: 15px; border-left: 4px solid #007cba; margin-bottom: 20px;">
        <div class="comment-header">
            <strong>{{ parent_comment.user.name if parent_comment.user else "Anonymous" }}</strong>
            <span class="comment-date">{{ parent_comment.ago_string }}</span>
        </div>
        <div class="comment-content">
            {{ parent_comment.data_html | safe }}
        </div>
    </div>
    
    <form method="post" action="{{ request.route_url('comment_reply', comment_id=parent_comment.id) }}">
        <div class="form-group">
            <label for="comment_data">Your Reply:</label>
            <textarea name="data" id="comment_data" rows="6" cols="80" required placeholder="Write your reply..."></textarea>
            <small>You can use Markdown formatting.</small>
        </div>
        
        <div class="form-actions">
            <input type="submit" value="Post Reply" class="mps-submit" />
            <a href="{{ product.absolute_url(request) }}" class="mps-cancel">Cancel</a>
        </div>
    </form>
</div>
{% endblock %}