<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Registration Update</title>
</head>
<body style="margin: 0; padding: 0; font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; background-color: #f3f4f6;">
    <table role="presentation" width="100%" cellspacing="0" cellpadding="0" style="max-width: 600px; margin: 0 auto; background-color: #ffffff;">
        <!-- Header -->
        <tr>
            <td style="background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%); padding: 40px 30px; text-align: center;">
                <h1 style="margin: 0; color: #ffffff; font-size: 28px; font-weight: 600;">
                    Registration Update
                </h1>
            </td>
        </tr>
        
        <!-- Body -->
        <tr>
            <td style="padding: 40px 30px;">
                <p style="margin: 0 0 20px; font-size: 16px; color: #374151; line-height: 1.6;">
                    Dear {{ $userName }},
                </p>
                
                <p style="margin: 0 0 20px; font-size: 16px; color: #374151; line-height: 1.6;">
                    We regret to inform you that your registration for <strong>{{ $trainingName }}</strong> could not be approved at this time.
                </p>
                
                <!-- Reason Card -->
                <table role="presentation" width="100%" style="background-color: #fef2f2; border: 1px solid #fecaca; border-radius: 8px; margin: 30px 0;">
                    <tr>
                        <td style="padding: 25px;">
                            <h3 style="margin: 0 0 15px; color: #991b1b; font-size: 16px;">
                                Reason:
                            </h3>
                            <p style="margin: 0; color: #b91c1c; font-size: 15px; line-height: 1.6;">
                                {{ $reason }}
                            </p>
                        </td>
                    </tr>
                </table>
                
                <p style="margin: 0 0 20px; font-size: 16px; color: #374151; line-height: 1.6;">
                    We understand this may be disappointing. However, we encourage you to:
                </p>
                
                <!-- Options Section -->
                <table role="presentation" width="100%" style="background-color: #f9fafb; border-radius: 8px; margin: 30px 0;">
                    <tr>
                        <td style="padding: 25px;">
                            <ul style="margin: 0; padding-left: 20px; color: #374151; font-size: 14px; line-height: 2;">
                                <li>Review our upcoming training programs</li>
                                <li>Contact us for more information about eligibility</li>
                                <li>Apply again when you meet the requirements</li>
                            </ul>
                        </td>
                    </tr>
                </table>
                
                <p style="margin: 0 0 20px; font-size: 16px; color: #374151; line-height: 1.6;">
                    If you believe this decision was made in error or would like to discuss this further, please don't hesitate to contact our training team.
                </p>
                
                <!-- Call to Action -->
                <table role="presentation" width="100%" style="margin: 30px 0;">
                    <tr>
                        <td align="center">
                            <a href="{{ route('public.training.index') }}" style="display: inline-block; background-color: #4f46e5; color: #ffffff; padding: 14px 32px; text-decoration: none; border-radius: 6px; font-size: 15px; font-weight: 500;">
                                Browse Other Training Programs
                            </a>
                        </td>
                    </tr>
                </table>
                
                <p style="margin: 0; font-size: 14px; color: #6b7280; line-height: 1.6;">
                    Best regards,<br>
                    <strong>{{ config('app.name') }}</strong> Training Team
                </p>
            </td>
        </tr>
        
        <!-- Footer -->
        <tr>
            <td style="background-color: #f3f4f6; padding: 30px; text-align: center; border-top: 1px solid #e5e7eb;">
                <p style="margin: 0 0 10px; font-size: 13px; color: #6b7280;">
                    &copy; {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
                </p>
                <p style="margin: 0; font-size: 12px; color: #9ca3af;">
                    This email was sent to you regarding your training registration.
                </p>
            </td>
        </tr>
    </table>
</body>
</html>
