<?php

/**
 * Email template for 2FA verification code.
 *
 * Variables via $data array:
 * - $data['code']            (string) The 6-digit OTP code.
 * - $data['site_name']       (string) WordPress site name.
 * - $data['expires_minutes'] (int)    Code validity in minutes.
 * - $data['heading']         (string) Email heading (context-aware).
 * - $data['intro']           (string) Introductory paragraph (context-aware).
 * - $data['warning']         (string) Security warning text (context-aware).
 */

if ( ! defined( 'ABSPATH' ) ) {
    exit;
}
?>
<h1><?php echo esc_html( $data['heading'] ); ?></h1>

<p><?php echo esc_html( $data['intro'] ); ?></p>

<div style="text-align: center; margin: 30px 0;">
    <div style="display: inline-block; font-size: 32px; font-weight: 700; letter-spacing: 8px;
                padding: 16px 32px; background: #f0fdf4; border: 2px solid #059669;
                border-radius: 8px; color: #059669; font-family: 'Courier New', Courier, monospace;">
        <?php echo esc_html( $data['code'] ); ?>
    </div>
</div>

<p style="text-align: center; color: #6b7280; font-size: 14px;">
    <?php
    printf(
        /* translators: %s: number of minutes */
        esc_html__( 'This code expires in %s minutes.', 'securwp' ),
        '<strong>' . esc_html( (string) $data['expires_minutes'] ) . '</strong>'
    );
    ?>
</p>

<div class="alert-warn">
    <?php echo esc_html( $data['warning'] ); ?>
</div>
