{% extends "base.html" %}
{% load static %}
{% load i18n %}
{% load allauth account %}

{% block head_title %}
    {% trans "Forgot Password" %}
{% endblock head_title %}

{% block content %}
    <!-- Password Reset Start -->
    <section class="space-py-100">
        <div class="container">
            <div class="grid grid-cols-12">
                <div class="col-span-12">
                    <div class="codex-authbox">
                        <div class="auth-header">
                            <div class="codex-brand">
                                <a href="{% url 'main:home' %}">
                                    <img class="img-fluid light-logo" src="{% static 'main/assets/images/logo/logo.png' %}" alt="logo">
                                    <img class="img-fluid dark-logo" src="{% static 'main/assets/images/logo/logo-light.png' %}" alt="logo">
                                </a>
                            </div>
                            <h3>{% trans "Forgot Password?" %}</h3>
                            <p>{% trans "Enter your email and we'll send you a link to reset your password." %}</p>
                        </div>
                        {% if user.is_authenticated %}
                            {% include "account/snippets/already_logged_in.html" %}
                        {% else %}
                            {% url 'account_reset_password' as reset_url %}
                            <form method="post" action="{{ reset_url }}">
                                {% csrf_token %}
                                <div class="form-group">
                                    <label class="form-label" for="id_email">{% trans "Email" %}</label>
                                    <input class="form-control" type="email" name="email" id="id_email" placeholder="{% trans 'Enter your email' %}" required>
                                </div>
                                <div class="group-form mb-0">
                                    <button class="btn btn-primary" type="submit">
                                        <i class="bi bi-key"></i> {% trans "Send Reset Link" %}
                                    </button>
                                </div>
                            </form>
                        {% endif %}
                    </div>
                </div>
            </div>
        </div>
    </section>
    <!-- Password Reset End -->
{% endblock content %}

{% block extra_body %}
    {{ block.super }}
{% endblock extra_body %}
