<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{% block email_title %}Partner with Ensolanka{% endblock %}</title>
    <style>
        /* Affiliate brand colors: dark green (#052e25), teal (#0f766e), gold (#ffc107) */
        body {
            margin: 0;
            padding: 0;
            background-color: #ecfdf5;   /* light mint background (like .affiliate-light-card bg) */
            font-family: 'Segoe UI', Arial, Helvetica, sans-serif;
            color: #1f2937;
        }

        .email-wrapper {
            width: 100%;
            background-color: #ecfdf5;
            padding: 40px 0;
        }

        .email-container {
            max-width: 600px;
            margin: 0 auto;
            background-color: #ffffff;
            border-radius: 28px;          /* matches .affiliate-light-card, .earning-table-card */
            overflow: hidden;
            box-shadow: 0 20px 45px rgba(0, 0, 0, 0.10);
        }

        /* Header gradient – matches .affiliate-gradient-section */
        .email-header {
            background: linear-gradient(135deg, #052e25 0%, #0f766e 100%);
            padding: 36px 28px;
            color: #ffffff;
            text-align: center;
        }

        .email-header h1 {
            margin: 0;
            font-size: 28px;
            letter-spacing: -0.3px;
            font-weight: 800;
        }

        .email-header p {
            margin: 12px 0 0;
            font-size: 15px;
            opacity: 0.92;
        }

        .tagline {
            font-size: 12px;
            margin-top: 12px;
            color: #ffc107;   /* gold accent */
            font-weight: 600;
            letter-spacing: 0.04em;
        }

        .email-body {
            padding: 36px 32px;
            font-size: 15px;
            line-height: 1.6;
        }

        .email-body h2 {
            margin-top: 0;
            color: #064e3b;   /* dark teal */
            font-size: 22px;
            font-weight: 700;
        }

        /* Button – matches .btn-success style from affiliate dashboard */
        .email-button {
            display: inline-block;
            background-color: #2c7a4d;   /* affiliate green */
            color: #ffffff !important;
            text-decoration: none;
            padding: 12px 28px;
            border-radius: 40px;
            font-weight: 700;
            margin: 20px 0 10px;
            font-size: 16px;
        }

        /* Note block – light mint with gold/green border */
        .email-note {
            background-color: #ecfdf5;
            border-left: 5px solid #0f766e;
            padding: 18px 20px;
            margin: 24px 0;
            border-radius: 20px;
            color: #1f2937;
        }

        /* Credentials box – matches .affiliate-light-card style */
        .email-credential-box {
            background: #ffffff;
            border: 1px solid #d1fae5;
            border-radius: 24px;
            padding: 22px 24px;
            margin: 24px 0;
            box-shadow: 0 8px 20px rgba(5, 46, 37, 0.06);
        }

        .credential-row {
            display: flex;
            justify-content: space-between;
            padding: 10px 0;
            border-bottom: 1px solid #e2e8f0;
        }
        .credential-row:last-child {
            border-bottom: none;
        }
        .credential-label {
            font-weight: 600;
            color: #047857;
        }
        .credential-value {
            font-weight: 700;
            color: #052e25;
        }

        /* Gold badge – like .affiliate-hero-badge */
        .email-badge {
            background: rgba(255, 193, 7, 0.15);
            color: #b45309;
            border: 1px solid rgba(255, 193, 7, 0.4);
            display: inline-block;
            padding: 4px 12px;
            border-radius: 30px;
            font-size: 12px;
            font-weight: 700;
            margin-bottom: 16px;
        }

        /* Footer – dark green background */
        .email-footer {
            background: #10251f;
            color: #cbd5e1;
            padding: 28px 32px;
            text-align: center;
            font-size: 13px;
        }

        .email-footer a {
            color: #ffc107;
            text-decoration: none;
            font-weight: 600;
        }

        .email-footer a:hover {
            text-decoration: underline;
        }

        @media only screen and (max-width: 600px) {
            .email-container {
                width: 94% !important;
            }
            .email-body {
                padding: 28px 20px;
            }
            .email-header {
                padding: 28px 20px;
            }
            .credential-row {
                flex-direction: column;
                gap: 4px;
            }
        }
    </style>
    {% block extra_email_styles %}{% endblock %}
</head>
<body>
    <div class="email-wrapper">
        <div class="email-container">
            <div class="email-header">
                <h1>{% block brand_title %}Partner with Ensolanka{% endblock %}</h1>
                <p>{% block brand_subtitle %}Global Affiliate Partner Program{% endblock %}</p>
                <div class="tagline">Partner with Ensolanka · Grow Together · Earn Together</div>
            </div>

            <div class="email-body">
                {% block email_content %}{% endblock %}
            </div>

            <div class="email-footer">
                {% block footer_top %}
                    {% if site_url %}
                        <p style="margin: 0 0 12px;">
                            <a href="{{ site_url }}">Visit Partner with Ensolanka</a>
                        </p>
                    {% endif %}
                {% endblock %}
                {% block footer_text %}
                    <p style="margin: 0 0 8px;">
                        Introducing international guests to an affordable, healthy Sri Lankan lifestyle.
                    </p>
                    <p style="margin: 0;">
                        &copy; {% now "Y" %} Ensolanka LLC. All rights reserved.
                    </p>
                {% endblock %}
            </div>
        </div>
    </div>
</body>
</html>