{% extends "base.html" %}
{% load static %}

{% block title %}Forgot Password - IHICL Investment{% endblock %}

{% block content %}
    <!-- Header Start -->
    <div class="container-fluid bg-breadcrumb">
        <div class="bg-breadcrumb-single"></div>
        <div class="container text-center py-5" style="max-width: 900px;">
            <h4 class="text-white display-4 mb-4 wow fadeInDown" data-wow-delay="0.1s">Reset Your Password</h4>
            <ol class="breadcrumb justify-content-center mb-0 wow fadeInDown" data-wow-delay="0.3s">
                <li class="breadcrumb-item"><a href="{% url 'home' %}">Home</a></li>
                <li class="breadcrumb-item"><a href="{% url 'login' %}">Login</a></li>
                <li class="breadcrumb-item active text-primary">Forgot Password</li>
            </ol>    
        </div>
    </div>
    <!-- Header End -->

    <!-- Password Reset Section Start -->
    <div class="container-fluid py-5">
        <div class="container">
            <div class="row justify-content-center">
                <div class="col-lg-6">
                    <div class="card border-0 shadow-sm">
                        <div class="card-body p-5">
                            <h3 class="text-center mb-4">Reset Your Password</h3>
                            
                            {% if messages %}
                                {% for message in messages %}
                                    <div class="alert alert-{{ message.tags }} alert-dismissible fade show" role="alert">
                                        {{ message }}
                                        <button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
                                    </div>
                                {% endfor %}
                            {% endif %}
                            
                            <p class="text-center mb-4">Enter your email address and we'll send you instructions to reset your password.</p>
                            
                            <form method="post">
                                {% csrf_token %}
                                
                                <div class="mb-4">
                                    <label for="id_email" class="form-label">Email Address</label>
                                    <input type="email" class="form-control {% if form.email.errors %}is-invalid{% endif %}" 
                                           id="id_email" name="email" placeholder="name@example.com" 
                                           value="{{ form.email.value|default:'' }}" required>
                                    {% if form.email.errors %}
                                        <div class="invalid-feedback">
                                            {{ form.email.errors.0 }}
                                        </div>
                                    {% endif %}
                                </div>
                                
                                <button type="submit" class="btn btn-primary w-100 py-2">Send Reset Instructions</button>
                            </form>
                            
                            <div class="text-center mt-4">
                                <p>Remember your password? <a href="{% url 'login' %}">Back to Login</a></p>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
    <!-- Password Reset Section End -->
{% endblock %}