<?php

declare(strict_types=1);

require_once __DIR__ . DIRECTORY_SEPARATOR . 'londenv.php';

$supportEmail = migraease_support_email();
$canonical = function_exists('migraguardai_canonical_script_url')
    ? migraguardai_canonical_script_url()
    : '';

?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Account deletion | MigraEase</title>
    <?php if ($canonical !== ''): ?>
    <link rel="canonical" href="<?= htmlspecialchars($canonical, ENT_QUOTES, 'UTF-8') ?>">
    <?php endif; ?>
    <link rel="stylesheet" href="theme.css">
</head>
<body>
<div class="wrap">
    <?php migraease_render_page_header('delete'); ?>

    <main class="container">
        <h1>Account &amp; data deletion</h1>
        <p class="last-updated">MigraEase &mdash; Skysmile Healthtech AI</p>

        <div class="notice-box">
            <strong>Primary method.</strong> Delete your account inside the MigraEase Android app. This is the fastest way to remove your Firebase sign-in association and clear data stored on your device.
        </div>

        <h2>Delete in the app</h2>
        <ol>
            <li>Open <strong>MigraEase</strong> on your Android device.</li>
            <li>Sign in with <strong>Google</strong> (required for cloud-linked account deletion; guest data is local only).</li>
            <li>Navigate to <strong>Settings</strong> &rarr; <strong>Delete account</strong>.</li>
            <li>Confirm when prompted.</li>
        </ol>

        <p class="muted">After confirmation, the app attempts to delete your Firebase Authentication user and removes local databases and preferences on that device.</p>

        <?php migraease_render_deletion_block($supportEmail); ?>

        <h2>Related policies</h2>
        <p>
            <a href="privacypolicy.html">Privacy Policy</a> &middot;
            <a href="terms-of-use.html">Terms of Use</a>
        </p>

        <footer>&copy; 2026 Skysmile Healthtech AI</footer>
    </main>
</div>
</body>
</html>
