@if (session('success'))
    <div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 4000)" x-transition class="mb-4">
        <div class="rounded-lg bg-green-50 border border-green-200 p-4">
            <p class="text-sm text-green-800">{{ session('success') }}</p>
        </div>
    </div>
@endif

@if (session('error'))
    <div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 6000)" x-transition class="mb-4">
        <div class="rounded-lg bg-red-50 border border-red-200 p-4">
            <p class="text-sm text-red-800">{{ session('error') }}</p>
        </div>
    </div>
@endif

@if (session('info'))
    <div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 5000)" x-transition class="mb-4">
        <div class="rounded-lg bg-sky-50 border border-sky-200 p-4">
            <p class="text-sm text-sky-800">{{ session('info') }}</p>
        </div>
    </div>
@endif

@if (session('warning'))
    <div x-data="{ show: true }" x-show="show" x-init="setTimeout(() => show = false, 5000)" x-transition class="mb-4">
        <div class="rounded-lg bg-yellow-50 border border-yellow-200 p-4">
            <p class="text-sm text-yellow-800">{{ session('warning') }}</p>
        </div>
    </div>
@endif

@if ($errors->any())
    <div class="mb-4 rounded-lg bg-red-50 border border-red-200 p-4">
        <p class="text-sm font-medium text-red-800">Please fix the following:</p>
        <ul class="mt-1 list-disc pl-5 text-sm text-red-700">
            @foreach ($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
@endif
