<?php
/**
 * Login Template
 *
 * This template is automatically applied to login pages selected in FleekDash settings.
 * It should NOT have a "Template Name:" header to prevent it from appearing in the
 * WordPress page template dropdown, as it's managed programmatically by Login.php
 *
 * Note: Theme/plugin style blocking is handled by LoginStylesGuard (see Login.php bootstrap).
 *
 * Login styles use body.fleek-login-page (class stays on <body> only). Do not add fleek-login-page to <html>:
 * rules scoped as html.fleek-login-page + universal div/span resets break the React layout if applied.
 */

$site_display_name = \get_option('_fleekdash_brand_name', '');
if (!\is_string($site_display_name) || \trim($site_display_name) === '') {
    $site_display_name = \get_bloginfo('name');
}

$document_title = \sprintf(
    /* translators: %s: customer site or brand name shown in the browser tab */
    \__('%s — Sign in', 'fleekdash'),
    $site_display_name,
);
?>
<!DOCTYPE html>
<html <?php language_attributes(); ?>>

    <head>
        <meta charset="UTF-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <title><?php echo \esc_html($document_title); ?></title>
        <?php wp_head(); ?>
    </head>

    <body class="fleek-login-page">

        <div id="fleekdash-login-app"></div>

        <?php wp_footer(); ?>
    </body>

</html>
