{% extends 'expat_life/base.html' %}
{% block title %}{{ title }}{% endblock %}

{% block content %}
<style>
    /* =========================================================
       CONTACT / SUBMISSION SUCCESS PAGE - PREMIUM TOUCH
       Live in Sri Lanka Theme
       ========================================================= */

    .success-page-section {
        position: relative;
        overflow: hidden;
        background:
            radial-gradient(circle at top left, rgba(255, 193, 7, 0.12), transparent 28%),
            radial-gradient(circle at 88% 18%, rgba(13, 110, 253, 0.10), transparent 32%),
            radial-gradient(circle at bottom right, rgba(32, 201, 151, 0.12), transparent 32%),
            linear-gradient(180deg, #f5f9ff 0%, #ffffff 100%);
        min-height: 72vh;
    }

    .success-page-section::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 330px;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.13), transparent 34%),
            linear-gradient(135deg, rgba(7, 19, 28, 0.06), rgba(13, 110, 253, 0.06));
        pointer-events: none;
    }

    .success-page-section .container {
        position: relative;
        z-index: 2;
    }

    .success-card {
        position: relative;
        overflow: hidden;
        padding: 3rem 2.4rem;
        border-radius: 36px;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.12), transparent 34%),
            linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #f8fbff 100%);
        border: 1px solid rgba(13, 110, 253, 0.12);
        box-shadow: 0 32px 85px rgba(15, 23, 42, 0.16);
    }

    .success-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 6px;
        background: linear-gradient(90deg, #ffc107, #0f766e, #0d6efd);
    }

    .success-card::after {
        content: "";
        position: absolute;
        width: 260px;
        height: 260px;
        right: -120px;
        bottom: -140px;
        border-radius: 50%;
        background: rgba(13, 110, 253, 0.07);
        pointer-events: none;
    }

    .success-card > * {
        position: relative;
        z-index: 2;
    }

    .success-icon-wrap {
        width: 104px;
        height: 104px;
        margin: 0 auto 1.4rem;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border-radius: 36px;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.20), transparent 36%),
            linear-gradient(135deg, #ecfdf5, #e9f2ff);
        color: #0f766e;
        font-size: 3rem;
        box-shadow: 0 20px 44px rgba(15, 118, 110, 0.16);
    }

    .success-card .section-mini-title,
    .section-heading .section-mini-title {
        display: inline-flex;
        align-items: center;
        gap: .45rem;
        padding: .45rem .9rem;
        border-radius: 999px;
        background: rgba(15, 118, 110, 0.10);
        border: 1px solid rgba(15, 118, 110, 0.16);
        color: #0f766e;
        font-size: .78rem;
        font-weight: 900;
        letter-spacing: .08em;
        text-transform: uppercase;
        margin-bottom: 1rem;
    }

    .success-card .section-mini-title::before,
    .section-heading .section-mini-title::before {
        content: "";
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #ffc107;
        box-shadow: 0 0 0 5px rgba(255, 193, 7, 0.14);
    }

    .success-card h1 {
        color: #102033;
        font-size: clamp(2rem, 4vw, 3.15rem);
        font-weight: 950;
        letter-spacing: -0.04em;
        line-height: 1.08;
    }

    .success-card .lead {
        color: #64748b !important;
        line-height: 1.78;
        max-width: 660px;
        margin-left: auto;
        margin-right: auto;
    }

    .success-info-box {
        display: flex;
        align-items: flex-start;
        gap: .85rem;
        max-width: 680px;
        margin: 0 auto;
        padding: 1rem 1.1rem;
        border-radius: 20px;
        background: #f8fbff;
        border: 1px solid rgba(13, 110, 253, 0.14);
        border-left: 4px solid #0f766e;
        color: #334155;
        line-height: 1.65;
        text-align: left;
    }

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

    .success-card .alert-success {
        border-radius: 24px;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.10), transparent 32%),
            linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
        border: 1px solid rgba(15, 118, 110, 0.16);
        border-left: 5px solid #0f766e;
        color: #334155;
    }

    .success-card .alert-success h5 {
        color: #102033;
    }

    .success-card .alert-success i {
        color: #0f766e;
    }

    .success-card .alert-success strong {
        color: #0d6efd;
    }

    .success-card .btn {
        border-radius: 999px;
        font-weight: 850;
        letter-spacing: .01em;
        transition: all .22s ease;
    }

    .success-card .btn-warning {
        border: none;
        background: linear-gradient(135deg, #ffd36b, #ffc107);
        color: #231707;
        box-shadow: 0 16px 32px rgba(255, 193, 7, 0.22);
    }

    .success-card .btn-warning:hover {
        background: linear-gradient(135deg, #ffe08a, #ffc107);
        color: #231707;
        transform: translateY(-2px);
    }

    .success-card .btn-dark {
        border: none;
        background: linear-gradient(135deg, #07131c, #0d6efd);
        color: #ffffff;
        box-shadow: 0 16px 32px rgba(13, 110, 253, 0.20);
    }

    .success-card .btn-dark:hover {
        background: linear-gradient(135deg, #07131c, #0f766e);
        transform: translateY(-2px);
    }

    /* =========================================================
       NEXT OPTIONS SECTION
       ========================================================= */

    section.bg-white {
        position: relative;
        background:
            radial-gradient(circle at top left, rgba(255, 193, 7, 0.07), transparent 28%),
            radial-gradient(circle at 88% 20%, rgba(13, 110, 253, 0.06), transparent 30%),
            linear-gradient(180deg, #ffffff 0%, #f8fbff 100%) !important;
    }

    .section-heading h2 {
        color: #102033;
        font-weight: 950;
        letter-spacing: -0.035em;
    }

    .section-heading p {
        color: #64748b !important;
        line-height: 1.75;
        max-width: 760px;
        margin-left: auto;
        margin-right: auto;
    }

    .step-card {
        position: relative;
        overflow: hidden;
        border-radius: 28px;
        border: 1px solid rgba(13, 110, 253, 0.10);
        background: rgba(255, 255, 255, 0.97);
        box-shadow: 0 22px 50px rgba(15, 23, 42, 0.08);
        padding: 1.8rem 1.45rem;
        transition: all .24s ease;
    }

    .step-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 5px;
        background: linear-gradient(90deg, #ffc107, #0f766e, #0d6efd);
    }

    .step-card:hover {
        transform: translateY(-6px);
        box-shadow: 0 30px 72px rgba(15, 23, 42, 0.14);
        border-color: rgba(13, 110, 253, 0.24);
    }

    .step-number {
        width: 68px;
        height: 68px;
        margin: 0 auto 1rem;
        border-radius: 24px;
        background: linear-gradient(135deg, #0f766e, #0d6efd);
        color: #ffffff;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-weight: 950;
        font-size: 1.1rem;
        box-shadow: 0 18px 35px rgba(13, 110, 253, 0.20);
    }

    .step-card h5 {
        color: #102033;
        font-weight: 900;
        letter-spacing: -0.02em;
    }

    .step-card p {
        color: #64748b;
        line-height: 1.72;
    }

    .step-card .btn-outline-dark {
        border-radius: 999px;
        border: 2px solid #0d6efd;
        color: #0d6efd;
        font-weight: 850;
        padding: .7rem 1.15rem;
    }

    .step-card .btn-outline-dark:hover {
        background: #0d6efd;
        border-color: #0d6efd;
        color: #ffffff;
        transform: translateY(-1px);
    }

    @media (max-width: 767.98px) {
        .success-card {
            padding: 2.3rem 1.4rem;
            border-radius: 28px;
        }

        .success-icon-wrap {
            width: 88px;
            height: 88px;
            border-radius: 30px;
            font-size: 2.55rem;
        }

        .success-info-box {
            flex-direction: column;
            text-align: center;
            align-items: center;
        }

        .step-card {
            border-radius: 24px;
        }
    }
</style>
<section class="success-page-section py-5">
    <div class="container">
        <div class="row justify-content-center">
            <div class="col-lg-8">
                <div class="success-card text-center shadow-lg">
                    <div class="success-icon-wrap">
                        <i class="bi bi-check-circle-fill"></i>
                    </div>

                    <span class="section-mini-title">Submission Successful</span>
                    <h1 class="fw-bold mb-3">{{ heading }}</h1>
                    <p class="lead text-muted mb-4">
                        {{ message }}
                    </p>

                    <div class="success-info-box">
                        <i class="bi bi-info-circle-fill"></i>
                        <div>
                            You may continue exploring the website while we review your submission and prepare the next suitable step.
                        </div>
                    </div>

                    {% if username or new_account_email or account_role %}
                    <div class="alert alert-success text-start mt-4 shadow-sm">
                        <h5 class="fw-bold mb-3">
                            <i class="bi bi-person-check-fill me-2"></i>Account Created Successfully
                        </h5>

                        {% if account_role %}
                            <p class="mb-2"><strong>Account Type:</strong> {{ account_role }}</p>
                        {% endif %}

                        {% if new_account_email %}
                            <p class="mb-2">
                                <strong>Email:</strong> {{ new_account_email }}
                            </p>
                            <p class="mb-2 text-muted small">
                                Your login details have also been sent to this email address.
                            </p>
                        {% endif %}

                        {% if username %}
                            <p class="mb-2"><strong>Username:</strong> {{ username }}</p>
                        {% endif %}

                        {% if password %}
                            <p class="mb-2"><strong>Temporary Password:</strong> {{ password }}</p>
                        {% endif %}

                        <hr>
                        <p class="mb-0 small text-muted">
                            Please keep your login details safe. For better security, it is recommended to change your password after your first login.
                        </p>
                    </div>
                    {% endif %}

                    <div class="d-flex flex-wrap justify-content-center gap-3 mt-4">
                        <a href="{% url button_1_url %}" class="btn btn-warning btn-lg px-4">
                            {{ button_1_text }}
                        </a>
                        <a href="{% url button_2_url %}" class="btn btn-dark btn-lg px-4">
                            {{ button_2_text }}
                        </a>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>

<section class="py-5 bg-white">
    <div class="container">
        <div class="section-heading text-center mb-5">
            <span class="section-mini-title">Next Options</span>
            <h2 class="fw-bold">What You Can Do Next</h2>
            <p class="text-muted">
                While waiting, you can continue learning more about Sri Lanka living and the available package options.
            </p>
        </div>

        <div class="row g-4">
            <div class="col-md-4">
                <div class="step-card text-center h-100">
                    <div class="step-number">01</div>
                    <h5 class="fw-bold">Review Packages</h5>
                    <p>Explore the available package levels and compare the lifestyle options.</p>
                    <a href="{% url 'expat_life:package_list' %}" class="btn btn-outline-dark mt-3">View Packages</a>
                </div>
            </div>

            <div class="col-md-4">
                <div class="step-card text-center h-100">
                    <div class="step-number">02</div>
                    <h5 class="fw-bold">About Sri Lanka</h5>
                    <p>Read more about why Sri Lanka can be an attractive long-stay lifestyle choice.</p>
                    <a href="{% url 'expat_life:about_sri_lanka' %}" class="btn btn-outline-dark mt-3">Read More</a>
                </div>
            </div>

            <div class="col-md-4">
                <div class="step-card text-center h-100">
                    <div class="step-number">03</div>
                    <h5 class="fw-bold">Contact Us</h5>
                    <p>If needed, send another message or ask more questions about the next step.</p>
                    <a href="{% url 'expat_life:contact_page' %}" class="btn btn-outline-dark mt-3">Contact Us</a>
                </div>
            </div>
        </div>
    </div>
</section>

{% endblock %}