<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Enrollment Confirmed</title>
</head>
<body style="margin:0;padding:0;background-color:#f5f5f5;font-family:'Helvetica Neue',Helvetica,Arial,sans-serif;color:#1f2933;">
<table width="100%" cellpadding="0" cellspacing="0" role="presentation" style="background-color:#f5f5f5;padding:24px 0;">
    <tr>
        <td align="center">
            <table width="600" cellpadding="0" cellspacing="0" role="presentation" style="background-color:#ffffff;border-radius:16px;overflow:hidden;box-shadow:0 10px 30px rgba(15,23,42,0.12);">
                <tr>
                    <td align="center" style="background:linear-gradient(135deg,#f97316,#facc15);padding:34px;">
                        <h1 style="margin:16px 0 0;font-size:24px;line-height:1.4;color:#ffffff;font-weight:600;">
                            You're enrolled in {{ $course->title }}
                        </h1>
                        <p style="margin:8px 0 0;font-size:15px;color:rgba(255,255,255,0.85);">
                            {{ $enrolledAt->format('M d, Y') }} · Instructor: {{ $course->instructor?->name ?? 'Your instructor' }}
                        </p>
                    </td>
                </tr>
                <tr>
                    <td style="padding:32px;">
                        <p style="margin:0 0 16px;font-size:16px;color:#475467;">Hi {{ $student->name }},</p>
                        <p style="margin:0 0 16px;font-size:16px;color:#1f2933;line-height:1.6;">
                            Welcome aboard! You're all set to start learning with <strong>{{ $course->title }}</strong>. Jump in now or plan your first session for later today.
                        </p>
                        <div style="background-color:#fef3c7;border-left:4px solid #f97316;padding:16px;border-radius:12px;margin-bottom:24px;">
                            <strong style="display:block;margin-bottom:8px;color:#92400e;">Next steps</strong>
                            <ul style="margin:0;padding-left:18px;font-size:15px;color:#92400e;line-height:1.7;">
                                <li>Review the course overview and introduction.</li>
                                <li>Add reminders for key lessons or live sessions.</li>
                                <li>Join the community discussion to say hello.</li>
                            </ul>
                        </div>
                        <table role="presentation" cellpadding="0" cellspacing="0" style="margin:0 auto 24px;">
                            <tr>
                                <td style="border-radius:999px;background-color:#1f2937;">
                                    <a href="{{ route('courses.show', $course->slug ?? $course->id) }}" target="_blank" style="display:inline-block;padding:14px 32px;color:#ffffff;text-decoration:none;font-weight:600;font-size:16px;">
                                        Start Learning Now
                                    </a>
                                </td>
                            </tr>
                        </table>
                        <p style="margin:0;font-size:14px;color:#4b5563;">
                            Need help? Reply to this email or reach us anytime at {{ settings('contact.details.support_email', config('mail.from.address')) }}.
                        </p>
                    </td>
                </tr>
                <tr>
                    <td align="center" style="background-color:#f0f4ff;padding:24px;">
                        <p style="margin:0;font-size:13px;color:#4b5563;">
                            © {{ now()->year }} {{ config('app.name') }} · {{ config('app.url') }}
                        </p>
                    </td>
                </tr>
            </table>
        </td>
    </tr>
</table>
</body>
</html>
