{% extends 'layouts/base.html.twig' %}

{% block title %}{{ trans('legal.cookies_title') }} — {{ site.name }}{% endblock %}

{% block content %}
    <section class="page-header">
        <h1>{{ trans('legal.cookies_title') }}</h1>
        <p class="muted">{{ trans('legal.cookies_lead', { operator: operator_name }) }}</p>
    </section>

    <article class="legal-doc card">
        <h2>{{ trans('legal.cookies_essential') }}</h2>
        <p>{{ trans('legal.cookies_essential_body') }}</p>

        <table class="data-table cookie-table">
            <thead>
                <tr>
                    <th>{{ trans('legal.cookies_table_name') }}</th>
                    <th>{{ trans('legal.cookies_table_purpose') }}</th>
                    <th>{{ trans('legal.cookies_table_duration') }}</th>
                </tr>
            </thead>
            <tbody>
                <tr>
                    <td><code>PHPSESSID</code></td>
                    <td>{{ trans('legal.cookies_phpsessid') }}</td>
                    <td>{{ trans('legal.cookies_duration_session') }}</td>
                </tr>
                <tr>
                    <td><code>latch_theme</code></td>
                    <td>{{ trans('legal.cookies_theme') }}</td>
                    <td>{{ trans('legal.cookies_duration_year') }}</td>
                </tr>
                {% if gdpr_enabled %}
                <tr>
                    <td><code>latch_cookie_consent</code></td>
                    <td>{{ trans('legal.cookies_consent') }}</td>
                    <td>{{ trans('legal.cookies_duration_year') }}</td>
                </tr>
                {% endif %}
            </tbody>
        </table>

        <h2>{{ trans('legal.cookies_local_storage') }}</h2>
        <p>{{ trans('legal.cookies_local_storage_body') }}</p>

        <h2>{{ trans('legal.cookies_third_party') }}</h2>
        <p>{{ trans('legal.cookies_third_party_body') }}</p>

        <h2>{{ trans('legal.cookies_manage') }}</h2>
        <p>{{ trans('legal.cookies_manage_body') }}</p>
        {% if gdpr_enabled %}
            <p><button type="button" class="btn btn-small" id="cookie-policy-settings">{{ trans('legal.cookies_change_settings') }}</button></p>
        {% endif %}

        <p>{{ trans('legal.cookies_questions', { operator: '<strong>' ~ operator_name ~ '</strong>' })|raw }}{% if contact_email %} at <a href="mailto:{{ contact_email }}">{{ contact_email }}</a>{% endif %}</p>

        <p class="muted legal-updated">{{ trans('legal.last_updated', { date: "now"|date("Y-m-d") }) }}</p>
    </article>
{% endblock %}