<?php
$eventTitle = !empty($event['title']) ? $event['title'] : 'School Calendar Update';
$eventType = !empty($event['event_type']) ? $event['event_type'] : 'General';
$eventDate = !empty($event['date']) ? date('F j, Y', strtotime($event['date'])) : 'TBD';
?>
<div style="font-family: sans-serif; line-height: 1.6;">
    <h1 style="font-size: 1.5rem; margin-bottom: 0.5rem;"><?= esc($eventTitle) ?></h1>
    <p style="margin:0.25rem 0;"><strong>Date:</strong> <?= esc($eventDate) ?></p>
    <p style="margin:0.25rem 0;"><strong>Type:</strong> <?= esc($eventType) ?></p>
    <?php if (!empty($event['description'])): ?>
        <p style="margin:0.25rem 0;"><?= nl2br(esc($event['description'])) ?></p>
    <?php endif; ?>
    <p style="margin:0.25rem 0;">Visit the <a href="<?= esc($calendarUrl) ?>"><?= esc($calendarUrl) ?></a> to see the calendar.</p>
</div>
