<?php if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly ?>

<?php
    $site_name = \EHxMe\Classes\Settings::extractSettingValue('mail_appears_from', get_bloginfo('name'));
?>

<!DOCTYPE html>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title><?php echo esc_html($subject); ?></title>
</head>
<body>
    <div style="max-width: 600px; margin: 0 auto; padding: 20px; border: 1px solid #ddd; border-radius: 8px; background: #f9f9f9;">
        
        <h1>
            <?php 
                /* translators: * %s: The name of the website/organization */
                printf(esc_html__('Password Reset for %s', 'ehx-members'), esc_html($site_name)); 
            ?>
        </h1>
        <p>
            <?php
                /* translators: * %s: The display name of the user */
                printf(esc_html__('Hello %s,', 'ehx-members'), esc_html($user->display_name)); 
            ?>
        </p>
        
        <p><?php esc_html_e('Someone has requested a password reset for the following account:', 'ehx-members'); ?></p>
        
        <p>
            <?php 
                /* translators: * %s: The user login of the user */
                printf(esc_html__('Username: %s', 'ehx-members'), esc_html($user->user_login)); 
            ?>
        </p>
        
        <p><?php esc_html_e('If this was a mistake, just ignore this email and nothing will happen.', 'ehx-members'); ?></p>
        
        <p><?php esc_html_e('To reset your password, click the following button:', 'ehx-members'); ?></p>
        
        <p>
            <a href="<?php echo esc_url($reset_url); ?>" style="display: inline-block;padding: 10px 20px;background: #2271b1;color: #fff !important;text-decoration: none;border-radius: 4px;margin: 15px 0;">
                <?php esc_html_e('Reset Password', 'ehx-members'); ?>
            </a>
        </p>
        
        <p><?php esc_html_e('Or copy and paste this link into your browser:', 'ehx-members'); ?></p>
        
        <p><code><?php echo esc_url($reset_url); ?></code></p>
        
        <p><?php esc_html_e('This link will expire in 1 hour.', 'ehx-members'); ?></p>

        <div style="font-size: 12px; color: #666; margin-top: 20px;">
            <p>
                <?php 
                    /* translators: %s: The name of the website/organization wrapped in <a> tags */
                    printf(esc_html__('This email was sent from %s', 'ehx-members'), '<a href="' . esc_url(home_url()) . '">' . esc_html($site_name) . '</a>'); 
                ?>
            </p>
            <p><?php esc_html_e('If you didn\'t request this, please contact our support team.', 'ehx-members'); ?></p>
        </div>
    </div>
</body>
</html>