<?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) : '';
$status_label = isset($status_label) ? sanitize_text_field((string) $status_label) : __('Cancelled', 'nexdirectory');
$moderator_note = isset($moderator_note) ? eep_sanitize_textarea((string) $moderator_note) : '';
?>
<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 Notice', '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(__('Your event "%s" currently has status: %s.', 'nexdirectory'), $event_title, $status_label)); ?></p>
    <?php if ($event_date !== '') : ?>
        <p style="margin:0 0 10px;color:#334155;"><strong><?php esc_html_e('Date:', 'nexdirectory'); ?></strong> <?php echo esc_html($event_date); ?></p>
    <?php endif; ?>
    <?php if ($moderator_note !== '') : ?>
        <p style="margin:0 0 12px;color:#334155;"><strong><?php esc_html_e('Moderator Note:', 'nexdirectory'); ?></strong> <?php echo esc_html($moderator_note); ?></p>
    <?php endif; ?>
    <p style="margin:0;">
        <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('Review Event', 'nexdirectory'); ?></a>
    </p>
</div>
