<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Assignment Cancelled</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, #dc2626 0%, #ef4444 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: #dc2626;
        }
        .content {
            margin-bottom: 30px;
        }
        .cancel-details {
            background-color: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 8px;
            padding: 20px;
            margin: 20px 0;
        }
        .cancel-details h3 {
            margin: 0 0 15px 0;
            color: #dc2626;
            font-size: 16px;
        }
        .detail-row {
            display: flex;
            margin-bottom: 10px;
            font-size: 14px;
        }
        .detail-label {
            font-weight: 600;
            color: #374151;
            width: 140px;
            flex-shrink: 0;
        }
        .detail-value {
            color: #6b7280;
        }
        .reason-box {
            background-color: #fff1f2;
            border-left: 4px solid #ef4444;
            padding: 15px 20px;
            margin: 20px 0;
            font-size: 14px;
        }
        .reason-box strong {
            color: #dc2626;
        }
        .info-box {
            background-color: #eff6ff;
            border: 1px solid #bfdbfe;
            border-radius: 6px;
            padding: 20px;
            margin: 20px 0;
        }
        .info-box h4 {
            margin: 0 0 10px 0;
            color: #1d4ed8;
            font-size: 15px;
        }
        .info-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>❌ Assignment Cancelled</h1>
            <p>Your mentorship assignment has been cancelled</p>
        </div>

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

            <div class="content">
                <p>We regret to inform you that your mentorship assignment in the <strong>{{ $programmeName }}</strong> programme has been cancelled. This decision was made after careful consideration.</p>
            </div>

            <div class="cancel-details">
                <h3>📋 Assignment Details</h3>
                <div class="detail-row">
                    <span class="detail-label">Programme:</span>
                    <span class="detail-value">{{ $programmeName }}</span>
                </div>
                <div class="detail-row">
                    <span class="detail-label">Other Party:</span>
                    <span class="detail-value">{{ $otherPartyName }}</span>
                </div>
                <div class="detail-row">
                    <span class="detail-label">Status:</span>
                    <span class="detail-value" style="color: #dc2626; font-weight: 600;">Cancelled</span>
                </div>
            </div>

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

            <div class="info-box">
                <h4>📌 What's Next?</h4>
                <p>If you believe this cancellation was made in error or would like to discuss reassignment options, please contact our support team. We're here to help you continue your mentorship journey.</p>
                <a href="{{ route('mentorship.public.index') }}" class="programmes-link">Browse Other Programmes</a>
            </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;">
                If you have any questions, please contact our support team.
            </p>
        </div>
    </div>
</body>
</html>
