{% extends 'rental_app/base_rental.html' %}
{% load static %}
{% block title %}Rental Owner Signup{% endblock %}

{% block content %}
<style>
    .owner-signup-hero {
        position: relative;
        min-height: 100vh;
        padding: 6rem 0;
        background:
            radial-gradient(circle at top left, rgba(20, 184, 166, 0.18), transparent 34%),
            radial-gradient(circle at bottom right, rgba(250, 204, 21, 0.13), transparent 32%),
            linear-gradient(135deg, rgba(5, 46, 37, 0.96), rgba(15, 118, 110, 0.86)),
            url("{% static 'expat_life/images/rental_hero.webp' %}") center/cover no-repeat;
        color: #fff;
        overflow: hidden;
    }

    .owner-signup-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;
    }

    .owner-signup-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;
    }

    .owner-signup-hero .container {
        position: relative;
        z-index: 2;
    }

    .section-mini-title {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: .45rem .9rem;
        border-radius: 999px;
        background: rgba(255, 255, 255, 0.16);
        border: 1px solid rgba(255, 255, 255, 0.24);
        color: #ccfbf1;
        font-size: .82rem;
        font-weight: 800;
        letter-spacing: .08em;
        text-transform: uppercase;
        margin-bottom: 1rem;
    }

    .section-mini-title::before {
        content: "\F425";
        font-family: "bootstrap-icons";
        font-size: .95rem;
        color: #ccfbf1;
    }

    .owner-signup-hero h1 {
        font-size: clamp(2.3rem, 4.2vw, 4.1rem);
        font-weight: 900;
        letter-spacing: -.045em;
        line-height: 1.05;
        color: #fff;
    }

    .owner-signup-hero .lead {
        color: rgba(255, 255, 255, 0.86) !important;
        font-size: 1.12rem;
        line-height: 1.8;
        max-width: 560px;
    }

    .owner-benefit-list {
        display: grid;
        gap: .9rem;
        margin-top: 1.5rem;
    }

    .owner-benefit-item {
        display: flex;
        align-items: center;
        gap: .8rem;
        padding: .85rem 1rem;
        border-radius: 18px;
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.20);
        backdrop-filter: blur(8px);
        color: rgba(255, 255, 255, 0.92);
        font-weight: 600;
    }

    .owner-benefit-item i {
        color: #99f6e4;
        font-size: 1.15rem;
        flex: 0 0 auto;
    }

    .info-note-box {
        display: flex;
        gap: .85rem;
        padding: 1rem 1.1rem;
        border-radius: 20px;
        background: rgba(255, 251, 235, 0.12);
        border: 1px solid rgba(253, 230, 138, 0.34);
        color: rgba(255, 255, 255, 0.9);
        line-height: 1.65;
        backdrop-filter: blur(8px);
    }

    .info-note-box i {
        color: #fde68a;
        font-size: 1.25rem;
        margin-top: .15rem;
        flex: 0 0 auto;
    }

    .contact-form-card {
        border-radius: 32px;
        overflow: hidden;
        background: rgba(255, 255, 255, 0.96);
        border: 1px solid rgba(255, 255, 255, 0.35);
        box-shadow: 0 30px 80px rgba(0, 0, 0, 0.28);
        backdrop-filter: blur(14px);
    }

    .contact-form-header {
        padding: 2rem 2rem 1.2rem;
        background: linear-gradient(135deg, #ffffff, #f0fdfa);
        border-bottom: 1px solid #e2e8f0;
    }

    .contact-form-header h3 {
        color: #0f172a;
        letter-spacing: -.025em;
    }

    .contact-form-header p {
        color: #64748b !important;
    }

    .contact-form-body {
        padding: 2rem;
    }

    .contact-form-body .form-label {
        color: #0f172a;
        font-weight: 700;
        font-size: .92rem;
        margin-bottom: .45rem;
    }

    .contact-form-body input,
    .contact-form-body select,
    .contact-form-body textarea {
        border-radius: 15px !important;
        border: 1px solid #cbd5e1 !important;
        padding: .72rem .95rem !important;
        color: #0f172a !important;
        background-color: #fff !important;
        box-shadow: none !important;
    }

    .contact-form-body input[type="file"] {
        padding: .65rem .9rem !important;
    }

    .contact-form-body textarea {
        min-height: 110px;
    }

    .contact-form-body input:focus,
    .contact-form-body select:focus,
    .contact-form-body textarea:focus {
        border-color: #0f766e !important;
        box-shadow: 0 0 0 .22rem rgba(15, 118, 110, 0.13) !important;
    }

    .owner-submit-wrap {
        margin-top: 1.5rem;
        padding-top: 1.5rem;
        border-top: 1px solid #e2e8f0;
    }

    .owner-submit-wrap .btn-dark {
        background: linear-gradient(135deg, #0f766e, #064e3b);
        border: none;
        border-radius: 999px;
        padding: .9rem 1.2rem;
        font-weight: 800;
        box-shadow: 0 18px 34px rgba(15, 118, 110, 0.26);
        transition: all .2s ease;
    }

    .owner-submit-wrap .btn-dark:hover {
        transform: translateY(-2px);
        box-shadow: 0 22px 42px rgba(15, 118, 110, 0.34);
        background: linear-gradient(135deg, #0d9488, #065f46);
    }

    .owner-form-note {
        color: #64748b;
    }

    @media (max-width: 991.98px) {
        .owner-signup-hero {
            padding: 4.5rem 0;
        }

        .contact-form-card {
            border-radius: 26px;
        }

        .contact-form-header,
        .contact-form-body {
            padding: 1.5rem;
        }
    }

    @media (max-width: 575.98px) {
        .owner-signup-hero {
            padding: 3.5rem 0;
        }

        .owner-benefit-item,
        .info-note-box {
            border-radius: 16px;
        }
    }
</style>
<section class="owner-signup-hero">
    <div class="container">
        <div class="row align-items-center justify-content-center g-5">
            <div class="col-lg-5">
                <span class="section-mini-title">Property Owners</span>

                <h1 class="fw-bold mb-3">Rental Owner Signup</h1>

                <p class="lead">
                    If you have a room, annex, apartment, house, or villa suitable for international Guests,
                    register here for listing review and approval.
                </p>

                <div class="owner-benefit-list">
                    <div class="owner-benefit-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>List suitable rooms, annexes, apartments, houses, or villas</span>
                    </div>

                    <div class="owner-benefit-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Reach serious long-stay international Guests</span>
                    </div>

                    <div class="owner-benefit-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Listings are reviewed before approval for trust and quality</span>
                    </div>

                    <div class="owner-benefit-item">
                        <i class="bi bi-check-circle-fill"></i>
                        <span>Direct public contact details are protected by default</span>
                    </div>
                </div>

                <div class="info-note-box mt-4">
                    <i class="bi bi-info-circle-fill"></i>
                    <div>
                        Your details and listings will be reviewed before approval. Direct public contact is
                        not automatically shown, helping protect both owners and Guests.
                    </div>
                </div>
            </div>

            <div class="col-lg-7">
                <div class="contact-form-card shadow-lg">
                    <div class="contact-form-header">
                        <h3 class="fw-bold mb-2">Owner Signup Form</h3>
                        <p class="mb-0">
                            Submit your basic owner details first. After review, you can add suitable rental listings.
                        </p>
                    </div>

                    <form method="post" enctype="multipart/form-data" class="contact-form-body">
                        {% csrf_token %}

                        {% if form.non_field_errors %}
                            <div class="alert alert-danger rounded-4 mb-3">
                                {% for error in form.non_field_errors %}
                                    <div>{{ error }}</div>
                                {% endfor %}
                            </div>
                        {% endif %}

                        <div class="row g-3">
                            <div class="col-md-6">
                                <label class="form-label">Owner Type</label>
                                {{ form.owner_type }}
                                {% for error in form.owner_type.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Full Name</label>
                                {{ form.full_name }}
                                {% for error in form.full_name.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Email</label>
                                {{ form.email }}
                                {% for error in form.email.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">WhatsApp</label>
                                {{ form.whatsapp_number }}
                                {% for error in form.whatsapp_number.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">Phone</label>
                                {{ form.phone_number }}
                                {% for error in form.phone_number.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-6">
                                <label class="form-label">City</label>
                                {{ form.city }}
                                {% for error in form.city.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-12">
                                <label class="form-label">Address</label>
                                {{ form.address }}
                                {% for error in form.address.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-12">
                                <label class="form-label">Business Name</label>
                                {{ form.business_name }}
                                {% for error in form.business_name.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>

                            <div class="col-md-12">
                                <label class="form-label">Profile Image</label>
                                {{ form.profile_image }}
                                {% for error in form.profile_image.errors %}
                                    <div class="text-danger small mt-1">{{ error }}</div>
                                {% endfor %}
                            </div>
                        </div>

                        <div class="owner-submit-wrap">
                            <button class="btn btn-dark btn-lg w-100" type="submit">
                                Submit Owner Signup
                                <i class="bi bi-arrow-right ms-1"></i>
                            </button>

                            <p class="small owner-form-note text-center mt-3 mb-0">
                                Your owner profile will be reviewed before listings are publicly approved.
                            </p>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</section>
{% endblock %}