<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Application Update</title>
    <style>
        body {
            font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
            line-height: 1.6;
            color: #333333;
            background-color: #f4f4f5;
            margin: 0;
            padding: 0;
        }
        .email-wrapper {
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            background-color: #ffffff;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        }
        .email-header {
            background: linear-gradient(135deg, #6b7280 0%, #9ca3af 100%);
            padding: 30px 40px;
            text-align: center;
        }
        .email-header h1 {
            color: #ffffff;
            margin: 0;
            font-size: 24px;
            font-weight: 600;
        }
        .email-header p {
            color: rgba(255, 255, 255, 0.9);
            margin: 8px 0 0 0;
            font-size: 14px;
        }
        .email-body {
            padding: 40px;
        }
        .greeting {
            font-size: 18px;
            margin-bottom: 20px;
        }
        .greeting strong {
            color: #6b7280;
        }
        .content {
            margin-bottom: 30px;
            font-size: 15px;
        }
        .update-details {
            background-color: #f9fafb;
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 25px;
            margin: 20px 0;
        }
        .update-details h3 {
            margin: 0 0 15px 0;
            color: #374151;
            font-size: 16px;
        }
        .status-badge {
            display: inline-block;
            background-color: #fef2f2;
            color: #dc2626;
            padding: 6px 20px;
            border-radius: 20px;
            font-size: 14px;
            font-weight: 600;
            border: 1px solid #fecaca;
        }
        .reason-box {
            background-color: #fffbeb;
            border-left: 4px solid #f59e0b;
            padding: 15px 20px;
            margin: 20px 0;
            font-size: 14px;
        }
        .reason-box strong {
            color: #92400e;
        }
        .encouragement-box {
            background-color: #eff6ff;
            border: 1px solid #bfdbfe;
            border-radius: 6px;
            padding: 20px;
            margin: 20px 0;
        }
        .encouragement-box h4 {
            margin: 0 0 10px 0;
            color: #1d4ed8;
            font-size: 15px;
        }
        .encouragement-box p {
            margin: 0;
            color: #374151;
            font-size: 14px;
        }
        .programmes-link {
            display: inline-block;
            background-color: #3b82f6;
            color: #ffffff;
            text-decoration: none;
            padding: 12px 24px;
            border-radius: 6px;
            font-weight: 600;
            margin-top: 15px;
            font-size: 14px;
        }
        .programmes-link:hover {
            background-color: #2563eb;
        }
        .email-footer {
            background-color: #f9fafb;
            padding: 25px 40px;
            text-align: center;
            border-top: 1px solid #e5e7eb;
        }
        .footer-text {
            color: #6b7280;
            font-size: 13px;
            margin: 0;
        }
        .footer-link {
            color: #6b7280;
            text-decoration: none;
        }
    </style>
</head>
<body style="margin: 0; padding: 20px; background-color: #f4f4f5;">
    <div class="email-wrapper">
        <div class="email-header">
            <h1>📋 Application Update</h1>
            <p>Regarding your mentorship programme application</p>
        </div>

        <div class="email-body">
            <p class="greeting">Dear <strong>{{ $applicantName }}</strong>,</p>

            <div class="content">
                <p>Thank you for your interest in the <strong>{{ $programmeName }}</strong> mentorship programme. We appreciate the time and effort you put into your application.</p>
                <p>After careful consideration, we regret to inform you that we are unable to proceed with your application at this time.</p>
            </div>

            <div class="update-details">
                <h3>Application Status</h3>
                <p style="margin: 0 0 10px 0;"><strong>Programme:</strong> {{ $programmeName }}</p>
                <p style="margin: 0;"><strong>Status:</strong> <span class="status-badge">Not Selected</span></p>
            </div>

            @if($reason)
            <div class="reason-box">
                <strong>Feedback:</strong><br>
                {{ $reason }}
            </div>
            @endif

            <div class="encouragement-box">
                <h4>💡 We Encourage You to Try Again</h4>
                <p>This decision does not reflect your potential or capabilities. We have many other mentorship programmes that might be a better fit for your goals and interests. We encourage you to explore other opportunities and apply again in the future.</p>
                <a href="{{ route('mentorship.public.index') }}" class="programmes-link">Browse Other Programmes</a>
            </div>

            <div style="text-align: center; margin-top: 30px; padding-top: 20px; border-top: 1px solid #e5e7eb;">
                <p style="color: #6b7280; font-size: 14px; margin: 0;">
                    If you have any questions about this decision, please don't hesitate to contact our support team.
                </p>
            </div>
        </div>

        <div class="email-footer">
            <p class="footer-text">
                This email was sent from <strong>{{ config('app.name') }}</strong><br>
                <a href="{{ config('app.url') }}" class="footer-link">{{ config('app.url') }}</a>
            </p>
            <p class="footer-text" style="margin-top: 10px;">
                Thank you for your interest in our mentorship programmes.
            </p>
        </div>
    </div>
</body>
</html>
