{% extends 'base.html' %}
{% load i18n %}

{% block title %}{% trans "Reset Password" %} | masarX{% endblock %}

{% block content %}
<section class="py-5 bg-light" style="min-height: 80vh; display: flex; align-items: center;">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-md-6 col-lg-5">
                <div class="card shadow-sm border-0 rounded-4">
                    <div class="card-body p-4 p-md-5">
                        <div class="text-center mb-4">
                            {% if platform_profile.logo %}
                                <img src="{{ platform_profile.logo.url }}" alt="{{ platform_profile.name }}" height="60" class="mb-3">
                            {% else %}
                                <h2 class="fw-bold text-masarx-primary mb-3">{{ platform_profile.name|default:"masarX" }}</h2>
                            {% endif %}
                            <h4 class="fw-bold">{% trans "Reset Password" %}</h4>
                            <p class="text-muted mb-0">{% trans "Enter your email address and we'll send you a link to reset your password." %}</p>
                        </div>

                        <form method="post">
                            {% csrf_token %}
                            {% for field in form %}
                                <div class="mb-3">
                                    <label class="form-label fw-medium">{{ field.label }}</label>
                                    {{ field }}
                                    {% if field.errors %}
                                        <div class="text-danger small mt-1">{{ field.errors }}</div>
                                    {% endif %}
                                </div>
                            {% endfor %}
                            <button type="submit" class="btn btn-masarx-primary w-100 py-2 fw-bold">{% trans "Send Reset Link" %}</button>
                        </form>
                        
                        <div class="text-center mt-4">
                            <a href="{% url 'login' %}" class="text-decoration-none text-muted">
                                <i class="bi {% if LANGUAGE_BIDI %}bi-arrow-right{% else %}bi-arrow-left{% endif %} me-1"></i> {% trans "Back to Login" %}
                            </a>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<style>
    .form-control {
        border-radius: 8px;
        padding: 12px 15px;
        border-color: #dee2e6;
    }
    .form-control:focus {
        border-color: var(--accent-orange);
        box-shadow: 0 0 0 0.25rem rgba(255, 126, 21, 0.15);
    }
    .btn-masarx-primary {
        background-color: var(--accent-orange);
        border-color: var(--accent-orange);
        color: white;
        border-radius: 8px;
        transition: all 0.3s;
    }
    .btn-masarx-primary:hover {
        background-color: #e66a00; /* Darker orange */
        border-color: #e66a00;
        color: white;
    }
</style>
{% endblock %}
