<section class="space-y-8">
    <header class="space-y-2 border-l-2 border-indigo-500/30 pl-4">
        <h2 class="text-[11px] font-black text-white uppercase tracking-[0.3em] italic">
            {{ __('Informasi Profil') }}
        </h2>
        <p class="text-[9px] font-bold text-slate-500 uppercase tracking-widest italic leading-relaxed">
            {{ __("Perbarui informasi identitas akun dan alamat email koordinat Anda.") }}
        </p>
    </header>

    <form id="send-verification" method="post" action="{{ route('verification.send') }}">
        @csrf
    </form>

    <form method="post" action="{{ route('profile.update') }}" class="space-y-8">
        @csrf
        @method('patch')

        <div class="space-y-3">
            <x-input-label for="name" :value="__('Nama Lengkap')" />
            <x-text-input id="name" name="name" type="text" class="block w-full" :value="old('name', $user->name)" required autofocus autocomplete="name" />
            <x-input-error :messages="$errors->get('name')" />
        </div>

        <div class="space-y-3">
            <x-input-label for="email" :value="__('Alamat Email')" />
            <x-text-input id="email" name="email" type="email" class="block w-full" :value="old('email', $user->email)" required autocomplete="username" />
            <x-input-error :messages="$errors->get('email')" />

            @if ($user instanceof \Illuminate\Contracts\Auth\MustVerifyEmail && ! $user->hasVerifiedEmail())
                <div class="mt-4 p-6 bg-amber-500/5 border border-amber-500/10 rounded-2xl">
                    <p class="text-[10px] font-bold text-amber-500 uppercase tracking-widest italic">
                        {{ __('Alamat email Anda belum terverifikasi.') }}

                        <button form="send-verification" class="underline ml-2 hover:text-white transition-colors">
                            {{ __('Klik untuk kirim ulang email verifikasi.') }}
                        </button>
                    </p>

                    @if (session('status') === 'verification-link-sent')
                        <p class="mt-3 text-[9px] font-black text-emerald-400 uppercase tracking-widest italic">
                            {{ __('Tautan verifikasi baru telah dikirimkan ke alamat email Anda.') }}
                        </p>
                    @endif
                </div>
            @endif
        </div>

        <div class="flex items-center gap-6 pt-4 border-t border-white/5">
            <x-primary-button>{{ __('Simpan Perubahan →') }}</x-primary-button>

            @if (session('status') === 'profile-updated')
                <p
                    x-data="{ show: true }"
                    x-show="show"
                    x-transition
                    x-init="setTimeout(() => show = false, 2000)"
                    class="text-[10px] font-black text-emerald-400 uppercase tracking-widest italic animate-pulse"
                >{{ __('Berhasil Tersimpan.') }}</p>
            @endif
        </div>
    </form>
</section>
