{% block error_maintenance_doctype %}
    <!DOCTYPE html>
{% endblock %}

{% block error_maintenance_html %}
    <html lang="{{ "meta.xmlLang"|trans|striptags }}"
          itemscope="itemscope"
          itemtype="https://schema.org/WebPage">
{% endblock %}

{% block error_maintenance_head %}
    {% sw_include '@Storefront/storefront/layout/meta.html.twig' %}
{% endblock %}

{% block error_maintenance_body %}
    <body class="{% block error_maintenance_body_classes %}is-ctl-{{ controllerName|lower }} is-act-{{ controllerAction|lower }}{% endblock %}">
        {% block error_maintenance_body_inner %}
            {% block error_maintenance_noscript %}
                <noscript class="noscript-main">
                    {% sw_include '@Storefront/storefront/utilities/alert.html.twig' with {
                        type: 'info',
                        content: 'general.noscriptNotice'|trans|sw_sanitize,
                        iconCache: false
                    } %}
                </noscript>
            {% endblock %}

            {% block error_maintenance_header %}
                <header class="header-main mt-3">
                    {% block error_maintenance_header_inner %}
                        <div class="container">
                            <div class="row align-items-center header-row">
                                <div class="col-12 col-lg-auto header-logo-col">
                                    {% sw_include '@Storefront/storefront/layout/header/logo.html.twig' %}
                                </div>
                            </div>
                        </div>
                    {% endblock %}
                </header>
            {% endblock %}

            {% block error_maintenance_main %}
                <main class="content-main">
                    {% block error_maintenance_main_content %}
                        {% if page is not null %}

                            {% set cmsPageClasses = ('cms-page ' ~ page.cmsPage.cssClass|striptags)|trim %}
                            <div class="{{ cmsPageClasses }}">
                                {% block page_content_blocks %}
                                    {% sw_include "@Storefront/storefront/page/content/detail.html.twig" with {'cmsPage': page.cmsPage} %}

                                {% endblock %}
                            </div>
                        {% else %}
                            {% block error_maintenance_main_fallback %}
                                <div class="container mt-5">
                                    <img src="{{ asset('assets/illustration/maintenance_mode.svg', 'theme') }}"
                                         alt="{{ "general.maintenanceModeHeader"|trans|striptags }}"
                                         class="rounded mx-auto d-block w-75">

                                    <h1 class="mt-4 text-center">{{ "general.maintenanceModeHeader"|trans }}</h1>
                                    <p class="text-center">{{ "general.maintenanceModeDescription"|trans }}</p>
                                </div>
                            {% endblock %}
                        {% endif %}
                    {% endblock %}
                </main>
            {% endblock %}

            {% block error_maintenance_footer %}
                <footer class="footer-main mt-5 w-75 mx-auto">
                    {% block error_maintenance_footer_content %}
                        <div class="container mt-3 text-center">
                            {% if config('core.basicInformation.imprintPage') is not null %}
                                <a href="{{ seoUrl('frontend.maintenance.singlepage', { id: config('core.basicInformation.imprintPage') }) }}"
                                   title="{{ "general.imprintLink"|trans|sw_sanitize }}"
                                   class="ps-2 pe-2">
                                    {{ "general.imprintLink"|trans|sw_sanitize }}
                                </a>
                            {% endif %}

                            {% if config('core.basicInformation.privacyPage') is not null %}
                                <a href="{{ seoUrl('frontend.maintenance.singlepage', { id: config('core.basicInformation.privacyPage') }) }}"
                                   title="{{ "general.privacyLink"|trans|sw_sanitize }}"
                                   class="ps-2 pe-2">
                                    {{ "general.privacyLink"|trans|sw_sanitize }}
                                </a>
                            {% endif %}
                        </div>
                    {% endblock %}
                </footer>
            {% endblock %}
        {% endblock %}

        {% block error_maintenance_scroll_up %}
            {% sw_include '@Storefront/storefront/layout/scroll-up.html.twig' %}
        {% endblock %}

        {% block error_maintenance_cookie_permission %}
            {% sw_include '@Storefront/storefront/layout/cookie/cookie-permission.html.twig' %}
        {% endblock %}

        {% block error_maintenance_pseudo_modal %}
            {% sw_include '@Storefront/storefront/component/pseudo-modal.html.twig' %}
        {% endblock %}

        {% block error_maintenance_body_script %}
            {% block error_maintenance_script_breakpoints %}
                {# Register the available viewport breakpoints the window.breakpoints object #}
                <script>
                    {% set breakpoint = {
                        'xs': theme_config('breakpoint.xs'),
                        'sm': theme_config('breakpoint.sm'),
                        'md': theme_config('breakpoint.md'),
                        'lg': theme_config('breakpoint.lg'),
                        'xl': theme_config('breakpoint.xl'),
                        'xxl': theme_config('breakpoint.xxl')
                    } %}

                    window.breakpoints = {{ breakpoint|json_encode()|raw }};
                </script>
            {% endblock %}
            {% block error_maintenance_script_reload %}
                <script>
                    setTimeout(function () {
                        location.reload(true);
                    }, 30000);
                </script>
            {% endblock %}
        {% endblock %}
    </body>
{% endblock %}
</html>
