<?php
declare(strict_types=1);

/**
 * @var \App\View\AppView $this
 * Layout used by the admin login / recovery screens. No topbar.
 */
?>
<!DOCTYPE html>
<html lang="en">
<head>
    <?= $this->Html->charset() ?>
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="color-scheme" content="light">
    <meta name="theme-color" content="#FFFFFF">
    <title><?= $this->fetch('title', 'CandleCraft Admin') ?></title>
    <link rel="icon" type="image/svg+xml" href="<?= $this->Url->build('/favicon.svg') ?>">
    <link rel="manifest" href="<?= $this->Url->build('/manifest.webmanifest') ?>">
    <link rel="preconnect" href="https://fonts.googleapis.com">
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
    <link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap" rel="stylesheet">
    <?= $this->Html->css('candlecraft') ?>
    <?= $this->fetch('meta') ?>
    <?= $this->fetch('css') ?>
</head>
<body class="cc-root">
    <a class="cc-skip-link" href="#main-content">Skip to content</a>
    <?php $flashMessages = $this->Flash->render(); ?>
    <?php if (!empty(trim((string)$flashMessages))): ?>
        <div class="cc-flash-wrap"><?= $flashMessages ?></div>
    <?php endif; ?>
    <main id="main-content">
        <?= $this->fetch('content') ?>
    </main>
    <?= $this->fetch('script') ?>
    <?= $this->Html->script('candlecraft', ['defer' => true]) ?>
</body>
</html>
