<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>New Enquiry</title>
</head>
<body style="margin:0;padding:0;background:#f5f5f5;font-family:Arial,Helvetica,sans-serif;">

<table width="100%" cellpadding="0" cellspacing="0" style="background:#f5f5f5;padding:20px;">
    <tr>
        <td align="center">
            <table width="600" cellpadding="0" cellspacing="0" style="background:#ffffff;border-radius:6px;overflow:hidden;">

            <tr> <td align="center" style="padding:15px;background:#ffffff;"> <img src="<?= asset('assets/img/') ?>/logo.png" alt="Company Logo" width="160" style="display:block;"> </td> </tr>
                <!-- Header -->
                <tr>
                    <td style="background:#024959;color:#ffffff;padding:15px 20px;">
                        <h2 style="margin:0;font-size:18px;">Contact Form Enquiry</h2>
                    </td>
                </tr>

                <!-- Content -->
                <tr>
                    <td style="padding:20px;">
                        <p style="margin:0 0 15px;">
                            You have received a new contact form enquiry. Details are below:
                        </p>

                        <table width="100%" cellpadding="8" cellspacing="0" style="border-collapse:collapse;">
                            <?php if($data['name'] != ''){ ?>
                            <tr>
                                <td style="border:1px solid #ddd;"><strong>Name</strong></td>
                                <td style="border:1px solid #ddd;">{{ $data['name'] }}</td>
                            </tr>
                            <?php }  
                              if($data['phone'] != ''){ 
                            ?>
                            <tr>
                                <td style="border:1px solid #ddd;"><strong>Phone</strong></td>
                                <td style="border:1px solid #ddd;">{{ $data['phone'] }}</td>
                            </tr>
                            <?php } 
                             if($data['email'] != ''){ 
                            ?>
                            <tr>
                                <td style="border:1px solid #ddd;"><strong>Email</strong></td>
                                <td style="border:1px solid #ddd;">{{ $data['email'] }}</td>
                            </tr>
                            <?php } ?>

                            <?php if($data['subject'] != ''){ ?>
                            <tr>
                                <td style="border:1px solid #ddd;"><strong>Subject</strong></td>
                                <td style="border:1px solid #ddd;">{{ $data['subject'] }}</td>
                            </tr>
                            <?php }  ?>
                            <?php if($data['message'] != ''){ ?>
                            <tr>
                                <td style="border:1px solid #ddd;"><strong>message</strong></td>
                                <td style="border:1px solid #ddd;">{{ $data['message'] }}</td>
                            </tr>
                            <?php } ?>
                        </table>

                        <p style="margin-top:20px;font-size:13px;color:#555;">
                            This enquiry was submitted from the website contact enquiry form.
                        </p>
                    </td>
                </tr>

                <!-- Footer -->
                <tr>
                    <td style="background:#f1f1f1;padding:10px 20px;font-size:12px;color:#555;text-align:center;">
                        © {{ date('Y') }} Palaniappa Electronics
                    </td>
                </tr>

            </table>
        </td>
    </tr>
</table>

</body>
</html>
