{% extends 'affiliates_app/base_affiliate.html' %}
{% load static %}

{% block title %}Affiliate Refund & Payment Policy | Partner with Ensolanka{% endblock %}

{% block extra_css %}
<style>
    .affiliate-payment-hero {
        position: relative;
        padding: 95px 0 82px;
        background:
            linear-gradient(135deg, rgba(4, 47, 46, 0.97), rgba(15, 118, 110, 0.93)),
            url("{% static 'expat_life/images/affiliates_hero.webp' %}") center center / cover no-repeat;
        color: #fff;
        overflow: hidden;
    }

    .affiliate-payment-hero::after {
        content: "";
        position: absolute;
        inset: 0;
        background:
            radial-gradient(circle at top right, rgba(255, 193, 7, 0.18), transparent 36%),
            radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.08), transparent 30%);
        pointer-events: none;
    }

    .affiliate-payment-hero .container {
        position: relative;
        z-index: 2;
    }

    .payment-hero-badge {
        display: inline-flex;
        align-items: center;
        gap: 8px;
        padding: 9px 17px;
        border-radius: 999px;
        background: rgba(255, 193, 7, 0.18);
        border: 1px solid rgba(255, 193, 7, 0.38);
        color: #ffd65c;
        font-size: 0.84rem;
        font-weight: 800;
        letter-spacing: 0.05em;
        text-transform: uppercase;
    }

    .payment-meta-card {
        background: rgba(255, 255, 255, 0.12);
        border: 1px solid rgba(255, 255, 255, 0.18);
        border-radius: 22px;
        padding: 22px;
        backdrop-filter: blur(10px);
        height: 100%;
    }

    .payment-meta-card i {
        color: #ffc107;
        font-size: 1.35rem;
    }

    .payment-meta-card h6 {
        font-weight: 800;
        margin-bottom: 6px;
    }

    .payment-summary-section {
        background: #fff;
        padding: 58px 0;
    }

    .payment-summary-card {
        background: #fff;
        border-radius: 28px;
        border: 1px solid #e8eef3;
        padding: 30px;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
        height: 100%;
    }

    .payment-summary-icon {
        width: 56px;
        height: 56px;
        border-radius: 18px;
        background: #ecfdf5;
        color: #047857;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 1.55rem;
        margin-bottom: 18px;
    }

    .payment-main-section {
        background: #f8fafc;
        padding: 72px 0;
    }

    .payment-nav-card {
        position: sticky;
        top: 120px;
        background: #fff;
        border-radius: 28px;
        padding: 26px;
        border: 1px solid #e8eef3;
        box-shadow: 0 18px 45px rgba(15, 23, 42, 0.06);
    }

    .payment-nav-title {
        font-weight: 900;
        color: #0f172a;
        margin-bottom: 18px;
    }

    .payment-nav-list {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    .payment-nav-list li {
        margin-bottom: 10px;
    }

    .payment-nav-list a {
        display: block;
        text-decoration: none;
        color: #475569;
        font-weight: 700;
        font-size: 0.94rem;
        padding: 9px 12px;
        border-radius: 12px;
        transition: 0.2s ease;
    }

    .payment-nav-list a:hover {
        background: #ecfdf5;
        color: #047857;
    }

    .payment-content-card {
        background: #fff;
        border-radius: 30px;
        border: 1px solid #e8eef3;
        padding: 42px;
        box-shadow: 0 20px 50px rgba(15, 23, 42, 0.06);
    }

    .payment-section {
        scroll-margin-top: 125px;
        padding-bottom: 38px;
        margin-bottom: 38px;
        border-bottom: 1px solid #e7edf3;
    }

    .payment-section:last-child {
        padding-bottom: 0;
        margin-bottom: 0;
        border-bottom: none;
    }

    .payment-section h2 {
        font-size: 1.55rem;
        font-weight: 900;
        color: #0f172a;
        margin-bottom: 18px;
    }

    .payment-section h3 {
        font-size: 1.15rem;
        font-weight: 800;
        color: #0f766e;
        margin-top: 24px;
        margin-bottom: 12px;
    }

    .payment-section p,
    .payment-section li {
        color: #475569;
        line-height: 1.82;
    }

    .payment-section strong {
        color: #0f172a;
    }

    .payment-list {
        padding-left: 1.2rem;
    }

    .payment-list li {
        margin-bottom: 9px;
    }

    .payment-highlight-box {
        background: #ecfdf5;
        border: 1px solid #bbf7d0;
        border-radius: 20px;
        padding: 22px;
        color: #065f46;
        margin-top: 18px;
    }

    .payment-warning-box {
        background: #fff7ed;
        border: 1px solid #fed7aa;
        border-radius: 20px;
        padding: 22px;
        color: #9a3412;
        margin-top: 18px;
    }

    .payment-danger-box {
        background: #fef2f2;
        border: 1px solid #fecaca;
        border-radius: 20px;
        padding: 22px;
        color: #991b1b;
        margin-top: 18px;
    }

    .payment-neutral-box {
        background: #f8fafc;
        border: 1px solid #e2e8f0;
        border-radius: 20px;
        padding: 22px;
        color: #475569;
        margin-top: 18px;
    }

    .payment-table-wrap {
        border-radius: 22px;
        overflow: hidden;
        border: 1px solid #e2e8f0;
        margin-top: 20px;
    }

    .payment-table-wrap .table {
        margin-bottom: 0;
    }

    .payment-table-wrap thead th {
        background: #064e3b;
        color: #fff;
        font-size: 0.82rem;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        padding: 15px;
        white-space: nowrap;
    }

    .payment-table-wrap tbody td {
        padding: 15px;
        vertical-align: top;
        color: #334155;
    }

    .payment-table-wrap tbody tr:nth-child(even) {
        background: #f8fafc;
    }

    .payment-badge {
        display: inline-block;
        background: #dcfce7;
        color: #166534;
        border-radius: 999px;
        padding: 6px 12px;
        font-weight: 900;
        font-size: 0.9rem;
    }

    .payment-mini-title {
        display: inline-block;
        color: #0f766e;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        font-size: 0.82rem;
        margin-bottom: 12px;
    }

    .payment-final-cta {
        background: linear-gradient(135deg, #052e25 0%, #0f766e 100%);
        border-radius: 30px;
        padding: 42px;
        color: #fff;
        margin-top: 42px;
    }

    .payment-final-cta p {
        color: rgba(255, 255, 255, 0.9);
    }

    .mobile-payment-nav {
        display: none;
        background: #fff;
        border-radius: 22px;
        border: 1px solid #e8eef3;
        padding: 22px;
        box-shadow: 0 14px 35px rgba(15, 23, 42, 0.05);
    }

    .mobile-payment-nav .form-select {
        border-radius: 14px;
        padding: 12px 14px;
    }

    @media (max-width: 991px) {
        .payment-nav-card {
            display: none;
        }

        .mobile-payment-nav {
            display: block;
            margin-bottom: 28px;
        }

        .payment-content-card {
            padding: 28px 22px;
        }

        .affiliate-payment-hero {
            padding: 78px 0 68px;
        }

        .payment-final-cta {
            padding: 30px 24px;
        }
    }
</style>
{% endblock %}


{% block content %}

<!-- HERO -->
<section class="affiliate-payment-hero">
    <div class="container">
        <div class="row align-items-center g-5">
            <div class="col-lg-8">
                <span class="payment-hero-badge mb-3">
                    <i class="bi bi-credit-card-2-front-fill"></i>
                    Affiliate Refund & Payment Policy
                </span>

                <h1 class="display-5 fw-bold mb-3">
                    Refund, Commission, and Payout Policy for Ensolanka Global Ambassadors
                </h1>

                <p class="lead mb-4">
                    This policy explains how affiliate commissions are earned, reviewed, paid,
                    adjusted, or reversed when guest payments are refunded, disputed, cancelled,
                    or otherwise invalidated.
                </p>

                <div class="d-flex flex-wrap gap-3">
                    <a href="{% url 'affiliates_app:terms' %}" class="btn btn-warning btn-lg px-4">
                        View Terms & Conditions
                    </a>

                    <a href="{% url 'affiliates_app:contact_page_aff' %}" class="btn btn-outline-light btn-lg px-4">
                        Contact Ensolanka
                    </a>
                </div>
            </div>

            <div class="col-lg-4">
                <div class="row g-3">
                    <div class="col-12">
                        <div class="payment-meta-card">
                            <div class="d-flex gap-3 align-items-start">
                                <i class="bi bi-calendar-check-fill"></i>
                                <div>
                                    <h6>Effective Date</h6>
                                    <p class="mb-0 small">12 May 2026</p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-12">
                        <div class="payment-meta-card">
                            <div class="d-flex gap-3 align-items-start">
                                <i class="bi bi-wallet2"></i>
                                <div>
                                    <h6>Payout Basis</h6>
                                    <p class="mb-0 small">
                                        Approved commissions available in the affiliate wallet.
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>

                    <div class="col-12">
                        <div class="payment-meta-card">
                            <div class="d-flex gap-3 align-items-start">
                                <i class="bi bi-arrow-counterclockwise"></i>
                                <div>
                                    <h6>Refund Impact</h6>
                                    <p class="mb-0 small">
                                        Refunded or disputed guest payments may reverse affiliate commissions.
                                    </p>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>
</section>


<!-- SUMMARY -->
<section class="payment-summary-section">
    <div class="container">
        <div class="text-center mb-5">
            <span class="payment-mini-title">Policy Summary</span>
            <h2 class="fw-bold">Transparent Commission and Payout Rules</h2>
            <p class="text-muted mb-0">
                Affiliates earn only from valid, tracked, and successfully completed guest payments.
                Payouts are processed from approved available balances after review.
            </p>
        </div>

        <div class="row g-4">
            <div class="col-md-6 col-lg-3">
                <div class="payment-summary-card">
                    <div class="payment-summary-icon">
                        <i class="bi bi-person-check-fill"></i>
                    </div>
                    <h5 class="fw-bold">Valid Referral Required</h5>
                    <p class="text-muted mb-0">
                        The guest must be properly attributed to the affiliate through approved tracking.
                    </p>
                </div>
            </div>

            <div class="col-md-6 col-lg-3">
                <div class="payment-summary-card">
                    <div class="payment-summary-icon">
                        <i class="bi bi-cash-coin"></i>
                    </div>
                    <h5 class="fw-bold">Commission on Paid Events</h5>
                    <p class="text-muted mb-0">
                        Signup alone does not create commission. Eligible guest payments do.
                    </p>
                </div>
            </div>

            <div class="col-md-6 col-lg-3">
                <div class="payment-summary-card">
                    <div class="payment-summary-icon">
                        <i class="bi bi-send-check-fill"></i>
                    </div>
                    <h5 class="fw-bold">Payout Requests</h5>
                    <p class="text-muted mb-0">
                        Affiliates may request payouts from their Available Balance through the dashboard.
                    </p>
                </div>
            </div>

            <div class="col-md-6 col-lg-3">
                <div class="payment-summary-card">
                    <div class="payment-summary-icon">
                        <i class="bi bi-shield-exclamation"></i>
                    </div>
                    <h5 class="fw-bold">Refund / Dispute Adjustments</h5>
                    <p class="text-muted mb-0">
                        Guest refunds, disputes, or chargebacks may reduce or reverse related commissions.
                    </p>
                </div>
            </div>
        </div>
    </div>
</section>


<!-- MAIN POLICY -->
<section class="payment-main-section">
    <div class="container">

        <!-- MOBILE NAV -->
        <div class="mobile-payment-nav">
            <label for="mobilePaymentNav" class="form-label fw-bold mb-2">Jump to a Section</label>
            <select id="mobilePaymentNav" class="form-select"
                    onchange="if(this.value){window.location.href=this.value;}">
                <option value="">Select a topic</option>
                <option value="#payment-1">1. Introduction</option>
                <option value="#payment-2">2. Scope of This Policy</option>
                <option value="#payment-3">3. Affiliate Program Fees</option>
                <option value="#payment-4">4. When Commission Is Earned</option>
                <option value="#payment-5">5. Commission Structure</option>
                <option value="#payment-6">6. Wallet and Balance Definitions</option>
                <option value="#payment-7">7. Payout Requests</option>
                <option value="#payment-8">8. Payout Review and Processing</option>
                <option value="#payment-9">9. Refunds, Reversals, and Chargebacks</option>
                <option value="#payment-10">10. Commission Adjustments</option>
                <option value="#payment-11">11. Overpayments and Recovery</option>
                <option value="#payment-12">12. Payment Provider and Bank Delays</option>
                <option value="#payment-13">13. Tax Responsibility</option>
                <option value="#payment-14">14. No Guaranteed Earnings</option>
                <option value="#payment-15">15. Policy Updates</option>
                <option value="#payment-16">16. Contact</option>
            </select>
        </div>

        <div class="row g-4">

            <!-- SIDE NAV -->
            <div class="col-lg-3">
                <aside class="payment-nav-card">
                    <h5 class="payment-nav-title">Refund & Payment Policy</h5>

                    <ul class="payment-nav-list">
                        <li><a href="#payment-1">1. Introduction</a></li>
                        <li><a href="#payment-2">2. Scope</a></li>
                        <li><a href="#payment-3">3. Program Fees</a></li>
                        <li><a href="#payment-4">4. Commission Earning</a></li>
                        <li><a href="#payment-5">5. Commission Rates</a></li>
                        <li><a href="#payment-6">6. Wallet Definitions</a></li>
                        <li><a href="#payment-7">7. Payout Requests</a></li>
                        <li><a href="#payment-8">8. Review & Processing</a></li>
                        <li><a href="#payment-9">9. Refunds & Disputes</a></li>
                        <li><a href="#payment-10">10. Adjustments</a></li>
                        <li><a href="#payment-11">11. Overpayments</a></li>
                        <li><a href="#payment-12">12. Bank / Provider Delays</a></li>
                        <li><a href="#payment-13">13. Taxes</a></li>
                        <li><a href="#payment-14">14. No Income Guarantee</a></li>
                        <li><a href="#payment-15">15. Updates</a></li>
                        <li><a href="#payment-16">16. Contact</a></li>
                    </ul>
                </aside>
            </div>


            <!-- CONTENT -->
            <div class="col-lg-9">
                <article class="payment-content-card">

                    <!-- 1 -->
                    <section class="payment-section" id="payment-1">
                        <h2>1. Introduction</h2>

                        <p>
                            This Refund & Payment Policy applies to the
                            <strong>Partner with Ensolanka</strong> affiliate app and the
                            <strong>Ensolanka Global Ambassador Affiliate Program</strong>.
                        </p>

                        <p>
                            It explains how affiliate commissions are earned, how payout requests are processed,
                            and how refunds, chargebacks, reversals, payment disputes, or cancelled guest transactions
                            may affect affiliate commission records.
                        </p>

                        <p>
                            This policy should be read together with the
                            <a href="{% url 'affiliates_app:terms' %}">Terms & Conditions</a>,
                            <a href="{% url 'affiliates_app:privacy_policy' %}">Privacy Policy</a>,
                            and any other relevant program notices.
                        </p>
                    </section>


                    <!-- 2 -->
                    <section class="payment-section" id="payment-2">
                        <h2>2. Scope of This Policy</h2>

                        <p>
                            This policy governs affiliate-related payment matters, including:
                        </p>

                        <ul class="payment-list">
                            <li>Commission eligibility</li>
                            <li>Commission calculations</li>
                            <li>Affiliate wallet balances</li>
                            <li>Payout request procedures</li>
                            <li>Payment reviews and approvals</li>
                            <li>Commission reversal due to guest refunds, chargebacks, disputes, or cancelled transactions</li>
                        </ul>

                        <div class="payment-neutral-box">
                            <strong>Important distinction:</strong>
                            This page governs the <strong>affiliate program’s commission and payout process</strong>.
                            Refund rules relating to payments made by Guests within the Live in Sri Lanka portal
                            may be explained separately in the applicable Guest-facing payment or refund policy.
                        </div>
                    </section>


                    <!-- 3 -->
                    <section class="payment-section" id="payment-3">
                        <h2>3. Affiliate Program Fees and Payments by Affiliates</h2>

                        <p>
                            At present, the affiliate program is designed primarily as a referral and commission program.
                            Affiliates earn from qualifying referrals rather than paying commission-related fees to participate.
                        </p>

                        <p>
                            If Ensolanka later introduces optional paid services for affiliates—such as paid events,
                            premium customization, printed materials, or special training programs—any applicable payment,
                            cancellation, or refund terms will be displayed clearly at the time of purchase or registration.
                        </p>

                        <div class="payment-warning-box">
                            <strong>No automatic right to refund:</strong>
                            Where a separately priced affiliate service is purchased in the future, refund eligibility
                            will depend on the specific terms stated for that product, service, event, or order.
                        </div>
                    </section>


                    <!-- 4 -->
                    <section class="payment-section" id="payment-4">
                        <h2>4. When Affiliate Commission Is Earned</h2>

                        <p>
                            Commission is not earned merely because a person clicks an affiliate link,
                            scans a QR code, or signs up for a free guest profile.
                        </p>

                        <p>
                            A commission becomes eligible only when:
                        </p>

                        <ul class="payment-list">
                            <li>The referral is validly tracked and attributed to the affiliate</li>
                            <li>The referred guest completes an eligible payment event</li>
                            <li>The payment is successfully received and recognized by Ensolanka</li>
                            <li>The transaction is not refunded, disputed, reversed, cancelled, or otherwise invalidated</li>
                            <li>The affiliate remains compliant with the program Terms & Conditions</li>
                        </ul>

                        <div class="payment-highlight-box">
                            <strong>Signup creates a referral record. Payment completion creates commission eligibility.</strong>
                        </div>
                    </section>


                    <!-- 5 -->
                    <section class="payment-section" id="payment-5">
                        <h2>5. Current Affiliate Commission Structure</h2>

                        <h3>5.1 Commission from Guest Confirmation Fee</h3>

                        <p>
                            When a validly referred guest pays the current
                            <strong>USD 100 Guest Confirmation Fee</strong>,
                            the affiliate may earn:
                        </p>

                        <div class="payment-table-wrap">
                            <div class="table-responsive">
                                <table class="table align-middle">
                                    <thead>
                                        <tr>
                                            <th>Eligible Guest Payment</th>
                                            <th>Guest Payment Amount</th>
                                            <th>Affiliate Commission Rate</th>
                                            <th>Affiliate Commission</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td><strong>Guest Confirmation Fee</strong></td>
                                            <td>USD 100.00</td>
                                            <td>20%</td>
                                            <td><span class="payment-badge">USD 20.00</span></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>


                        <h3>5.2 Commission from One-Time Service Fee</h3>

                        <p>
                            When a validly referred guest pays the applicable one-time service fee,
                            the affiliate may earn 20% of that service fee according to the selected package:
                        </p>

                        <div class="payment-table-wrap">
                            <div class="table-responsive">
                                <table class="table align-middle">
                                    <thead>
                                        <tr>
                                            <th>Package</th>
                                            <th>Monthly Package Value</th>
                                            <th>Service Fee Basis</th>
                                            <th>One-Time Service Fee</th>
                                            <th>Affiliate Commission</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td><strong>Startup</strong></td>
                                            <td>USD 500</td>
                                            <td>90% of monthly package</td>
                                            <td>USD 450.00</td>
                                            <td><span class="payment-badge">USD 90.00</span></td>
                                        </tr>

                                        <tr>
                                            <td><strong>Comfort</strong></td>
                                            <td>USD 1,000</td>
                                            <td>75% of monthly package</td>
                                            <td>USD 750.00</td>
                                            <td><span class="payment-badge">USD 150.00</span></td>
                                        </tr>

                                        <tr>
                                            <td><strong>Premium</strong></td>
                                            <td>USD 2,000</td>
                                            <td>50% of monthly package</td>
                                            <td>USD 1,000.00</td>
                                            <td><span class="payment-badge">USD 200.00</span></td>
                                        </tr>

                                        <tr>
                                            <td><strong>Luxury</strong></td>
                                            <td>USD 3,000</td>
                                            <td>40% of monthly package</td>
                                            <td>USD 1,200.00</td>
                                            <td><span class="payment-badge">USD 240.00</span></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>


                        <h3>5.3 Total Possible Commission Per Fully Qualifying Guest</h3>

                        <div class="payment-table-wrap">
                            <div class="table-responsive">
                                <table class="table align-middle">
                                    <thead>
                                        <tr>
                                            <th>Package</th>
                                            <th>Confirmation Fee Commission</th>
                                            <th>Service Fee Commission</th>
                                            <th>Total Possible Affiliate Earning</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td><strong>Startup</strong></td>
                                            <td>USD 20.00</td>
                                            <td>USD 90.00</td>
                                            <td><span class="payment-badge">USD 110.00</span></td>
                                        </tr>

                                        <tr>
                                            <td><strong>Comfort</strong></td>
                                            <td>USD 20.00</td>
                                            <td>USD 150.00</td>
                                            <td><span class="payment-badge">USD 170.00</span></td>
                                        </tr>

                                        <tr>
                                            <td><strong>Premium</strong></td>
                                            <td>USD 20.00</td>
                                            <td>USD 200.00</td>
                                            <td><span class="payment-badge">USD 220.00</span></td>
                                        </tr>

                                        <tr>
                                            <td><strong>Luxury</strong></td>
                                            <td>USD 20.00</td>
                                            <td>USD 240.00</td>
                                            <td><span class="payment-badge">USD 260.00</span></td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>

                        <div class="payment-warning-box">
                            <strong>Rate changes:</strong>
                            Commission rates, package prices, service-fee percentages, or payout rules may be revised
                            prospectively by Ensolanka. The applicable dashboard and platform settings at the relevant time
                            will control.
                        </div>
                    </section>


                    <!-- 6 -->
                    <section class="payment-section" id="payment-6">
                        <h2>6. Affiliate Wallet and Balance Definitions</h2>

                        <p>
                            The affiliate dashboard may display different earning categories to help affiliates understand
                            referral value and payout status.
                        </p>

                        <div class="payment-table-wrap">
                            <div class="table-responsive">
                                <table class="table align-middle">
                                    <thead>
                                        <tr>
                                            <th>Dashboard Term</th>
                                            <th>Meaning</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <tr>
                                            <td><strong>Possible Future Earnings</strong></td>
                                            <td>
                                                Estimated potential based on referred guest package interest.
                                                This is not an approved or payable commission amount.
                                            </td>
                                        </tr>

                                        <tr>
                                            <td><strong>Pending Commission</strong></td>
                                            <td>
                                                Commission associated with guest progress or payment activity
                                                that is not yet fully cleared, approved, or available for payout.
                                            </td>
                                        </tr>

                                        <tr>
                                            <td><strong>Earned Commission</strong></td>
                                            <td>
                                                Commission associated with a qualifying guest payment that has passed
                                                the applicable internal verification stage.
                                            </td>
                                        </tr>

                                        <tr>
                                            <td><strong>Available Balance</strong></td>
                                            <td>
                                                The amount currently eligible to be requested for payout,
                                                subject to final admin review and payout processing.
                                            </td>
                                        </tr>
                                    </tbody>
                                </table>
                            </div>
                        </div>
                    </section>


                    <!-- 7 -->
                    <section class="payment-section" id="payment-7">
                        <h2>7. Payout Requests</h2>

                        <p>
                            Affiliates may request a payout from the amount shown as
                            <strong>Available Balance</strong> in their dashboard.
                        </p>

                        <p>
                            The dashboard payout form may require the affiliate to enter:
                        </p>

                        <ul class="payment-list">
                            <li>The amount requested in USD</li>
                            <li>Any required payout information already stored or requested by Ensolanka</li>
                            <li>Additional verification details where necessary</li>
                        </ul>

                        <p>
                            Submission of a payout request does not guarantee immediate transfer.
                            All payout requests remain subject to verification and approval.
                        </p>
                    </section>


                    <!-- 8 -->
                    <section class="payment-section" id="payment-8">
                        <h2>8. Payout Review and Processing</h2>

                        <p>
                            To protect the integrity of the program, Ensolanka may review payout requests before processing.
                            The review may include checking that:
                        </p>

                        <ul class="payment-list">
                            <li>The requested amount does not exceed the available payout balance</li>
                            <li>The underlying guest payments were properly received</li>
                            <li>No refund, chargeback, reversal, or payment dispute is pending</li>
                            <li>No affiliate policy violation or suspicious activity is associated with the commissions</li>
                            <li>Payout details are complete and accurate</li>
                        </ul>

                        <p>
                            Payouts may be processed through supported payment methods such as bank transfer,
                            Stripe-supported systems, or another method adopted by Ensolanka. The Global Ambassador Playbook
                            currently describes payout handling through the Stripe ecosystem or direct bank transfers. :contentReference[oaicite:1]{index=1}
                        </p>
                    </section>


                    <!-- 9 -->
                    <section class="payment-section" id="payment-9">
                        <h2>9. Guest Refunds, Reversals, Disputes, and Chargebacks</h2>

                        <p>
                            Affiliate commission is directly connected to eligible guest payments.
                            If the underlying guest payment is later refunded, reversed, cancelled, disputed,
                            or charged back, Ensolanka may treat the related commission as invalid.
                        </p>

                        <p>
                            This may apply to:
                        </p>

                        <ul class="payment-list">
                            <li>Refund of a Guest Confirmation Fee</li>
                            <li>Refund of a One-Time Service Fee</li>
                            <li>Bank or card disputes initiated by the guest or cardholder</li>
                            <li>Chargebacks or payment reversals</li>
                            <li>Transactions later identified as fraudulent, unauthorized, or invalid</li>
                        </ul>

                        <div class="payment-danger-box">
                            <strong>Commission consequence:</strong>
                            If a guest payment is refunded, reversed, disputed, or invalidated,
                            the corresponding affiliate commission may be cancelled, reversed, deducted,
                            or removed from pending, earned, or available balance records.
                        </div>

                        <p class="mt-3">
                            Payment processors may handle refunds and disputes through their own timelines and procedures.
                            For example, Stripe explains that refunds can be full or partial and that disputes may separately
                            affect payment balances depending on the dispute process. :contentReference[oaicite:2]{index=2}
                        </p>
                    </section>


                    <!-- 10 -->
                    <section class="payment-section" id="payment-10">
                        <h2>10. Commission Adjustments Before Payout</h2>

                        <p>
                            Before payout is completed, Ensolanka may adjust commission records where:
                        </p>

                        <ul class="payment-list">
                            <li>The underlying guest payment is refunded or partially refunded</li>
                            <li>A payment dispute or chargeback is opened</li>
                            <li>A transaction is reversed, cancelled, or marked invalid</li>
                            <li>The referral attribution is found to be incorrect</li>
                            <li>A dashboard or calculation error is identified</li>
                            <li>Affiliate conduct violates program terms</li>
                        </ul>

                        <p>
                            Such adjustments may reduce:
                        </p>

                        <ul class="payment-list">
                            <li>Pending Commission</li>
                            <li>Earned Commission</li>
                            <li>Available Balance</li>
                        </ul>

                        <div class="payment-neutral-box">
                            Ensolanka’s internal commission ledger, payment records, and admin review decisions
                            will be used to determine final payout eligibility.
                        </div>
                    </section>


                    <!-- 11 -->
                    <section class="payment-section" id="payment-11">
                        <h2>11. Overpayments, Previously Paid Commissions, and Recovery</h2>

                        <p>
                            If Ensolanka has already paid an affiliate commission and the underlying guest payment
                            is later refunded, reversed, disputed, charged back, or otherwise invalidated,
                            Ensolanka may take reasonable corrective action.
                        </p>

                        <p>
                            Corrective action may include:
                        </p>

                        <ul class="payment-list">
                            <li>Deducting the reversed commission from future affiliate earnings</li>
                            <li>Reducing a future available balance</li>
                            <li>Offsetting the amount against future payout requests</li>
                            <li>Requesting repayment where no future balance is available and the overpayment is material</li>
                        </ul>

                        <div class="payment-warning-box">
                            <strong>Example:</strong>
                            If a service-fee commission is paid to an affiliate and that guest payment is later fully reversed
                            through a chargeback, Ensolanka may recover the affiliate commission associated with that invalidated payment.
                        </div>
                    </section>


                    <!-- 12 -->
                    <section class="payment-section" id="payment-12">
                        <h2>12. Payment Provider, Bank, and Processing Delays</h2>

                        <p>
                            Payout timing may depend on several factors, including:
                        </p>

                        <ul class="payment-list">
                            <li>Admin review and verification time</li>
                            <li>Payment provider processing periods</li>
                            <li>Banking holidays or transfer delays</li>
                            <li>Incomplete or incorrect payout information</li>
                            <li>Compliance checks or security reviews</li>
                        </ul>

                        <p>
                            Where refunds are issued through payment processors, the time for funds to reach the payer
                            may depend on the provider, card network, or bank. Stripe notes that refund visibility and settlement
                            depend on payment networks and banks, and refund status may move through several processing stages. :contentReference[oaicite:3]{index=3}
                        </p>
                    </section>


                    <!-- 13 -->
                    <section class="payment-section" id="payment-13">
                        <h2>13. Tax and Financial Responsibility</h2>

                        <p>
                            Affiliates are responsible for understanding and meeting any tax, reporting,
                            invoice, banking, or regulatory obligations that apply to commission income
                            in their own country or jurisdiction.
                        </p>

                        <p>
                            Ensolanka may request information reasonably necessary for payout administration,
                            record keeping, or compliance where applicable.
                        </p>

                        <div class="payment-neutral-box">
                            Ensolanka does not provide individual tax advice to affiliates.
                        </div>
                    </section>


                    <!-- 14 -->
                    <section class="payment-section" id="payment-14">
                        <h2>14. No Guaranteed Earnings or Payout Amount</h2>

                        <p>
                            Ensolanka provides a genuine affiliate earning opportunity, but does not guarantee:
                        </p>

                        <ul class="payment-list">
                            <li>A fixed number of referrals</li>
                            <li>A minimum monthly earning</li>
                            <li>A specific conversion rate</li>
                            <li>A guaranteed payout amount</li>
                            <li>That every signup will become a confirmed or completed client</li>
                        </ul>

                        <p>
                            Actual affiliate income depends on valid tracked referrals, guest decisions,
                            successful guest payments, package selection, refund/dispute outcomes,
                            platform rules, and payout approval.
                        </p>
                    </section>


                    <!-- 15 -->
                    <section class="payment-section" id="payment-15">
                        <h2>15. Changes to This Policy</h2>

                        <p>
                            Ensolanka may revise this Refund & Payment Policy from time to time to reflect:
                        </p>

                        <ul class="payment-list">
                            <li>Changes to commission rates</li>
                            <li>Changes to service-fee calculations</li>
                            <li>Changes to payout methods or review procedures</li>
                            <li>Changes to refund or dispute handling</li>
                            <li>Changes in payment technology or legal requirements</li>
                            <li>Operational improvements to the affiliate program</li>
                        </ul>

                        <p>
                            Updated versions will be published on this page with a revised effective or last-updated date.
                        </p>
                    </section>


                    <!-- 16 -->
                    <section class="payment-section" id="payment-16">
                        <h2>16. Contact Us</h2>

                        <p>
                            For questions about commissions, payout requests, payment adjustments,
                            refund-related commission reversals, or this Refund & Payment Policy,
                            please contact Ensolanka through the official affiliate contact page.
                        </p>

                        <a href="{% url 'affiliates_app:contact_page_aff' %}" class="btn btn-dark px-4">
                            Contact Ensolanka
                        </a>
                    </section>


                    <!-- FINAL CTA -->
                    <div class="payment-final-cta">
                        <div class="row align-items-center g-4">
                            <div class="col-lg-8">
                                <h3 class="fw-bold mb-3">
                                    Fair Earnings Depend on Valid, Settled Guest Payments
                                </h3>

                                <p class="mb-0">
                                    This policy keeps the affiliate payout process transparent:
                                    commissions are recorded from qualifying referrals, reviewed fairly,
                                    and adjusted when the underlying guest payment is refunded,
                                    reversed, or disputed.
                                </p>
                            </div>

                            <div class="col-lg-4">
                                <div class="d-grid gap-2">
                                    {% if request.user.is_authenticated %}
                                        <a href="{% url 'affiliates_app:affiliate_dashboard' %}" class="btn btn-warning btn-lg">
                                            My Dashboard
                                        </a>
                                    {% else %}
                                        <a href="{% url 'affiliates_app:affiliate_register' %}" class="btn btn-warning btn-lg">
                                            Join Affiliate Program
                                        </a>
                                    {% endif %}

                                    <a href="{% url 'affiliates_app:faq' %}" class="btn btn-outline-light btn-lg">
                                        View FAQ
                                    </a>
                                </div>
                            </div>
                        </div>
                    </div>

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

{% endblock %}