<h1 style="text-align:center; margin-bottom:20px">Message Details</h1>

<div style="max-width:700px; margin:0 auto; padding:20px; background:#F5F0E7; border-radius:10px; box-shadow:0 4px 12px rgba(0,0,0,0.08)">
    <table style="width:100%; border-collapse:collapse; margin-bottom:20px">
        <tr>
            <th style="text-align:left; padding:10px; border-bottom:1px solid #ddd; width:150px">Name</th>
            <td style="padding:10px; border-bottom:1px solid #ddd; word-wrap:break-word; word-break:break-word; white-space:pre-wrap;"><?= h($submission->first_name . " " . $submission->last_name) ?></td>
        </tr>
        <tr>
            <th style="text-align:left; padding:10px; border-bottom:1px solid #ddd">Email</th>
            <td style="padding:10px; border-bottom:1px solid #ddd; word-wrap:break-word; word-break:break-word; white-space:pre-wrap;"><?= h($submission->email) ?></td>
        </tr>
        <tr>
            <th style="text-align:left; padding:10px; border-bottom:1px solid #ddd">Phone</th>
            <td style="padding:10px; border-bottom:1px solid #ddd; word-wrap:break-word; word-break:break-word; white-space:pre-wrap;"><?= h($submission->phone) ?></td>
        </tr>
        <tr>
            <th style="text-align:left; padding:10px; border-bottom:1px solid #ddd; vertical-align:top">Message</th>
            <td style="padding:10px; border-bottom:1px solid #ddd; line-height:1.6; word-wrap:break-word; word-break:break-word; white-space:pre-wrap;"><?= nl2br(h($submission->message)) ?></td>
        </tr>
        <tr>
            <th style="text-align:left; padding:10px; border-bottom:1px solid #ddd">Submitted At</th>
            <td style="padding:10px; border-bottom:1px solid #ddd;"><?= $submission->created->format('d-m-Y H:i:s') ?></td>
        </tr>
        <tr>
            <th style="text-align:left; padding:10px; border-bottom:1px solid #ddd">Status</th>
            <td style="padding:10px; border-bottom:1px solid #ddd;"><?= h($submission->status) ?></td>
        </tr>
        <tr>
            <th style="text-align:left; padding:10px; border-bottom:1px solid #ddd">Note</th>
            <td style="padding:10px; border-bottom:1px solid #ddd; word-wrap:break-word; word-break:break-word; white-space:pre-wrap;"><?= h($submission->note) ?></td>
        </tr>
    </table>

    <div style="text-align:center; margin-top:20px">
        <?= $this->Html->link('Back', ['controller' => 'Auth', 'action' => 'inquiries'], ['class' => 'btn btn-secondary', 'style' => 'padding:10px 20px; border-radius:6px']) ?>
    </div>
</div>
<br><br><br>