<?php
/**
 * EMAIL VERIFICATION TEMPLATE
 * File: templates/email/verify-email.php
 * Email verification confirmation template
 * 
 * Available variables: $first_name, $email, $user_type, $verification_url, $app_name
 */

// Email content
ob_start();
?>

<p>Hello <?= htmlspecialchars($first_name ?? '') ?>,</p>
<p>Thank you for signing up with <?= $app_name ?>! To complete your registration, please verify your email address by clicking the button below.</p>

<div class="alert alert-warning">
    <strong>Important:</strong> This verification link will expire in 24 hours for security reasons.
</div>

<div class="order-summary">
    <h3>Account Details</h3>
    <p><strong>Email:</strong> <?= htmlspecialchars($email ?? '') ?></p>
    <p><strong>Account Type:</strong> <?= ucfirst($user_type ?? 'customer') ?></p>
    <p><strong>Registration Date:</strong> <?= date('F j, Y \a\t g:i A') ?></p>
</div>

<p>
    <a href="<?= $verification_url ?>" class="btn btn-success">VERIFY YOUR REGISTRATION</a>
</p>

<p>If you're having trouble clicking the verification button, you can also copy and paste the following link into your web browser:</p>

<p style="word-break: break-all; background: #f8f9fa; padding: 10px; border-radius: 5px; font-family: monospace;">
    <?= $verification_url ?>
</p>

<div class="alert alert-info">
    <strong>Why verify your email?</strong>
    <ul style="margin: 10px 0 0 20px;">
        <li>To be sure your email exist and active</li>
        <li>Ensures you receive important order updates</li>
        <li>Protects against unauthorized account access</li>
    </ul>
</div>

<?php
$content = ob_get_clean();

// Prepare email data
$email_data = [
    'title' => 'Verify Your Email Address',
    'greeting' => "Hello " . ($first_name ?? 'there') . "!",
    'content' => $content,
    'action_url' => $verification_url,
    'action_text' => 'Verify Email Address',
    'footer_note' => "If you didn't create this account, please ignore this email.",
    'signature' => "Best regards,<br>The " . $app_name . " Team<br>support@rentidium.com"
];

// Include layout
include 'layout.php';
?>