<!DOCTYPE html>
<html lang="id">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Invoice Pesanan #{{ $order->order_id }}</title>
    <style>
        body {
            background-color: #f1f5f9;
            font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
            margin: 0;
            padding: 0;
            color: #334155;
        }
        .container {
            width: 100%;
            max-width: 600px;
            margin: 40px auto;
            background-color: #ffffff;
            border-radius: 16px;
            overflow: hidden;
            box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
            border: 1px solid #e2e8f0;
        }
        .header {
            background: linear-gradient(135deg, #fef9c3 0%, #fed7aa 100%);
            padding: 30px;
            text-align: center;
        }
        .header h1 {
            margin: 0;
            color: #78350f;
            font-size: 28px;
            font-weight: 800;
            letter-spacing: 1px;
        }
        .content {
            padding: 40px 30px;
        }
        .content h2 {
            color: #0f172a;
            font-size: 20px;
            margin-top: 0;
            margin-bottom: 15px;
        }
        .content p {
            line-height: 1.6;
            margin-bottom: 25px;
            color: #475569;
            font-size: 15px;
        }
        .order-details {
            background-color: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
            padding: 20px;
            margin-bottom: 25px;
        }
        .order-details p {
            margin: 5px 0;
            font-size: 14px;
            color: #0f172a;
        }
        .btn-wrapper {
            text-align: center;
            margin-top: 10px;
            margin-bottom: 30px;
        }
        .btn {
            display: inline-block;
            background: #0f172a;
            color: #ffffff;
            font-weight: 600;
            text-decoration: none;
            padding: 14px 28px;
            border-radius: 8px;
            font-size: 15px;
        }
        .note {
            background-color: #f0fdf4;
            border-left: 4px solid #22c55e;
            padding: 15px;
            border-radius: 4px;
            font-size: 14px;
            color: #166534;
            margin-bottom: 20px;
        }
        .footer {
            background-color: #f8fafc;
            padding: 20px;
            text-align: center;
            font-size: 13px;
            color: #94a3b8;
            border-top: 1px solid #e2e8f0;
        }
        .trouble-link {
            word-break: break-all;
            color: #3b82f6;
            font-size: 13px;
        }
    </style>
</head>
<body>
    <div class="container">
        <!-- Header -->
        <div class="header">
            <h1>INTERIA</h1>
        </div>

        <!-- Content -->
        <div class="content">
            <h2>Halo, {{ $notifiable->name }}!</h2>
            <p>Terima kasih telah berbelanja di <strong>INTERIA</strong>.</p>
            
            <div class="note">
                <strong>Berhasil!</strong> Pembayaran pesanan Anda telah dikonfirmasi. Invoice terlampir di email ini (silakan cek bagian <strong>Attachments/Lampiran</strong> pada pojok kanan atas atau paling bawah email ini).
            </div>

            <div class="order-details">
                <h3 style="margin-top: 0; color: #0f172a; font-size: 16px;">Detail Pesanan</h3>
                <hr style="border: 0; border-top: 1px solid #e2e8f0; margin-bottom: 15px;">
                <p><strong>No. Pesanan :</strong> #{{ $order->order_id }}</p>
                <p><strong>Tanggal     :</strong> {{ $order->created_at->format('d F Y') }}</p>
                <p><strong>Total       :</strong> Rp {{ number_format($order->total_price, 0, ',', '.') }}</p>
                <p><strong>Pembayaran  :</strong> {{ $paymentMethodLabel }}</p>
                <p><strong>Status      :</strong> {{ $order->status_text }}</p>
            </div>
            
            <div class="btn-wrapper">
                <a href="{{ $url }}" class="btn" style="color: #ffffff !important;">Lihat Detail Pesanan</a>
            </div>

            <p>Simpan PDF yang terlampir sebagai bukti transaksi Anda. Sampai jumpa di pembelanjaan berikutnya!</p>
        </div>

        <!-- Footer -->
        <div class="footer">
            <p>Bermasalah dengan tombol di atas? Salin URL berikut ke browser Anda:<br>
            <a href="{{ $url }}" class="trouble-link">{{ $url }}</a></p>
            <p>&copy; {{ date('Y') }} INTERIA. Hak cipta dilindungi undang-undang.</p>
        </div>
    </div>
</body>
</html>
