<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>New Job Application</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }
        .header {
            background-color: #4f46e5;
            color: white;
            padding: 20px;
            text-align: center;
            border-radius: 5px 5px 0 0;
        }
        .content {
            background-color: #f9fafb;
            padding: 20px;
            border: 1px solid #e5e7eb;
            border-radius: 0 0 5px 5px;
        }
        .job-title {
            font-size: 24px;
            font-weight: bold;
            margin-bottom: 20px;
            color: #4f46e5;
        }
        .info-box {
            background-color: white;
            padding: 15px;
            border-radius: 5px;
            margin-bottom: 20px;
            border: 1px solid #e5e7eb;
        }
        .info-label {
            font-weight: bold;
            color: #4b5563;
        }
        .footer {
            margin-top: 30px;
            font-size: 12px;
            color: #6b7280;
            text-align: center;
        }
    </style>
</head>
<body>
    <div class="header">
        <h1>New Job Application</h1>
    </div>
    
    <div class="content">
        <div class="job-title">{{ $jobApplication->jobPosting->title }}</div>
        
        <div class="info-box">
            <p><span class="info-label">Applicant:</span> {{ $jobApplication->first_name }} {{ $jobApplication->last_name }}</p>
            <p><span class="info-label">Email:</span> {{ $jobApplication->email }}</p>
            @if($jobApplication->phone)
                <p><span class="info-label">Phone:</span> {{ $jobApplication->phone }}</p>
            @endif
        </div>
        
       @if($jobApplication->resume_path)
    <p><a href="{{ asset('storage/' . $jobApplication->resume_path) }}" target="_blank">Download Resume</a></p>
        @endif
        
        <p>The resume is attached to this email.</p>
        
        <p>Please review this application at your earliest convenience.</p>
    </div>
    
    <div class="footer">
        <p>This is an automated notification from your careers portal.</p>
    </div>
</body>
</html>