<?php
/**
 * Email Template: New Message Notification
 *
 * This template is sent to a user when they receive a new
 * private message from another user on the platform.
 *
 * @var string $recipient_username The username of the message recipient.
 * @var string $sender_username    The username of the message sender.
 * @var string $message_link       The direct URL to view the message.
 */
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>You Have a New Message!</title>
    <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
    <style>
        /* Basic Styles */
        body {
            margin: 0;
            padding: 0;
            font-family: 'Inter', sans-serif;
            background-color: #f3f4f6;
        }
        .container {
            width: 100%;
            max-width: 600px;
            margin: 0 auto;
            padding: 20px;
        }
        .content {
            background-color: #ffffff;
            border-radius: 12px;
            padding: 32px;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
            text-align: center; /* Center align content */
        }
        h1 {
            font-size: 28px;
            font-weight: 700;
            color: #374151;
            margin-top: 0;
        }
        p {
            font-size: 16px;
            color: #4b5563;
            line-height: 1.6;
        }
        .footer {
            text-align: center;
            margin-top: 24px;
            color: #9ca3af;
            font-size: 14px;
        }
        .icon {
            display: block;
            margin: 0 auto 20px;
        }
        .button {
            display: inline-block;
            background-color: #1e40af;
            color: #ffffff;
            font-size: 16px;
            font-weight: 600;
            text-decoration: none;
            padding: 14px 28px;
            border-radius: 8px;
            margin-top: 24px;
            margin-bottom: 24px;
        }
        .alt-link {
            font-size: 14px;
            color: #9ca3af;
            word-break: break-all;
        }
        .alt-link a {
            color: #1e40af;
            text-decoration: none;
        }
    </style>
</head>
<body>
    <div class="container">
        <div class="content">
            <!-- Icon for visual appeal -->
            <svg class="icon" xmlns="http://www.w3.org/2000/svg" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="#1e40af" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">
                <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path>
                <polyline points="22,6 12,13 2,6"></polyline>
            </svg>

            <h1>You've Got Mail!</h1>
            <p>Hello <?php echo htmlspecialchars($recipient_username); ?>,</p>
            <p>You have received a new private message from <strong><?php echo htmlspecialchars($sender_username); ?></strong>.</p>

            <!-- Call-to-Action Button -->
            <a href="<?php echo htmlspecialchars($message_link); ?>" target="_blank" class="button">
                Read Your Message
            </a>
            
            <p class="alt-link">
                If the button doesn't work, copy and paste this link into your browser:<br>
                <a href="<?php echo htmlspecialchars($message_link); ?>" target="_blank"><?php echo htmlspecialchars($message_link); ?></a>
            </p>
        </div>
        <div class="footer">
            <p>&copy; <?php echo date("Y"); ?> Zeeloq. All rights reserved.</p>
        </div>
    </div>
</body>
</html>
