<?php
/**
 * Sección de confirmación del formulario
 */
?>
<!-- Sección 8: Confirmación -->
<section class="form-section" data-section="8">
    <div class="section-header">
        <h2 class="section-title"><i class="fas fa-check-circle"></i> <?php echo $text['confirmation']; ?></h2>
        <p class="section-description"><?php echo $text['confirmationDesc']; ?></p>
    </div>
    
    <div class="form-content">
        <div class="alert alert-primary">
            <i class="fas fa-info-circle"></i>
            <p><?php echo $text['submitInfo']; ?></p>
        </div>
        
        <div class="form-group">
            <h3><?php echo $text['termsConditions']; ?></h3>
            <div class="terms-container" style="max-height: 200px; overflow-y: auto; padding: 15px; border: 1px solid #ccc; border-radius: 8px; margin-bottom: 15px; background-color: #f9f9f9;">
                <p><?php echo $text['termsText']; ?></p>
            </div>
            
            <div class="form-group">
                <label class="radio-option">
                    <input type="checkbox" id="terms_accepted" name="terms_accepted" required>
                    <span><?php echo $text['acceptTerms']; ?></span>
                </label>
                <span class="error-message" id="terms_accepted-error"><i class="fas fa-exclamation-circle"></i> <?php echo $text['requiredField']; ?></span>
            </div>
        </div>
        
        <!-- CSRF token para protección del formulario -->
        <?php
        $_SESSION['csrf_token'] = bin2hex(random_bytes(32));
        ?>
        <input type="hidden" name="csrf_token" value="<?php echo $_SESSION['csrf_token']; ?>">
        
        <div class="success-message" id="success-message">
            <div class="success-icon">
                <i class="fas fa-check-circle"></i>
            </div>
            <h3><?php echo $text['submitSuccess']; ?></h3>
            <p><?php echo $text['submitSuccessDesc']; ?></p>
        </div>
    </div>
    
    <div class="form-navigation">
        <button type="button" class="btn btn-prev" data-prev="7"><i class="fas fa-arrow-left"></i> <?php echo $text['previous']; ?></button>
        <button type="submit" class="btn btn-submit"><?php echo $text['submit']; ?> <i class="fas fa-paper-plane"></i></button>
    </div>
</section>