<?php
/**
 * Modal Component
 */
if (!isset($modalId) || !isset($modalTitle)) return;
?>
<div class="modal-overlay" id="<?= e($modalId) ?>" onclick="if(event.target===this)this.style.display='none'">
    <div class="modal">
        <div class="modal-header">
            <h3><?= e($modalTitle) ?></h3>
            <button type="button" class="modal-close" onclick="document.getElementById('<?= e($modalId) ?>').style.display='none'">&times;</button>
        </div>
        <div class="modal-body">
            <?= $modalContent ?? '' ?>
        </div>
    </div>
</div>
