<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Customer Details</title>
    <style>
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            line-height: 1.6;
            color: #333;
            background: #f5f5f5;
        }

        @media print {
            body {
                background: white;
            }
            .no-print {
                display: none !important;
            }
        }

        .report-container {
            max-width: 8.5in;
            margin: 20px auto;
            padding: 40px;
            background: white;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
        }

        .report-header {
            text-align: center;
            margin-bottom: 20px;
        }

        .company-logo {
            font-size: 24px;
            font-weight: bold;
            color: #2c3e50;
            margin-bottom: 5px;
        }

        .company-info {
            font-size: 11px;
            color: #666;
            line-height: 1.4;
        }

        .details {
            font-size: 13px;
            margin-top: 20px;
        }

        .details p {
            margin-bottom: 8px;
        }

        .print-button {
            display: inline-block;
            margin: 20px auto;
            padding: 10px 20px;
            background: #3498db;
            color: white;
            border: none;
            border-radius: 4px;
            cursor: pointer;
            font-size: 12px;
        }

        .print-button:hover {
            background: #2980b9;
        }

        .no-print-container {
            text-align: center;
            margin: 20px 0;
        }
    </style>
</head>
<body>
    <div class="report-container">
        <div class="report-header">
            <div class="company-logo">{{ config('app.name') }}</div>
            <div class="company-info">{{ config('app.address', '') }}</div>
            <div class="report-title">Customer Details</div>
        </div>

        <div class="details">
            <p><strong>Name:</strong> {{ $customer->name }}</p>
            <p><strong>Email:</strong> {{ $customer->email ?? '-' }}</p>
            <p><strong>Phone:</strong> {{ $customer->phone ?? '-' }}</p>
            <p><strong>Address:</strong> {{ $customer->address ?? '-' }}</p>
        </div>

        <div class="no-print-container no-print">
            <button class="print-button" onclick="window.print()">Print</button>
        </div>
    </div>

    <script>
        if (new URLSearchParams(window.location.search).get('autoprint') === '1') {
            setTimeout(() => window.print(), 500);
        }
    </script>
</body>
</html>
