{% extends 'hosting_app/base_hosting.html' %}
{% load static %}

{% block title %}Reset Client Password | Host in Sri Lanka{% endblock %}

{% block content %}

<style>
    .client-reset-page {
        min-height: 100vh;
        padding: 4rem 0 5rem;
        background:
            radial-gradient(circle at top left, rgba(255, 193, 7, 0.12), transparent 30%),
            radial-gradient(circle at top right, rgba(116, 49, 41, 0.10), transparent 32%),
            linear-gradient(180deg, #fffaf5 0%, #ffffff 48%, #fff7ed 100%);
    }

    .client-reset-card {
        max-width: 720px;
        margin: 0 auto;
        border-radius: 34px;
        background: #ffffff;
        border: 1px solid #eadbc9;
        box-shadow: 0 24px 56px rgba(58, 30, 24, 0.10);
        overflow: hidden;
    }

    .client-reset-header {
        padding: 2rem;
        color: #ffffff;
        background:
            radial-gradient(circle at top right, rgba(255, 211, 107, 0.22), transparent 34%),
            linear-gradient(135deg, #2d1716 0%, #743129 52%, #a7601b 100%);
    }

    .client-reset-header span {
        display: inline-flex;
        align-items: center;
        gap: 0.45rem;
        color: #ffe7aa;
        font-size: 0.8rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        margin-bottom: 0.8rem;
    }

    .client-reset-header h1 {
        font-weight: 950;
        letter-spacing: -0.04em;
        margin-bottom: 0.5rem;
    }

    .client-reset-header p {
        color: rgba(255,255,255,0.85);
        line-height: 1.7;
        margin-bottom: 0;
    }

    .client-reset-body {
        padding: 2rem;
    }

    .client-reset-body label {
        display: block;
        color: #2d1716;
        font-size: 0.82rem;
        font-weight: 950;
        text-transform: uppercase;
        letter-spacing: 0.05em;
        margin-bottom: 0.5rem;
    }

    .client-reset-body input {
        width: 100%;
        min-height: 52px;
        border-radius: 18px;
        border: 1px solid #eadbc9;
        background: #fffaf5;
        color: #2d1716;
        font-weight: 650;
        padding: 0.85rem 1rem;
    }

    .client-reset-body input:focus {
        border-color: #a7601b;
        box-shadow: 0 0 0 0.22rem rgba(167, 96, 27, 0.14);
        background: #ffffff;
        outline: none;
    }

    .client-reset-btn {
        border-radius: 999px;
        min-height: 52px;
        background: linear-gradient(135deg, #ffc107, #df9219);
        color: #2d1716;
        border: none;
        font-weight: 950;
        box-shadow: 0 18px 34px rgba(223, 146, 25, 0.25);
    }

    .client-reset-btn:hover {
        background: linear-gradient(135deg, #2d1716, #743129);
        color: #ffffff;
    }
</style>

<section class="client-reset-page">
    <div class="container">

        <div class="client-reset-card">

            <div class="client-reset-header">
                <span>
                    <i class="bi bi-key-fill"></i>
                    Hosting Client Password Reset
                </span>

                <h1>Reset your password</h1>

                <p>
                    Enter the email address connected to your Hosting Client account.
                    If the account exists, we will send password reset instructions.
                </p>
            </div>

            <div class="client-reset-body">

                {% if messages %}
                    {% for message in messages %}
                        <div class="alert alert-warning rounded-4">
                            {{ message }}
                        </div>
                    {% endfor %}
                {% endif %}

                <form method="post">
                    {% csrf_token %}

                    <div class="mb-3">
                        <label for="{{ form.email.id_for_label }}">Email Address</label>
                        {{ form.email }}

                        {% for error in form.email.errors %}
                            <div class="text-danger small fw-bold mt-1">
                                {{ error }}
                            </div>
                        {% endfor %}
                    </div>

                    <button type="submit" class="btn client-reset-btn w-100">
                        <i class="bi bi-envelope-check-fill me-2"></i>
                        Send Reset Instructions
                    </button>

                    <a href="{% url 'hosting_app:hosting_client_login' %}"
                       class="btn btn-outline-secondary rounded-pill w-100 mt-2 fw-bold">
                        Back to Client Login
                    </a>
                </form>

            </div>

        </div>

    </div>
</section>

{% endblock %}