<x-layouts.app :title="__('earn_portal.register_title').' — TrafficPumper'">
    <x-auth-card :title="__('earn_portal.register_title')" :description="__('earn_portal.register_description')">
        <form method="POST" action="{{ route('earn.register.store') }}">@csrf
            <div class="mb-3"><label class="form-label" for="name">{{ __('earn_portal.name') }}</label><input class="form-control" id="name" name="name" value="{{ old('name') }}" required autocomplete="name"></div>
            <div class="mb-3"><label class="form-label" for="email">{{ __('ui.email') }}</label><input class="form-control" id="email" name="email" type="email" value="{{ old('email') }}" required autocomplete="email"></div>
            <div class="mb-3"><label class="form-label" for="password">{{ __('ui.password') }}</label><input class="form-control" id="password" name="password" type="password" required autocomplete="new-password"></div>
            <div class="mb-3"><label class="form-label" for="password_confirmation">{{ __('earn_portal.password_confirmation') }}</label><input class="form-control" id="password_confirmation" name="password_confirmation" type="password" required autocomplete="new-password"></div>
            <div class="form-check mb-2"><input class="form-check-input @error('terms_accepted') is-invalid @enderror" id="terms_accepted" name="terms_accepted" type="checkbox" value="1" @checked(old('terms_accepted')) required><label class="form-check-label" for="terms_accepted">{!! __('earn_legal.form.terms', ['link' => '<a href="'.route('earn.terms').'" target="_blank" rel="noopener noreferrer">'.__('earn_legal.form.terms_link').'</a>']) !!}</label>@error('terms_accepted')<div class="invalid-feedback">{{ $message }}</div>@enderror</div>
            <div class="form-check mb-3"><input class="form-check-input @error('privacy_notice_acknowledged') is-invalid @enderror" id="privacy_notice_acknowledged" name="privacy_notice_acknowledged" type="checkbox" value="1" @checked(old('privacy_notice_acknowledged')) required><label class="form-check-label" for="privacy_notice_acknowledged">{!! __('earn_legal.form.privacy', ['link' => '<a href="'.route('earn.privacy').'" target="_blank" rel="noopener noreferrer">'.__('earn_legal.form.privacy_link').'</a>']) !!}</label>@error('privacy_notice_acknowledged')<div class="invalid-feedback">{{ $message }}</div>@enderror</div>
            <button class="btn btn-primary w-100" type="submit">{{ __('earn_portal.register') }}</button>
        </form>
        <div class="d-flex flex-wrap justify-content-between gap-2 mt-3 small"><a href="{{ route('earn.login') }}">{{ __('earn_portal.have_account') }}</a><a href="{{ route('home') }}">{{ __('earn_portal.back_home') }}</a></div>
        <div class="d-flex align-items-center justify-content-center gap-2 mt-4 pt-3 border-top"><x-locale-picker /><x-theme-picker /></div>
    </x-auth-card>
</x-layouts.app>
