<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>You're invited to join MunroMap!</title>
    <style>
        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
            line-height: 1.6;
            color: #333;
            margin: 0;
            padding: 0;
            background-color: #f5f5f5;
        }
        .container {
            max-width: 600px;
            margin: 0 auto;
            background-color: #ffffff;
            border-radius: 8px;
            overflow: hidden;
            box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        }
        .header {
            padding: 20px;
            text-align: center;
            border-bottom: 1px solid #e9ecef;
        }
        .header h1 {
            margin: 0;
            font-size: 24px;
            font-weight: 600;
            color: #333;
        }
        .content {
            padding: 30px 20px;
        }
        .message-box {
            background: #f8f9fa;
            border-left: 4px solid #7ebd43;
            padding: 15px 20px;
            margin: 20px 0;
            border-radius: 4px;
        }
        .message-box p {
            margin: 0;
            font-style: italic;
            color: #555;
        }
        .features {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 6px;
            margin: 20px 0;
        }
        .features ul {
            margin: 10px 0;
            padding-left: 20px;
        }
        .features li {
            margin: 8px 0;
            color: #555;
        }
        .button-container {
            text-align: center;
            margin: 30px 0;
        }
        .button {
            display: inline-block;
            padding: 12px 24px;
            background: #7ebd43;
            color: white !important;
            text-decoration: none;
            border-radius: 5px;
            font-weight: bold;
        }
        .button:hover {
            background: #6ba83a;
            text-decoration: none;
        }
        .footer {
            padding: 20px;
            text-align: center;
            background: #f8f9fa;
            border-top: 1px solid #e9ecef;
        }
        .footer p {
            margin: 5px 0;
            font-size: 12px;
            color: #666;
        }
        .link-fallback {
            font-size: 12px;
            color: #666;
            word-break: break-all;
            margin-top: 15px;
        }
        .expires {
            font-size: 12px;
            color: #666;
            text-align: center;
            margin-top: 10px;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="header">
            <h1>You're invited to join MunroMap!</h1>
        </div>
        
        <div class="content">
            <p>Hello!</p>
            
            <p><strong>{{ $inviterName }}</strong> ({{ $inviterEmail }}) has invited you to join <strong>MunroMap</strong>, the platform for tracking your Scottish mountain adventures.</p>
            
            @if($personalMessage)
            <div class="message-box">
                <p><strong>Personal message from {{ explode(' ', $inviterName)[0] }}:</strong></p>
                <p>"{{ $personalMessage }}"</p>
            </div>
            @endif
            
            <div class="features">
                <p><strong>MunroMap helps you:</strong></p>
                <ul>
                    <li>Track your Munro and Corbett ascents with interactive 3D maps</li>
                    <li>View detailed statistics and progress tracking</li>
                    <li>Plan routes and share adventures with friends</li>
                    <li>Access from web and mobile devices</li>
                    <li>Explore all 282 Munros and 222 Corbetts in Scotland</li>
                </ul>
                
                <p><strong>As friends on MunroMap, you can:</strong></p>
                <ul>
                    <li>View each other's completion maps to see which peaks you've both climbed</li>
                    <li>Plan trips together to climb peaks that neither of you have completed yet</li>
                    <li>Share your mountain adventures and celebrate each other's achievements</li>
                </ul>
            </div>
            
            <div class="button-container">
                <a href="{{ $acceptUrl }}" class="button">Accept Invitation & Join MunroMap</a>
            </div>
            
            <p class="expires">This invitation expires on <strong>{{ $expiresAt }}</strong>.</p>
            
            <div class="link-fallback">
                <p><strong>Having trouble with the button?</strong><br>
                Copy and paste this link into your browser:</p>
                <p><a href="{{ $acceptUrl }}">{{ $acceptUrl }}</a></p>
            </div>
        </div>
        
        <div class="footer">
            <p>© {{ date('Y') }} MunroMap. All rights reserved.</p>
            <p>This invitation was sent to {{ $recipientEmail }} by {{ $inviterName }}.</p>
            <p>If you didn't expect this invitation, you can safely ignore this email.</p>
        </div>
    </div>
</body>
</html>
