@extends('layouts.auth')

@section('page_title', __('Recuperar contraseña'))

@section('auth_nav')
    <a href="{{ route('login') }}" class="btn btn-sm rt-btn-cherry px-3">{{ __('Volver al inicio de sesión') }}</a>
@endsection

@section('content')
    <div class="rt-auth-card rt-auth-card--focus">
        <h1 class="rt-auth-card-title">{{ __('Recuperar contraseña') }}</h1>
        <p class="rt-auth-card-lead mb-0">{{ __('Indica el correo de tu cuenta y te enviaremos un enlace para elegir una nueva contraseña.') }}</p>

        <div class="rt-auth-divider"></div>

        @if (session('status'))
            <div class="rt-auth-alert mb-4 text-start" role="alert">
                {{ session('status') }}
            </div>
        @endif

        <form method="POST" action="{{ route('password.email') }}" class="rt-auth-form">
            @csrf

            <div class="mb-4">
                <label for="email" class="rt-auth-label">{{ __('Correo electrónico') }}</label>
                <input id="email" type="email" class="form-control @error('email') is-invalid @enderror" name="email" value="{{ old('email') }}" required autocomplete="email" autofocus placeholder="nombre@ejemplo.com">

                @error('email')
                    <span class="invalid-feedback" role="alert"><strong>{{ $message }}</strong></span>
                @enderror
            </div>

            <button type="submit" class="btn btn-sm rt-btn-cherry w-100 mb-3">{{ __('Enviar enlace') }}</button>

            <p class="text-center small text-secondary mb-0">
                <a class="rt-auth-link" href="{{ route('login') }}">{{ __('Volver a iniciar sesión') }}</a>
            </p>
        </form>
    </div>
@endsection
