{% extends "emails/base.html" %}

{% block title %}Submission Approved - ThrillWiki{% endblock %}

{% block content %}
<h2>Great News! Your Submission Was Approved ✅</h2>

<p>Hello {{ submission.user.first_name|default:submission.user.email }},</p>

<p>Your submission has been reviewed and approved by our moderation team. Your contributions help make ThrillWiki more accurate and comprehensive!</p>

<div class="info-box">
    <p><strong>Submission Details:</strong></p>
    <ul style="margin: 10px 0; padding-left: 20px;">
        <li><strong>Title:</strong> {{ submission.title }}</li>
        <li><strong>Type:</strong> {{ submission.get_submission_type_display }}</li>
        <li><strong>Entity:</strong> {{ submission.entity }}</li>
        <li><strong>Submitted:</strong> {{ submission.submitted_at|date:"F d, Y g:i A" }}</li>
        <li><strong>Reviewed by:</strong> {{ submission.reviewed_by.email }}</li>
        <li><strong>Items approved:</strong> {{ submission.items.approved.count }}</li>
    </ul>
</div>

{% if submission.description %}
<h3>Your Description:</h3>
<p style="background: #f5f5f5; padding: 15px; border-radius: 4px; font-style: italic;">
    "{{ submission.description }}"
</p>
{% endif %}

<div style="text-align: center; margin: 30px 0;">
    <a href="{{ submission_url }}" class="button">View Submission</a>
</div>

<h3>What happens next?</h3>
<p>Your changes are now live on ThrillWiki and visible to all users. Here's what you can do:</p>
<ul style="margin: 10px 0; padding-left: 20px;">
    <li>View the updated entity page to see your changes</li>
    <li>Submit more updates to other entities</li>
    <li>Share your contributions with the community</li>
</ul>

<div class="info-box">
    <p><strong>📊 Contribution Stats:</strong></p>
    <p>You've made <strong>{{ user_submission_count }}</strong> submission(s) to ThrillWiki. Thank you for helping us maintain the most accurate roller coaster database!</p>
</div>

<p style="margin-top: 30px;">Keep up the great work!</p>
<p><strong>The ThrillWiki Moderation Team</strong></p>
{% endblock %}
