<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Privacy Policy</title>

    <!-- Include your global or theme-specific CSS -->
    <link rel="stylesheet" href="/static/css/style-menu.css">
    <link rel="stylesheet" href="/static/css/style-search.css">
    <link rel="stylesheet" href="/static/css/{{.Theme}}.css">
    <link rel="stylesheet" href="/static/css/style-fonts.css">
    <link rel="stylesheet" href="/static/css/style-privacy.css">

    <!-- Icons -->
    <link rel="icon" href="{{ .IconPathSVG }}" type="image/svg+xml">
    <link rel="icon" href="{{ .IconPathPNG }}" type="image/png">
    <link rel="apple-touch-icon" href="{{ .IconPathPNG }}">
</head>
<body>
    <!-- Menu Button -->
    <div id="js-enabled">
        <div class="settings-search-div settings-search-div-search">
            <button class="material-icons-round clickable settings-icon-link settings-icon-link-search">&#xe5d2;</button>
        </div>
        <div class="search-menu settings-menu-hidden">
            <h2>Settings</h2>
            <div class="settings-content">
                <button id="settingsButton" onclick="window.location.href='/settings'">All settings</button>
                <div class="theme-settings">
                    <p><span class="highlight">Current theme: </span> <span id="theme_name">{{.Theme}}</span></p>
                    <div class="themes-settings-menu">
                        <div><img class="view-image-search clickable" id="dark_theme" alt="Dark Theme" src="/static/images/dark.webp"></div>
                        <div><img class="view-image-search clickable" id="light_theme" alt="Light Theme" src="/static/images/light.webp"></div>
                    </div>
                </div>
                <select class="lang" name="safe" id="safeSearchSelect">
                    <option value="disabled" {{if eq .Safe "disabled"}}selected{{end}}>Safe Search Off</option>
                    <option value="active" {{if eq .Safe "active"}}selected{{end}}>Safe Search On</option>
                </select>
                <select class="lang" name="lang" id="languageSelect">
                    {{range .LanguageOptions}}
                    <option value="{{.Code}}" {{if eq .Code $.CurrentLang}}selected{{end}}>{{.Name}}</option>
                    {{end}}
                </select>  
                <button id="aboutQGatoBtn">About QGato</button>
            </div>
        </div>
    </div>
    <div id="js-disabled">
        <a href="/settings" class="material-icons-round settings-icon-link-search">&#xe5d2;</a>
    </div>

    <!-- Popup Modal for QGato -->
    <div id="aboutQGatoModal">
        <!-- Close Button -->
        <button class="btn-nostyle" id="close-button">
            <div class="material-icons-round icon_visibility clickable cloase-btn">&#xe5cd;</div>
        </button>

        <div class="modal-content">
            <img 
                src="/static/images/icon.svg" 
                alt="QGato"
            >
            <h2>QGato</h2>
            <p>A open-source private search engine.</p>
            <div class="button-container">
                <button onclick="window.location.href='https://weforge.xyz/Spitfire/Search'">Source Code</button>
                <button onclick="window.location.href='/privacy'">Privacy policy</button>
            </div>
        </div>
    </div>   

    <!-- Main Content Section -->
    <main class="privacy-content-wrapper">
        <header class="privacy-header">
            <h1>Privacy Policy</h1>
            <p>Your privacy is important to us. This page outlines our practices.</p>
        </header>

        <section class="privacy-section">
            <h2>Introduction</h2>
            <p>This website is a Free and Open Source Software (FOSS) project licensed under the <a href="https://www.gnu.org/licenses/agpl-3.0.html" target="_blank" rel="noopener noreferrer">AGPL-3.0</a> license. The project is committed to providing a private and secure experience for all users.</p>
        </section>

        <section class="privacy-section">
            <h2>Data Collection</h2>
            <p>Our servers <b>do not collect any user data</b>, including IP addresses, browsing history, or any other identifiable information. We respect your privacy and ensure that no user information is logged or stored on our servers.</p>
        </section>

        <section class="privacy-section">
            <h2>Cookies Used</h2>
            <p>Our cookies are <b>not used to track users</b> or sell user data, they are just used to save your settings.</p>
            <p>These following cookies are used by this site:</p>
            <table class="cookie-table">
                <thead>
                    <tr>
                        <th>Cookie Name</th>
                        <th>Value</th>
                        <th>Description</th>
                        <th>Expiration</th>
                    </tr>
                </thead>
                <tbody>
                    {{ range .CookieRows }}
                    <tr>
                        <td>{{ .Name }}</td>
                        <td>{{ .Value }}</td>
                        <td>{{ .Description }}</td>
                        <td>{{ .Expiration }}</td>
                    </tr>
                    {{ end }}
                </tbody>
            </table>
        </section>        
          
    </main>

    <!-- Footer Section, matching site theme 
    <footer class="privacy-footer">
        <p>&copy; QGato. Licensed under the <a href="https://www.gnu.org/licenses/agpl-3.0.html" target="_blank" rel="noopener noreferrer">AGPL-3.0</a>.</p>
    </footer>    -->

    <!-- Included JavaScript -->
    <script defer src="/static/js/minimenu.js"></script>
    <script>
        // When JS is detected, update the DOM to show the JS-based menu
        document.getElementById('js-enabled').style.display = 'block';
        document.getElementById('js-disabled').style.display = 'none';
    </script>
</body>
</html>