<x-site-layout title="Check Application Status">

    {{-- Hero Section --}}
    <section class="relative bg-gradient-to-r from-green-600 to-green-700 shadow-lg">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
            <div class="flex items-center gap-6">
                <div class="hidden md:flex w-20 h-20 rounded-xl shadow-lg bg-white/20 items-center justify-center flex-shrink-0">
                    <i class="fas fa-search text-white text-3xl"></i>
                </div>
                <div>
                    <h1 class="text-3xl md:text-4xl font-serif font-bold text-white">
                        Check Application Status
                    </h1>
                    <p class="text-green-100 mt-2">
                        Enter your reference number to track your membership application.
                    </p>
                </div>
            </div>
        </div>
    </section>

    {{-- Breadcrumb --}}
    <div class="bg-gray-50 border-b border-gray-200">
        <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-3">
            <nav class="flex items-center space-x-2 text-sm text-gray-600" aria-label="Breadcrumb">
                <a href="{{ url('/') }}" class="hover:text-green-600 transition flex items-center">
                    <i class="fas fa-home mr-1"></i>Home
                </a>
                <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
                <a href="{{ route('membership.categories.index') }}" class="hover:text-green-600 transition">
                    Membership
                </a>
                <i class="fas fa-chevron-right text-gray-400 text-xs"></i>
                <span class="text-gray-900 font-medium">Check Application Status</span>
            </nav>
        </div>
    </div>

    <section class="py-16 bg-gray-50 min-h-screen">
        <div class="max-w-5xl mx-auto px-4 sm:px-6 lg:px-8">

            {{-- Error Messages --}}
            @if ($errors->any())
                <div class="mb-6 p-4 bg-red-50 border border-red-200 rounded-lg">
                    @foreach ($errors->all() as $error)
                        <p class="text-sm text-red-700">{{ $error }}</p>
                    @endforeach
                </div>
            @endif

            {{-- Check Status Form --}}
            <div class="bg-white rounded-xl shadow-lg overflow-hidden">
                <div class="bg-green-600 px-6 py-5">
                    <h2 class="text-lg font-semibold text-white flex items-center">
                        <i class="fas fa-clipboard-list mr-3"></i>
                        Application Status Lookup
                    </h2>
                </div>
                <div class="p-8">
                    <form method="POST" action="{{ route('membership.check-status.submit') }}">
                        @csrf
                        <div class="mb-6">
                            <label for="reference_number" class="block text-sm font-medium text-gray-700 mb-2">
                                Reference Number
                            </label>
                            <input type="text"
                                   id="reference_number"
                                   name="reference_number"
                                   value="{{ old('reference_number') }}"
                                   placeholder="e.g. MEM-2024-XXXXXX"
                                   class="w-full px-4 py-3 border border-gray-300 rounded-lg focus:ring-2 focus:ring-green-500 focus:border-green-500 text-gray-900"
                                   required>
                            <p class="mt-2 text-sm text-gray-500">
                                Your reference number was sent to your email after submitting your application.
                            </p>
                        </div>
                        <button type="submit"
                                class="w-full px-6 py-3 bg-green-600 text-white rounded-lg hover:bg-green-700 transition font-medium text-base">
                            <i class="fas fa-search mr-2"></i> Check Status
                        </button>
                    </form>
                </div>
            </div>

            {{-- Apply Link --}}
            <p class="text-center mt-6 text-sm text-gray-600">
                Don't have an application yet?
                <a href="{{ route('membership.apply') }}" class="text-green-600 hover:underline font-medium">Apply for membership</a>
            </p>

        </div>
    </section>

</x-site-layout>
