<!doctype html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>Complaint Response {{ $complaint->order->order_number }}</title>
    </head>
    <body style="margin:0;background:#f7f7f7;color:#222;font-family:Arial,Helvetica,sans-serif;">
        <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="background:#f7f7f7;padding:24px 12px;">
            <tr>
                <td align="center">
                    <table role="presentation" width="100%" cellpadding="0" cellspacing="0" style="max-width:680px;background:#ffffff;border-radius:18px;overflow:hidden;border:1px solid #ebebeb;">
                        <tr>
                            <td style="padding:28px 28px 18px;">
                                <strong style="font-size:28px;color:#111;">8Stores</strong>
                                <div style="margin-top:8px;color:#717171;font-size:14px;">We responded to your complaint.</div>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding:0 28px 28px;">
                                <h1 style="margin:0 0 12px;font-size:26px;line-height:1.2;color:#111;">{{ $complaint->subject }}</h1>
                                <p style="margin:0 0 16px;color:#717171;">Order {{ $complaint->order->order_number }}{{ $complaint->product ? ' - '.$complaint->product->name : '' }}</p>

                                <div style="padding:16px;border:1px solid #ebebeb;border-radius:12px;background:#fafafa;">
                                    <strong style="display:block;margin-bottom:8px;color:#111;">Your complaint</strong>
                                    <p style="margin:0;color:#717171;line-height:1.6;">{{ $complaint->message }}</p>
                                </div>

                                <div style="margin-top:14px;padding:16px;border:1px solid #ffd6df;border-radius:12px;background:#fff5f7;">
                                    <strong style="display:block;margin-bottom:8px;color:#111;">Admin response</strong>
                                    <p style="margin:0;color:#717171;line-height:1.6;">{{ $complaint->admin_response }}</p>
                                </div>

                                <div style="margin-top:22px;">
                                    <a href="{{ route('orders.track', ['order_number' => $complaint->order->order_number, 'delivery_phone' => $complaint->order->delivery_phone]) }}" style="display:inline-block;border-radius:999px;background:#ff385c;color:#fff;padding:13px 20px;font-weight:700;text-decoration:none;">Track order</a>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding:18px 28px;background:#111;color:#fff;font-size:13px;">You can view this response from your order detail page.</td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>
    </body>
</html>
