<x-layouts.app title="Report Phishing & Email Scams" activePage="security">
<div class="max-w-2xl mx-auto">
    <h2 class="text-2xl font-bold text-gray-800 mb-2">Report Phishing & Email Scams</h2>
    <p class="text-sm text-gray-500 mb-6">Received a suspicious email, text, or phone call claiming to be from us? Report it here so we can take action.</p>

    <div class="bg-yellow-50 border border-yellow-200 rounded-lg p-4 mb-6">
        <h3 class="text-sm font-bold text-yellow-800 mb-1">How to Spot Phishing</h3>
        <ul class="text-xs text-yellow-700 list-disc list-inside space-y-1">
            <li>Emails asking you to verify your account by clicking a link</li>
            <li>Messages with urgent threats (e.g., "your account will be closed")</li>
            <li>Requests for your password, PIN, or Social Security Number</li>
            <li>Unfamiliar sender addresses that mimic our domain</li>
        </ul>
    </div>

    <form method="POST" action="{{ route('security.report-phishing.store') }}" class="bg-white rounded-lg shadow p-6 space-y-5">
        @csrf

        <div>
            <label class="block text-sm font-semibold text-gray-700 mb-1">Report Type</label>
            <select name="type" required class="w-full border border-gray-300 rounded px-3 py-2 text-sm focus:ring-blue-500 focus:border-blue-500">
                @foreach($types as $t)
                <option value="{{ $t->value }}">{{ $t->label() }}</option>
                @endforeach
            </select>
            @error('type') <p class="text-red-500 text-xs mt-1">{{ $message }}</p> @enderror
        </div>

        <div>
            <label class="block text-sm font-semibold text-gray-700 mb-1">Subject</label>
            <input type="text" name="subject" value="{{ old('subject') }}" required class="w-full border border-gray-300 rounded px-3 py-2 text-sm focus:ring-blue-500 focus:border-blue-500" placeholder="e.g., Suspicious email from no-reply@bank-secure.com">
            @error('subject') <p class="text-red-500 text-xs mt-1">{{ $message }}</p> @enderror
        </div>

        <div>
            <label class="block text-sm font-semibold text-gray-700 mb-1">Description</label>
            <textarea name="description" rows="5" required class="w-full border border-gray-300 rounded px-3 py-2 text-sm focus:ring-blue-500 focus:border-blue-500" placeholder="Paste the email content or describe the suspicious message. Include sender address, links, and any other details.">{{ old('description') }}</textarea>
            @error('description') <p class="text-red-500 text-xs mt-1">{{ $message }}</p> @enderror
        </div>

        <button type="submit" class="w-full bg-red-600 text-white py-2.5 rounded font-semibold text-sm hover:bg-red-700 transition">Submit Phishing Report</button>
    </form>
</div>
</x-layouts.app>
