{% extends "layout/auth_layout.twig" %}

{% block page_title_block %}{{ __('page_title.instructions_sent') }}{% endblock %}

{% block content %}
<div class="min-h-screen flex items-center justify-center bg-gradient-to-r from-blue-900 to-indigo-700 py-12 px-4 sm:px-6 lg:px-8">
    <div class="max-w-md w-full space-y-8 bg-white p-10 rounded-xl shadow-2xl text-center">
        <div>
            <i class="fas fa-envelope-open-text text-6xl text-green-500 mb-6"></i>
            <h2 class="text-3xl font-extrabold text-gray-900">
                {{ __('auth.password_recovery_email_sent_title') }}
            </h2>
            <p class="mt-2 text-gray-600">
                {# O controller passará a variável 'email' para ser usada no placeholder %email% #}
                {{ __('messages.password_recovery_email_sent', {'email': '<strong class="font-medium">' ~ email ~ '</strong>'}) | raw }}
            </p>
        </div>

        {# Este bloco só será exibido se o controller passar a variável 'dev_reset_link' #}
        {% if dev_reset_link %}
        <div class="mt-6 p-3 bg-yellow-100 border border-yellow-300 rounded-md text-sm text-yellow-800">
            <p class="font-bold">{{ __('auth.dev_reset_link_info') }}</p>
            <p class="mt-1">{{ __('auth.dev_reset_link_text') }} 
                <a href="{{ dev_reset_link }}" class="underline hover:text-yellow-900 break-all">{{ dev_reset_link }}</a>
            </p>
        </div>
        {% endif %}
        
        <div class="mt-8">
            <a href="{{ BASE_URL }}{{ routeParser.urlFor('auth.login.form') }}"
               class="group relative w-full flex justify-center py-3 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
                {{ __('link.back_to_login') }}
            </a>
        </div>
    </div>
</div>
{% endblock %}