{% extends "admin/base_site.html" %}
{% load i18n admin_urls static %}

{% block content %}
<div id="content-main">
    <div style="background: #fff; border: 1px solid #ddd; padding: 20px; max-width: 800px;">
        <div style="background-color: #fff4f2; border-left: 5px solid #d32f2f; padding: 15px; margin-bottom: 25px;">
            <h3 style="margin-top: 0; color: #b71c1c;">⚠️ Warning: Media Overwrite</h3>
            <p>Restoring this file will <strong>completely wipe</strong> your current <code>MEDIA_ROOT</code> directory and replace it with the contents of this zip file.</p>
            <p>A safety backup of your current media will be taken automatically before the wipe occurs.</p>
        </div>

        <form method="post" enctype="multipart/form-data">
            {% csrf_token %}
            <div style="margin-bottom: 20px;">
                <label for="media_zip" style="font-weight: bold; display: block; margin-bottom: 10px;">Select Media Backup File (.zip)</label>
                <input type="file" name="media_zip" id="media_zip" accept=".zip" required style="padding: 10px; border: 2px dashed #ccc; width: 100%; box-sizing: border-box;">
            </div>
            <div class="submit-row" style="text-align: right;">
                <input type="submit" value="Validate & Restore Media" class="default" style="background-color: #d32f2f; color: white; padding: 10px 20px; border: none; font-weight: bold; cursor: pointer;">
            </div>
        </form>
    </div>
</div>
{% endblock %}