<?php
if (!defined('ABSPATH')) {
    exit;
}
$name = '';
if (isset($user) && $user instanceof WP_User) {
    $name = (string) ($user->display_name ?: $user->user_login);
}
$event_title = isset($event_title) ? sanitize_text_field((string) $event_title) : '';
$event_date = isset($event_date) ? sanitize_text_field((string) $event_date) : '';
$event_url = isset($event_url) ? esc_url((string) $event_url) : '';
?>
<div style="font-family:Inter,Arial,sans-serif;color:#0f172a;line-height:1.55;">
    <h2 style="font-size:24px;margin:0 0 14px;color:#0b1221;"><?php esc_html_e('Event Reminder', 'nexdirectory'); ?></h2>
    <p style="margin:0 0 12px;"><?php echo esc_html(sprintf(__('Hi %s,', 'nexdirectory'), $name)); ?></p>
    <p style="margin:0 0 10px;"><?php echo esc_html(sprintf(__('Just a reminder: "%s" is happening tomorrow.', 'nexdirectory'), $event_title)); ?></p>
    <p style="margin:0 0 16px;color:#334155;"><strong><?php esc_html_e('When:', 'nexdirectory'); ?></strong> <?php echo esc_html($event_date); ?></p>
    <p style="margin:0 0 16px;">
        <a href="<?php echo $event_url; ?>" style="display:inline-block;background:#FF5E14;color:#fff;text-decoration:none;padding:11px 18px;border-radius:999px;font-weight:700;"><?php esc_html_e('View Event', 'nexdirectory'); ?></a>
    </p>
</div>
