<!DOCTYPE html>
<html lang="en" data-bs-theme="dark">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Privacy Policy — {{ group.name }}</title>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.3/font/bootstrap-icons.min.css">
</head>
<body class="bg-dark text-light">

<nav class="navbar navbar-dark bg-secondary bg-opacity-25 border-bottom border-secondary mb-4">
  <div class="container">
    <span class="navbar-brand">
      <i class="bi bi-file-earmark-lock2 me-2 text-warning"></i>
      <strong>{{ group.name }}</strong> — Privacy Policy
    </span>
    <span class="text-muted small">Powered by <a href="https://log.devanturas.net" class="text-muted" target="_blank" rel="noopener noreferrer">MCLogger</a> &mdash; Made by Devanturas</span>
  </div>
</nav>

<div class="container" style="max-width: 860px;">

  {% if not policy or not policy.policy_text %}
    <div class="alert alert-warning">
      <i class="bi bi-exclamation-triangle me-2"></i>
      This server has not yet published a privacy policy.
      Please contact the server administrator for more information.
    </div>
  {% else %}

    {% if policy.updated_at %}
    <p class="text-muted small mb-4">
      <i class="bi bi-clock me-1"></i>
      Last updated: {{ policy.updated_at.strftime('%B %d, %Y') }}
    </p>
    {% endif %}

    {% if policy.policy_url %}
    <a href="{{ policy.policy_url }}" target="_blank" rel="noopener noreferrer"
       class="btn btn-outline-info btn-sm mb-4">
      <i class="bi bi-box-arrow-up-right me-1"></i>View full policy on our website
    </a>
    {% endif %}

    <div class="card bg-secondary bg-opacity-10 border-secondary">
      <div class="card-body">
        <pre class="mb-0 text-light" style="white-space: pre-wrap; word-break: break-word; font-family: inherit;">{{ policy.policy_text }}</pre>
      </div>
    </div>

  {% endif %}

  <hr class="border-secondary mt-5">
  <p class="text-muted small text-center mb-4">
    This page is hosted by <a href="https://log.devanturas.net" class="text-secondary" target="_blank" rel="noopener noreferrer">MCLogger</a>
    on behalf of <em>{{ group.name }}</em>.
  </p>

</div>

<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>
