{% extends 'dating_app/base_dating.html' %}

{% block title %}Reset Dating Partner Password | Date in Sri Lanka{% endblock %}

{% block content %}

<style>
    .dating-reset-hero {
        position: relative;
        min-height: 100vh;
        padding: 6rem 0;
        background:
            radial-gradient(circle at top left, rgba(244, 114, 182, 0.22), transparent 34%),
            radial-gradient(circle at bottom right, rgba(251, 191, 36, 0.14), transparent 32%),
            linear-gradient(135deg, #4a044e 0%, #9d174d 52%, #7f1d1d 100%);
        color: #fff;
        overflow: hidden;
    }

    .dating-reset-hero::before {
        content: "";
        position: absolute;
        inset: 0;
        background:
            linear-gradient(120deg, rgba(255, 255, 255, 0.08), transparent 35%),
            radial-gradient(circle at 80% 10%, rgba(255, 255, 255, 0.10), transparent 28%);
        pointer-events: none;
    }

    .dating-reset-hero::after {
        content: "";
        position: absolute;
        right: -160px;
        bottom: -180px;
        width: 480px;
        height: 480px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        pointer-events: none;
    }

    .dating-reset-hero .container {
        position: relative;
        z-index: 2;
    }

    .dating-reset-hero .section-mini-title {
        display: inline-block;
        background: rgba(255, 255, 255, 0.16);
        color: #fbcfe8;
        border: 1px solid rgba(255, 255, 255, 0.24);
        font-weight: 800;
        font-size: 0.8rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        padding: 6px 14px;
        border-radius: 40px;
        margin-bottom: 16px;
    }

    .dating-reset-hero h1 {
        color: #fff;
        font-size: clamp(2.35rem, 4.2vw, 4.1rem);
        font-weight: 900;
        letter-spacing: -0.045em;
        line-height: 1.06;
    }

    .dating-reset-hero .lead {
        color: rgba(255, 255, 255, 0.86) !important;
        font-size: 1.12rem;
        line-height: 1.8;
    }

    .dating-reset-info-list {
        margin: 24px 0 20px;
    }

    .dating-reset-info-item {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 14px;
        font-size: 1rem;
        color: rgba(255, 255, 255, 0.92);
        font-weight: 600;
    }

    .dating-reset-info-item i {
        color: #fbcfe8;
        font-size: 1.2rem;
    }

    .dating-reset-note-box {
        background: rgba(255, 241, 242, 0.14);
        border-left: 4px solid #f9a8d4;
        color: rgba(255, 255, 255, 0.92);
        padding: 16px 20px;
        border-radius: 16px;
        display: flex;
        gap: 12px;
        align-items: flex-start;
        line-height: 1.65;
    }

    .dating-reset-note-box i {
        color: #f9a8d4;
        font-size: 1.3rem;
        margin-top: 2px;
    }

    .dating-reset-card {
        background: rgba(255, 255, 255, 0.98);
        border-radius: 32px;
        box-shadow: 0 28px 70px rgba(0, 0, 0, 0.24);
        overflow: hidden;
        border: 1px solid rgba(255, 255, 255, 0.35);
    }

    .dating-reset-card-header {
        background: linear-gradient(135deg, #ffffff 0%, #fff1f2 100%);
        padding: 28px 32px;
        color: #0f172a;
        text-align: center;
        border-bottom: 1px solid #e2e8f0;
    }

    .dating-reset-card-header h3 {
        margin: 0;
        font-weight: 900;
        color: #0f172a;
        letter-spacing: -0.025em;
    }

    .dating-reset-card-header p {
        color: #64748b !important;
        font-size: 0.92rem;
        margin-top: 8px;
        margin-bottom: 0;
    }

    .dating-reset-card-body {
        padding: 32px;
    }

    .dating-reset-card-body .form-label {
        color: #0f172a;
        font-weight: 700;
    }

    .dating-reset-card-body .form-control {
        border-radius: 15px;
        border: 1px solid #cbd5e1;
        padding: 0.78rem 0.95rem;
        box-shadow: none;
        color: #0f172a;
    }

    .dating-reset-card-body .form-control:focus {
        border-color: #be185d;
        box-shadow: 0 0 0 0.22rem rgba(190, 24, 93, 0.13);
    }

    .dating-reset-submit-btn {
        background: linear-gradient(135deg, #be185d, #7e22ce);
        border: none;
        border-radius: 48px;
        padding: 0.85rem 1rem;
        font-weight: 800;
        box-shadow: 0 16px 32px rgba(190, 24, 93, 0.24);
    }

    .dating-reset-submit-btn:hover {
        background: linear-gradient(135deg, #db2777, #9333ea);
    }

    .dating-reset-footer {
        border-top: 1px solid #e9ecef;
        padding-top: 24px;
        margin-top: 8px;
        text-align: center;
    }

    .dating-reset-footer .btn-outline-primary {
        border: 2px solid #be185d;
        color: #be185d;
        font-weight: 700;
        border-radius: 48px;
        padding: 10px;
    }

    .dating-reset-footer .btn-outline-primary:hover {
        background: #be185d;
        color: #fff;
        border-color: #be185d;
    }

    .dating-form-error {
        background: #fef2f2;
        border: 1px solid #fecaca;
        color: #991b1b;
        border-radius: 18px;
        padding: 14px 16px;
        margin-bottom: 18px;
        font-weight: 600;
    }

    .dating-field-error {
        color: #b91c1c;
        font-size: 0.88rem;
        font-weight: 600;
        margin-top: 6px;
    }

    @media (max-width: 768px) {
        .dating-reset-hero {
            padding: 4rem 0;
        }

        .dating-reset-card-body {
            padding: 24px;
        }

        .dating-reset-card-header {
            padding: 22px 20px;
        }

        .dating-reset-card {
            border-radius: 26px;
        }
    }
</style>

<section class="dating-reset-hero">
    <div class="container">
        <div class="row align-items-center g-5 justify-content-center">

            <!-- LEFT CONTENT -->
            <div class="col-lg-5">
                <span class="section-mini-title">Dating Partner Recovery</span>

                <h1 class="fw-bold mb-3">
                    Reset Your Dating Partner Password
                </h1>

                <p class="lead text-muted mb-4">
                    Enter the email address linked to your Date in Sri Lanka Dating Partner account.
                    If it matches a registered account, password reset instructions will be sent.
                </p>

                <div class="dating-reset-info-list">
                    <div class="dating-reset-info-item">
                        <i class="bi bi-shield-lock-fill"></i>
                        <span>Secure recovery for Dating Partner accounts</span>
                    </div>

                    <div class="dating-reset-info-item">
                        <i class="bi bi-envelope-check-fill"></i>
                        <span>Reset instructions are delivered by email</span>
                    </div>

                    <div class="dating-reset-info-item">
                        <i class="bi bi-heart-fill"></i>
                        <span>Return safely to your dating partner dashboard</span>
                    </div>
                </div>

                <div class="dating-reset-note-box mt-4">
                    <i class="bi bi-info-circle-fill"></i>
                    <div>
                        This reset form is intended only for registered
                        <strong>Dating Partner accounts</strong> in the Date in Sri Lanka portal.
                    </div>
                </div>
            </div>


            <!-- RESET FORM -->
            <div class="col-lg-5">
                <div class="dating-reset-card shadow-lg">

                    <div class="dating-reset-card-header">
                        <h3 class="fw-bold mb-2">Request Password Reset</h3>
                        <p>
                            We will email reset instructions where applicable.
                        </p>
                    </div>

                    <form method="post" class="dating-reset-card-body">
                        {% csrf_token %}

                        {% if messages %}
                            {% for message in messages %}
                                <div class="alert alert-{{ message.tags|default:'info' }} rounded-4 mb-3">
                                    {{ message }}
                                </div>
                            {% endfor %}
                        {% endif %}

                        {% if form.non_field_errors %}
                            <div class="dating-form-error">
                                {{ form.non_field_errors }}
                            </div>
                        {% endif %}

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

                            <input
                                type="email"
                                name="{{ form.email.html_name }}"
                                id="{{ form.email.id_for_label }}"
                                class="form-control"
                                autocomplete="email"
                                required
                                value="{{ form.email.value|default_if_none:'' }}"
                                placeholder="Enter your registered Dating Partner email"
                            >

                            {% if form.email.errors %}
                                <div class="dating-field-error">
                                    {{ form.email.errors|striptags }}
                                </div>
                            {% endif %}
                        </div>

                        <button type="submit" class="btn btn-dark btn-lg w-100 dating-reset-submit-btn">
                            <i class="bi bi-send-fill me-2"></i>
                            Send Reset Instructions
                        </button>

                        <div class="dating-reset-footer mt-4">
                            <p class="small text-muted mb-2">
                                Remembered your password?
                            </p>

                            <a href="{% url 'dating_app:dating_partner_login' %}"
                               class="btn btn-outline-primary w-100">
                                Back to Dating Partner Sign In
                            </a>
                        </div>
                    </form>

                </div>
            </div>

        </div>
    </div>
</section>

{% endblock %}