@extends('layouts.front')

@section('content')
<div class="jel-portal-page">
    @include('front.partials.flash-messages')

    <section class="jel-password-layout">
        <div class="jel-history-intro">
            <span class="jel-portal-kicker">Email Verification</span>
            <h1>Confirm your email address with verification code.</h1>
            <p>Email verification complete hone se notifications, recovery flow aur account identity zyada reliable ho jati hai.</p>
        </div>

        <section class="jel-form-panel">
            <div class="jel-form-panel-head">
                <div>
                    <h2>Enter Email Code</h2>
                    <p>Code sent to {{ Auth::user()->useremailid }}</p>
                </div>
            </div>

            <form class="jel-portal-form" action="{{ route('saveemailcode') }}" method="post">
                @csrf

                <label class="jel-portal-field">
                    <span>6 Digit Code</span>
                    <input class="jel-code-input" type="text" name="mobileotp" id="mobileotp" placeholder="000000" minlength="6" maxlength="6" inputmode="numeric" oninput="this.value = this.value.replace(/\D/g, '').slice(0, 6)" required>
                </label>

                <div class="jel-code-actions">
                    <button class="jel-portal-button" id="buttonsubmit" type="submit">Verify Email</button>
                </div>
            </form>

            <form action="{{ route('emailvarificarion', ['emailid' => Auth::user()->useremailid]) }}" method="post" class="mt-3">
                @csrf
                <button class="jel-portal-button jel-portal-button-muted" type="submit">Resend Code</button>
            </form>
        </section>
    </section>
</div>
@endsection
