'use client';

import Link from 'next/link';

export default function PrivacyPage() {
  return (
    <main className="panel" style={{ maxWidth: 900, margin: '40px auto', display: 'grid', gap: 14 }}>
      <div className="breadcrumb">
        <Link href="/">Home</Link> / <span>Privacy & cookies</span>
      </div>
      <h1>Privacy & cookies</h1>
      <p style={{ color: '#cbd5e1' }}>Updated: {new Date().toISOString().slice(0, 10)}</p>

      <section className="privacy-block">
        <h3>What data we collect</h3>
        <ul>
          <li>Account data: email, password hash, name, phone (optional), role/status.</li>
          <li>Listing data: location, contact details, amenities, photos, translations.</li>
          <li>Operational logs: minimal request metadata for diagnostics.</li>
        </ul>
      </section>

      <section className="privacy-block">
        <h3>How we use your data</h3>
        <ul>
          <li>To authenticate users and manage sessions.</li>
          <li>To publish and moderate listings.</li>
          <li>To send transactional email (verification, password reset).</li>
          <li>To comply with legal requests or protect the service.</li>
        </ul>
      </section>

      <section className="privacy-block">
        <h3>Storage & retention</h3>
        <ul>
          <li>Data is stored in our Postgres database hosted in the EU.</li>
          <li>Backups are retained for disaster recovery; removed accounts/listings may persist in backups for a limited time.</li>
        </ul>
      </section>

      <section className="privacy-block">
        <h3>Cookies</h3>
        <ul>
          <li>We use essential cookies only: a session cookie for login/authentication.</li>
          <li>No analytics, marketing, or tracking cookies are used.</li>
        </ul>
      </section>

      <section className="privacy-block">
        <h3>Sharing</h3>
        <ul>
          <li>We do not sell or share personal data with advertisers.</li>
          <li>Data may be shared with service providers strictly for running the service (email delivery, hosting).</li>
        </ul>
      </section>

      <section className="privacy-block">
        <h3>Your rights</h3>
        <ul>
          <li>Request access, correction, or deletion of your data.</li>
          <li>Withdraw consent for non-essential processing (we currently process only essentials).</li>
          <li>Contact support for any privacy questions.</li>
        </ul>
      </section>
    </main>
  );
}
