// screens-legal.jsx — Privacy Policy, Ethics / Code of Conduct, Cookie consent

// ===========================================================
//  PRIVACY POLICY
// ===========================================================
function PrivacyScreen({ setRoute }) {
  const { lang } = useLang();
  const isEl = lang === 'el';

  const Section = function({ title, children }) {
    return (
      <section style={{ marginBottom: 36 }}>
        <h2 style={{ fontFamily: 'var(--font-display)', fontSize: 20, fontWeight: 600,
          color: 'var(--psy-ink)', marginBottom: 12, paddingBottom: 8,
          borderBottom: '1px solid var(--psy-rule)' }}>{title}</h2>
        {children}
      </section>
    );
  };
  const P = function({ children }) {
    return <p style={{ fontSize: 14, lineHeight: 1.75, color: 'var(--psy-ink)', marginBottom: 10 }}>{children}</p>;
  };
  const Li = function({ children }) {
    return <li style={{ fontSize: 14, lineHeight: 1.7, color: 'var(--psy-ink)', marginBottom: 4 }}>{children}</li>;
  };

  return (
    <div className="page narrow" style={{ maxWidth: 760 }}>
      <button className="btn link" style={{ fontSize: 13, marginBottom: 24 }} onClick={() => setRoute('home')}>
        <Icon name="arrow_back" className="sm" /> {isEl ? 'Αρχική' : 'Home'}
      </button>

      <span className="eyebrow muted" style={{ letterSpacing: '0.12em' }}>
        {isEl ? 'ΝΟΜΙΚΑ' : 'LEGAL'}
      </span>
      <h1 className="display" style={{ fontSize: 36, marginTop: 10, marginBottom: 8 }}>
        {isEl ? 'Πολιτική Απορρήτου' : 'Privacy Policy'}
      </h1>
      <p style={{ color: 'var(--fg3)', fontSize: 13, marginBottom: 36 }}>
        {isEl ? 'Τελευταία ενημέρωση: Ιούνιος 2026' : 'Last updated: June 2026'}
      </p>

      <div className="card" style={{ padding: '28px 32px', marginBottom: 32, background: 'var(--psy-accent-soft)', borderColor: 'transparent' }}>
        <P>
          {isEl
            ? 'Το Psyche λαμβάνει σοβαρά το απόρρητό σας. Αυτή η πολιτική εξηγεί ποια δεδομένα συλλέγουμε, γιατί, πώς τα προστατεύουμε και ποια είναι τα δικαιώματά σας. Τα δεδομένα ψυχικής υγείας εμπίπτουν στην ειδική κατηγορία του άρθρου 9 GDPR — τα αντιμετωπίζουμε με την ανάλογη επιμέλεια.'
            : 'Psyche takes your privacy seriously. This policy explains what data we collect, why, how we protect it, and your rights. Mental health data falls under Article 9 GDPR special category data — we treat it with corresponding care.'}
        </P>
      </div>

      <Section title={isEl ? '1. Υπεύθυνος επεξεργασίας' : '1. Data Controller'}>
        <P>{isEl ? 'Υπεύθυνος επεξεργασίας δεδομένων είναι η πλατφόρμα Psyche (psyche.cy). Για ερωτήματα σχετικά με τα δεδομένα σας επικοινωνήστε: hello@psyche.cy' : 'The data controller is Psyche (psyche.cy). For data-related enquiries contact: hello@psyche.cy'}</P>
      </Section>

      <Section title={isEl ? '2. Τι δεδομένα συλλέγουμε' : '2. What data we collect'}>
        <P><strong>{isEl ? 'Λογαριασμός χρήστη:' : 'User account:'}</strong> {isEl ? 'Όνομα, διεύθυνση email, κωδικός (κρυπτογραφημένος), επαρχία, ημερομηνία εγγραφής.' : 'Name, email address, password (hashed), district, registration date.'}</P>
        <P><strong>{isEl ? 'Ημερολόγιο διάθεσης:' : 'Mood journal:'}</strong> {isEl ? 'Καταχωρήσεις διάθεσης και σημειώσεων που δημιουργείτε. Παραμένουν αποκλειστικά δικά σας εκτός αν επιλέξετε να τα μοιραστείτε με τον ψυχολόγο σας.' : 'Mood entries and notes you create. These remain yours alone unless you choose to share them with your psychologist.'}</P>
        <P><strong>{isEl ? 'Κρατήσεις:' : 'Bookings:'}</strong> {isEl ? 'Στοιχεία ραντεβού (ημερομηνία, ώρα, μορφή, ψυχολόγος). Αναγκαία για τη λειτουργία της υπηρεσίας.' : 'Appointment details (date, time, format, psychologist). Necessary for the service to function.'}</P>
        <P><strong>{isEl ? 'Κριτικές:' : 'Reviews:'}</strong> {isEl ? 'Αξιολογήσεις και κείμενο κριτικής. Τα ονόματα θαμπώνονται σε αρχικά πριν τη δημοσίευση.' : 'Ratings and review text. Names are blurred to initials before publication.'}</P>
        <P><strong>{isEl ? 'Ψυχολόγοι:' : 'Psychologists:'}</strong> {isEl ? 'Επαγγελματικά στοιχεία (όνομα, διαπιστευτήρια, αριθμός ΠΣΨΨ, βιογραφικό) και έγγραφα επαλήθευσης (αποθηκεύονται κρυπτογραφημένα, χρησιμοποιούνται μόνο για τον έλεγχο αδείας).' : 'Professional details (name, credentials, PSYP number, bio) and verification documents (stored encrypted, used only for licence verification).'}</P>
      </Section>

      <Section title={isEl ? '3. Νομική βάση επεξεργασίας' : '3. Legal basis for processing'}>
        <ul style={{ paddingLeft: 20, margin: 0 }}>
          <Li>{isEl ? 'Εκτέλεση σύμβασης (άρθρο 6(1)(β)): για κρατήσεις, αποστολή emails επιβεβαίωσης.' : 'Contract performance (Art. 6(1)(b)): for bookings, confirmation emails.'}</Li>
          <Li>{isEl ? 'Συγκατάθεση (άρθρο 6(1)(α) + άρθρο 9(2)(α)): για δεδομένα ψυχικής υγείας (ημερολόγιο, κοινοποίηση με ψυχολόγο). Μπορείτε να αποσύρετε τη συγκατάθεσή σας ανά πάσα στιγμή.' : 'Consent (Art. 6(1)(a) + Art. 9(2)(a)): for mental health data (journal, sharing with psychologist). You can withdraw consent at any time.'}</Li>
          <Li>{isEl ? 'Έννομο συμφέρον (άρθρο 6(1)(στ)): για τη βελτίωση της υπηρεσίας και την πρόληψη απάτης.' : 'Legitimate interest (Art. 6(1)(f)): for service improvement and fraud prevention.'}</Li>
        </ul>
      </Section>

      <Section title={isEl ? '4. Πώς χρησιμοποιούμε τα δεδομένα' : '4. How we use your data'}>
        <ul style={{ paddingLeft: 20, margin: 0 }}>
          <Li>{isEl ? 'Παροχή της υπηρεσίας: επεξεργασία κρατήσεων, επικοινωνία με ψυχολόγους.' : 'Service delivery: processing bookings, communication with psychologists.'}</Li>
          <Li>{isEl ? 'Επαλήθευση αδειών: έλεγχος αριθμού αδείας ΠΣΨΨ για τους ψυχολόγους που εγγράφονται.' : 'Licence verification: checking PSYP licence numbers for registering psychologists.'}</Li>
          <Li>{isEl ? 'Αποστολή email: επιβεβαίωση κράτησης, ειδοποιήσεις. Δεν αποστέλλουμε marketing χωρίς ρητή συγκατάθεση.' : 'Sending emails: booking confirmation, notifications. We do not send marketing without explicit consent.'}</Li>
        </ul>
      </Section>

      <Section title={isEl ? '5. Κοινοποίηση δεδομένων' : '5. Data sharing'}>
        <P>{isEl ? 'Δεν πουλάμε, δεν νοικιάζουμε και δεν εμπορευόμαστε τα δεδομένα σας. Τα δεδομένα κοινοποιούνται μόνο:' : 'We do not sell, rent, or trade your data. Data is shared only:'}</P>
        <ul style={{ paddingLeft: 20, margin: 0 }}>
          <Li>{isEl ? 'Με τον ψυχολόγο που κάνετε κράτηση (μόνο τα στοιχεία που αφορούν τη συνεδρία).' : 'With the psychologist you book with (only booking-relevant details).'}</Li>
          <Li>{isEl ? 'Με παρόχους υπηρεσιών email (Gmail SMTP) αποκλειστικά για αποστολή emails.' : 'With email service providers (Gmail SMTP) solely for sending emails.'}</Li>
          <Li>{isEl ? 'Όταν απαιτείται από το νόμο.' : 'When required by law.'}</Li>
        </ul>
      </Section>

      <Section title={isEl ? '6. Διατήρηση δεδομένων' : '6. Data retention'}>
        <P>{isEl ? 'Διατηρούμε τα δεδομένα σας για όσο διάστημα έχετε ενεργό λογαριασμό, συν 2 χρόνια για νομικούς σκοπούς. Αντίγραφα ασφαλείας διατηρούνται για 90 ημέρες. Μπορείτε να ζητήσετε διαγραφή ανά πάσα στιγμή.' : 'We retain your data for as long as your account is active, plus 2 years for legal purposes. Backups are retained for 90 days. You can request deletion at any time.'}</P>
      </Section>

      <Section title={isEl ? '7. Τα δικαιώματά σας (GDPR)' : '7. Your rights (GDPR)'}>
        <ul style={{ paddingLeft: 20, margin: 0 }}>
          <Li><strong>{isEl ? 'Πρόσβαση:' : 'Access:'}</strong> {isEl ? 'Δικαίωμα να λάβετε αντίγραφο των δεδομένων σας.' : 'Right to receive a copy of your data.'}</Li>
          <Li><strong>{isEl ? 'Διόρθωση:' : 'Rectification:'}</strong> {isEl ? 'Δικαίωμα διόρθωσης ανακριβών δεδομένων.' : 'Right to correct inaccurate data.'}</Li>
          <Li><strong>{isEl ? 'Διαγραφή:' : 'Erasure:'}</strong> {isEl ? 'Δικαίωμα να ζητήσετε τη διαγραφή των δεδομένων σας.' : 'Right to request deletion of your data.'}</Li>
          <Li><strong>{isEl ? 'Φορητότητα:' : 'Portability:'}</strong> {isEl ? 'Δικαίωμα λήψης των δεδομένων σας σε δομημένη μορφή.' : 'Right to receive your data in a structured format.'}</Li>
          <Li><strong>{isEl ? 'Εναντίωση:' : 'Objection:'}</strong> {isEl ? 'Δικαίωμα εναντίωσης στην επεξεργασία βάσει έννομου συμφέροντος.' : 'Right to object to processing based on legitimate interest.'}</Li>
        </ul>
        <P style={{ marginTop: 12 }}>{isEl ? 'Για άσκηση δικαιωμάτων: hello@psyche.cy. Απαντάμε εντός 30 ημερών.' : 'To exercise rights: hello@psyche.cy. We respond within 30 days.'}</P>
      </Section>

      <Section title={isEl ? '8. Ασφάλεια' : '8. Security'}>
        <P>{isEl ? 'Οι κωδικοί κρυπτογραφούνται (bcrypt). Οι επικοινωνίες χρησιμοποιούν HTTPS/TLS. Τα JWT tokens λήγουν μετά από 30 ημέρες. Τα έγγραφα επαλήθευσης αποθηκεύονται σε περιορισμένο φάκελο που δεν είναι προσβάσιμος δημόσια.' : 'Passwords are hashed (bcrypt). Communications use HTTPS/TLS. JWT tokens expire after 30 days. Verification documents are stored in a restricted, non-publicly accessible directory.'}</P>
      </Section>

      <div style={{ padding: '20px 24px', background: 'var(--psy-surface)', borderRadius: 14, marginTop: 8 }}>
        <p style={{ fontSize: 13, color: 'var(--fg2)', margin: 0 }}>
          {isEl
            ? 'Για οποιεσδήποτε ερωτήσεις σχετικά με αυτή την πολιτική: '
            : 'For any questions about this policy: '}
          <a href="mailto:hello@psyche.cy" style={{ color: 'var(--psy-accent)', fontWeight: 600 }}>hello@psyche.cy</a>
        </p>
      </div>
    </div>
  );
}

// ===========================================================
//  ETHICS / CODE OF CONDUCT
// ===========================================================
function EthicsScreen({ setRoute }) {
  const { lang } = useLang();
  const isEl = lang === 'el';

  const Section = function({ title, children }) {
    return (
      <section style={{ marginBottom: 36 }}>
        <h2 style={{ fontFamily: 'var(--font-display)', fontSize: 20, fontWeight: 600,
          color: 'var(--psy-ink)', marginBottom: 12, paddingBottom: 8,
          borderBottom: '1px solid var(--psy-rule)' }}>{title}</h2>
        {children}
      </section>
    );
  };
  const P = function({ children }) {
    return <p style={{ fontSize: 14, lineHeight: 1.75, color: 'var(--psy-ink)', marginBottom: 10 }}>{children}</p>;
  };

  return (
    <div className="page narrow" style={{ maxWidth: 760 }}>
      <button className="btn link" style={{ fontSize: 13, marginBottom: 24 }} onClick={() => setRoute('home')}>
        <Icon name="arrow_back" className="sm" /> {isEl ? 'Αρχική' : 'Home'}
      </button>

      <span className="eyebrow muted" style={{ letterSpacing: '0.12em' }}>
        {isEl ? 'ΔΕΟΝΤΟΛΟΓΙΑ' : 'ETHICS'}
      </span>
      <h1 className="display" style={{ fontSize: 36, marginTop: 10, marginBottom: 8 }}>
        {isEl ? 'Κώδικας Δεοντολογίας' : 'Code of Conduct'}
      </h1>
      <p style={{ color: 'var(--fg3)', fontSize: 13, marginBottom: 36 }}>
        {isEl ? 'Τι κάνει και τι δεν κάνει το Psyche' : 'What Psyche is and is not'}
      </p>

      <Section title={isEl ? 'Τι είναι το Psyche' : 'What Psyche is'}>
        <P>{isEl ? 'Το Psyche είναι κατάλογος αδειούχων ψυχολόγων στην Κύπρο. Παρέχει ένα δομημένο, επαληθευμένο χώρο όπου άνθρωποι που αναζητούν ψυχολογική υποστήριξη μπορούν να βρουν, να συγκρίνουν και να επικοινωνήσουν με πιστοποιημένους επαγγελματίες.' : 'Psyche is a directory of licensed psychologists in Cyprus. It provides a structured, verified space where people seeking psychological support can find, compare, and contact certified professionals.'}</P>
        <P>{isEl ? 'Κάθε ψυχολόγος που εμφανίζεται στην πλατφόρμα έχει επαληθευτεί έναντι του Παγκύπριου Συνδέσμου Ψυχολόγων (ΠΣΨΨ) πριν δημοσιευτεί το προφίλ του.' : 'Every psychologist listed on the platform has been verified against the Cyprus Psychologists Association (PSYP) before their profile is published.'}</P>
      </Section>

      <Section title={isEl ? 'Τι ΔΕΝ είναι το Psyche' : 'What Psyche is NOT'}>
        {[
          isEl
            ? ['Δεν είναι υπηρεσία κρίσεων.', 'Αν βρίσκεστε σε κρίση, καλέστε 1410 (Κυπριακή Γραμμή Ψυχικής Υγείας, 24/7) ή 112 αν η ζωή κινδυνεύει.']
            : ['Not a crisis service.', 'If you are in crisis, call 1410 (Cyprus Mental Health Helpline, 24/7) or 112 if life is at risk.'],
          isEl
            ? ['Δεν παρέχει κλινικές συμβουλές.', 'Το περιεχόμενο της πλατφόρμας (άρθρα, περιγραφές) είναι εκπαιδευτικό. Δεν αποτελεί ιατρική γνωμάτευση ή κλινική σύσταση.']
            : ['Not a provider of clinical advice.', 'Platform content (articles, descriptions) is educational. It does not constitute medical opinion or clinical recommendation.'],
          isEl
            ? ['Δεν εγγυάται αποτελέσματα θεραπείας.', 'Η αποτελεσματικότητα της θεραπείας εξαρτάται από πολλούς παράγοντες. Η καταχώρηση σε αυτή την πλατφόρμα δεν αποτελεί εγγύηση αποτελεσμάτων.']
            : ['Not a guarantor of therapy outcomes.', 'Therapy effectiveness depends on many factors. Listing on this platform is not a guarantee of outcomes.'],
        ].map(function([title, body], i) {
          return (
            <div key={i} style={{ display: 'flex', gap: 14, padding: '14px 0', borderTop: i > 0 ? '1px solid var(--psy-rule)' : '0' }}>
              <Icon name="block" style={{ color: '#DC2626', flexShrink: 0, marginTop: 2 }} />
              <div>
                <div style={{ fontWeight: 600, fontSize: 14, marginBottom: 4 }}>{title}</div>
                <div style={{ fontSize: 13.5, color: 'var(--fg2)', lineHeight: 1.55 }}>{body}</div>
              </div>
            </div>
          );
        })}
      </Section>

      <Section title={isEl ? 'Πώς λειτουργεί η επαλήθευση' : 'How verification works'}>
        {[
          [isEl ? 'Υποβολή αίτησης' : 'Application', isEl ? 'Ο ψυχολόγος εγγράφεται, υποβάλλει αριθμό άδειας ΠΣΨΨ και ανεβάζει έγγραφα (δίπλωμα + άδεια).' : 'The psychologist registers, submits their PSYP licence number, and uploads documents (diploma + licence).'],
          [isEl ? 'Έλεγχος' : 'Check', isEl ? 'Η ομάδα Psyche διασταυρώνει τον αριθμό ΠΣΨΨ με το επίσημο μητρώο. Οποιαδήποτε ασυμφωνία εμποδίζει τη δημοσίευση.' : 'The Psyche team cross-checks the PSYP number against the official registry. Any mismatch blocks publication.'],
          [isEl ? 'Επαλήθευση' : 'Verification', isEl ? 'Το προφίλ δημοσιεύεται με την ένδειξη "Επαληθευμένος" και την ημερομηνία ελέγχου. Η επαλήθευση επαναλαμβάνεται περιοδικά.' : 'The profile is published with a "Verified" badge and the check date. Verification is renewed periodically.'],
          [isEl ? 'Αναφορά' : 'Reporting', isEl ? 'Χρήστες μπορούν να αναφέρουν παράπονα. Η ομάδα εξετάζει εντός 5 εργάσιμων ημερών.' : 'Users can report concerns. The team reviews within 5 business days.'],
        ].map(function([step, desc], i) {
          return (
            <div key={i} style={{ display: 'flex', gap: 14, padding: '12px 0', borderTop: i > 0 ? '1px solid var(--psy-rule)' : '0' }}>
              <div style={{ width: 28, height: 28, borderRadius: '50%', background: 'var(--psy-accent-soft)', color: 'var(--psy-accent)', display: 'grid', placeItems: 'center', fontWeight: 700, fontSize: 13, flexShrink: 0 }}>{i + 1}</div>
              <div>
                <div style={{ fontWeight: 600, fontSize: 14, marginBottom: 2 }}>{step}</div>
                <div style={{ fontSize: 13.5, color: 'var(--fg2)', lineHeight: 1.55 }}>{desc}</div>
              </div>
            </div>
          );
        })}
      </Section>

      <Section title={isEl ? 'Διαδικασία παραπόνων' : 'Complaints procedure'}>
        <P>{isEl ? 'Αν έχετε παράπονο σχετικά με ψυχολόγο ή με τη λειτουργία της πλατφόρμας:' : 'If you have a complaint about a psychologist or the platform:'}</P>
        <ol style={{ paddingLeft: 20, margin: 0 }}>
          {(isEl ? [
            'Επικοινωνήστε μαζί μας στο hello@psyche.cy με τα στοιχεία της υπόθεσης.',
            'Η ομάδα επικοινωνεί μαζί σας εντός 5 εργάσιμων ημερών.',
            'Σοβαρά παράπονα σχετικά με επαγγελματική δεοντολογία παραπέμπονται στο ΠΣΨΨ.',
            'Διατηρούμε αρχείο όλων των αναφορών για λόγους διαφάνειας.',
          ] : [
            'Contact us at hello@psyche.cy with the details of your concern.',
            'The team will respond within 5 business days.',
            'Serious concerns about professional conduct are escalated to the PSYP.',
            'We maintain a record of all reports for transparency purposes.',
          ]).map(function(item, i) {
            return <li key={i} style={{ fontSize: 14, lineHeight: 1.7, color: 'var(--psy-ink)', marginBottom: 4 }}>{item}</li>;
          })}
        </ol>
      </Section>
    </div>
  );
}

// ===========================================================
//  COOKIE CONSENT BANNER
// ===========================================================
function CookieBanner({ onAccept, onDecline }) {
  const { lang } = useLang();
  const isEl = lang === 'el';

  return (
    <div style={{
      position: 'fixed', bottom: 0, left: 0, right: 0, zIndex: 100,
      background: 'var(--psy-ink)', color: 'white',
      padding: '16px 24px',
      display: 'flex', alignItems: 'center', gap: 16, flexWrap: 'wrap',
      boxShadow: '0 -4px 24px rgba(15,21,37,0.25)',
    }}>
      <Icon name="cookie" style={{ color: 'var(--psy-accent-soft)', flexShrink: 0 }} />
      <p style={{ flex: 1, fontSize: 13, lineHeight: 1.5, margin: 0, color: 'rgba(255,255,255,0.85)' }}>
        {isEl
          ? 'Χρησιμοποιούμε μόνο απαραίτητα cookies για τη λειτουργία της υπηρεσίας. Δεν χρησιμοποιούμε cookies παρακολούθησης ή διαφημιστικά cookies.'
          : 'We use only essential cookies required for the service to function. We do not use tracking or advertising cookies.'}
        {' '}
        <button onClick={() => window.dispatchEvent(new CustomEvent('openPrivacy'))}
          style={{ background: 'none', border: 0, color: 'var(--psy-accent-soft)', cursor: 'pointer',
            fontSize: 13, fontWeight: 600, padding: 0, textDecoration: 'underline' }}>
          {isEl ? 'Μάθετε περισσότερα' : 'Learn more'}
        </button>
      </p>
      <div style={{ display: 'flex', gap: 8, flexShrink: 0 }}>
        <button onClick={onDecline}
          style={{ background: 'transparent', border: '1px solid rgba(255,255,255,0.3)', borderRadius: 999,
            color: 'rgba(255,255,255,0.75)', cursor: 'pointer', fontSize: 12, fontWeight: 500,
            padding: '7px 16px', whiteSpace: 'nowrap' }}>
          {isEl ? 'Αποδοχή μόνο απαραίτητων' : 'Essential only'}
        </button>
        <button onClick={onAccept}
          style={{ background: 'white', border: 0, borderRadius: 999,
            color: 'var(--psy-ink)', cursor: 'pointer', fontSize: 12, fontWeight: 600,
            padding: '7px 20px', whiteSpace: 'nowrap' }}>
          {isEl ? 'Κατανοώ' : 'Got it'}
        </button>
      </div>
    </div>
  );
}

// ===========================================================
//  TERMS OF USE
// ===========================================================
function TermsScreen({ setRoute }) {
  const { lang } = useLang();
  const isEl = lang === 'el';

  const S = function({ title, children }) {
    return (
      <section style={{ marginBottom: 32 }}>
        <h2 style={{ fontFamily: 'var(--font-display)', fontSize: 19, fontWeight: 600, color: 'var(--psy-ink)', marginBottom: 10, paddingBottom: 8, borderBottom: '1px solid var(--psy-rule)' }}>{title}</h2>
        {children}
      </section>
    );
  };
  const P = function({ children }) { return <p style={{ fontSize: 14, lineHeight: 1.75, color: 'var(--psy-ink)', marginBottom: 10 }}>{children}</p>; };
  const Li = function({ children }) { return <li style={{ fontSize: 14, lineHeight: 1.7, marginBottom: 4 }}>{children}</li>; };

  return (
    <div className="page narrow" style={{ maxWidth: 760 }}>
      <button className="btn link" style={{ fontSize: 13, marginBottom: 24 }} onClick={() => setRoute('home')}>
        <Icon name="arrow_back" className="sm" /> {isEl ? 'Αρχική' : 'Home'}
      </button>
      <span className="eyebrow muted">{isEl ? 'ΝΟΜΙΚΑ' : 'LEGAL'}</span>
      <h1 className="display" style={{ fontSize: 36, marginTop: 10, marginBottom: 8 }}>{isEl ? 'Όροι Χρήσης' : 'Terms of Use'}</h1>
      <p style={{ color: 'var(--fg3)', fontSize: 13, marginBottom: 36 }}>{isEl ? 'Τελευταία ενημέρωση: Ιούνιος 2026' : 'Last updated: June 2026'}</p>

      <div className="card" style={{ padding: '20px 24px', marginBottom: 28, background: 'var(--psy-surface)', borderColor: 'transparent' }}>
        <P>{isEl ? 'Χρησιμοποιώντας το Psyche αποδέχεστε αυτούς τους όρους. Αν διαφωνείτε, μην χρησιμοποιήσετε την υπηρεσία. Το Psyche είναι κατάλογος — δεν είναι πάροχος υγειονομικής περίθαλψης.' : 'By using Psyche you accept these terms. If you disagree, do not use the service. Psyche is a directory — it is not a healthcare provider.'}</P>
      </div>

      <S title={isEl ? '1. Η υπηρεσία' : '1. The service'}>
        <P>{isEl ? 'Το Psyche παρέχει κατάλογο αδειούχων ψυχολόγων στην Κύπρο και εργαλεία για κράτηση ραντεβού. Δεν είμαστε συμβαλλόμενο μέρος στη σχέση ψυχολόγου-πελάτη. Η θεραπευτική σχέση δημιουργείται αποκλειστικά μεταξύ εσάς και του ψυχολόγου.' : 'Psyche provides a directory of licensed psychologists in Cyprus and appointment booking tools. We are not a party to the psychologist-client relationship. The therapeutic relationship is formed exclusively between you and the psychologist.'}</P>
        <P>{isEl ? 'Η χρήση της πλατφόρμας δεν αποτελεί έναρξη θεραπείας. Το Psyche δεν παρέχει κλινικές συμβουλές, διαγνώσεις ή συστάσεις θεραπείας.' : 'Using the platform does not constitute the commencement of therapy. Psyche does not provide clinical advice, diagnoses, or treatment recommendations.'}</P>
      </S>

      <S title={isEl ? '2. Λογαριασμοί χρηστών' : '2. User accounts'}>
        <ul style={{ paddingLeft: 20, margin: 0 }}>
          <Li>{isEl ? 'Πρέπει να είστε άνω των 18 ετών ή να έχετε γονική συγκατάθεση.' : 'You must be 18+ or have parental consent.'}</Li>
          <Li>{isEl ? 'Είστε υπεύθυνοι για την ασφάλεια του κωδικού σας.' : 'You are responsible for the security of your password.'}</Li>
          <Li>{isEl ? 'Δεν επιτρέπεται η δημιουργία λογαριασμού για παρενόχληση ή παραπλάνηση.' : 'Accounts may not be created for harassment or deception.'}</Li>
          <Li>{isEl ? 'Μπορούμε να αναστείλουμε ή να διαγράψουμε λογαριασμούς που παραβιάζουν τους όρους.' : 'We may suspend or delete accounts that violate these terms.'}</Li>
        </ul>
      </S>

      <S title={isEl ? '3. Ειδικοί όροι — Χρήστες (πελάτες)' : '3. Special terms — Users (clients)'}>
        <P>{isEl ? 'Κρατήσεις: Ένα αίτημα κράτησης δεν εγγυάται ραντεβού μέχρι ο ψυχολόγος να το επιβεβαιώσει. Ο ψυχολόγος έχει δικαίωμα απόρριψης αιτήματος.' : 'Bookings: A booking request does not guarantee an appointment until the psychologist confirms it. The psychologist has the right to decline a request.'}</P>
        <P>{isEl ? 'Κριτικές: Μόνο άτομα που έχουν πραγματοποιήσει συνεδρία μπορούν να υποβάλουν κριτική. Ψευδείς κριτικές αποτελούν παραβίαση των όρων και ενδέχεται να επιφέρουν νομικές συνέπειες.' : 'Reviews: Only individuals who have had a session may submit a review. False reviews are a terms violation and may have legal consequences.'}</P>
        <P>{isEl ? 'Ημερολόγιο: Τα δεδομένα ημερολογίου είναι ιδιωτικά. Αν επιλέξετε να τα μοιραστείτε με ψυχολόγο, αυτό είναι αποκλειστικά δική σας απόφαση.' : 'Journal: Journal data is private. If you choose to share it with a psychologist, that is exclusively your decision.'}</P>
      </S>

      <S title={isEl ? '4. Ειδικοί όροι — Ψυχολόγοι' : '4. Special terms — Psychologists'}>
        <P>{isEl ? 'Εγγραφή: Με την εγγραφή δηλώνετε ότι κατέχετε έγκυρη άδεια άσκησης επαγγέλματος εγγεγραμμένη στον ΠΣΨΨ. Οποιαδήποτε ανακρίβεια στα στοιχεία εγγραφής συνεπάγεται άμεση αφαίρεση από τον κατάλογο.' : 'Registration: By registering you declare that you hold a valid practice licence registered with the PSYP. Any inaccuracy in registration details results in immediate removal from the directory.'}</P>
        <P>{isEl ? 'Δεοντολογία: Υποχρεούστε να τηρείτε τον Κώδικα Δεοντολογίας του ΠΣΨΨ και την κείμενη νομοθεσία για την προστασία δεδομένων (GDPR). Ευαίσθητα δεδομένα πελατών δεν επιτρέπεται να χρησιμοποιηθούν για σκοπούς εκτός της θεραπευτικής σχέσης.' : 'Ethics: You are obliged to comply with the PSYP Code of Ethics and applicable data protection legislation (GDPR). Sensitive client data may not be used for purposes outside the therapeutic relationship.'}</P>
        <P>{isEl ? 'Κριτικές: Δεν επιτρέπεται η διαγραφή ή αμφισβήτηση κριτικών εκτός από ψευδείς καταχωρήσεις ατόμων που δεν ήταν ποτέ πελάτες σας.' : 'Reviews: You may not delete or contest reviews except for false entries from individuals who were never your clients.'}</P>
        <P>{isEl ? 'Αμοιβή: Το Psyche είναι δωρεάν κατά τη φάση εκκίνησης. Μελλοντικές αλλαγές τιμολόγησης θα κοινοποιούνται με 60 ημέρες προηγούμενη ειδοποίηση.' : 'Fees: Psyche is free during the launch phase. Future pricing changes will be communicated with 60 days advance notice.'}</P>
      </S>

      <S title={isEl ? '5. Περιορισμός ευθύνης' : '5. Limitation of liability'}>
        <P>{isEl ? 'Το Psyche δεν φέρει ευθύνη για: (α) αποτελέσματα θεραπείας, (β) συμβουλές ή γνωματεύσεις ψυχολόγων, (γ) διακοπή υπηρεσίας λόγω τεχνικών προβλημάτων, (δ) ζημίες που προκύπτουν από μη εξουσιοδοτημένη πρόσβαση στον λογαριασμό σας.' : 'Psyche is not liable for: (a) therapy outcomes, (b) advice or opinions of psychologists, (c) service interruptions due to technical issues, (d) damages arising from unauthorised access to your account.'}</P>
      </S>

      <S title={isEl ? '6. Εφαρμοστέο δίκαιο' : '6. Governing law'}>
        <P>{isEl ? 'Οι παρόντες όροι διέπονται από το δίκαιο της Κυπριακής Δημοκρατίας. Αρμόδια δικαστήρια είναι τα Δικαστήρια της Λευκωσίας.' : 'These terms are governed by the law of the Republic of Cyprus. The courts of Nicosia have jurisdiction.'}</P>
      </S>

      <div style={{ padding: '16px 20px', background: 'var(--psy-surface)', borderRadius: 12, fontSize: 13, color: 'var(--fg2)' }}>
        {isEl ? 'Ερωτήσεις: ' : 'Questions: '}<a href="mailto:hello@psyche.cy" style={{ color: 'var(--psy-accent)', fontWeight: 600 }}>hello@psyche.cy</a>
      </div>
    </div>
  );
}

// ===========================================================
//  HELP CENTER
// ===========================================================
function HelpScreen({ setRoute }) {
  const { lang } = useLang();
  const isEl = lang === 'el';
  const [open, setOpen] = React.useState(null);

  const faqs = isEl ? [
    {
      cat: 'Για χρήστες',
      items: [
        ['Πώς κλείνω ραντεβού;', 'Βρείτε ψυχολόγο μέσω του καταλόγου, ανοίξτε το προφίλ του και επιλέξτε ημέρα και ώρα. Στείλτε αίτημα κράτησης. Ο ψυχολόγος θα σας απαντήσει εντός 1–3 ημερών. Δεν πληρώνετε τίποτα μέχρι να επιβεβαιωθεί η συνεδρία.'],
        ['Τι είναι η δωρεάν εισαγωγική κλήση;', 'Πολλοί ψυχολόγοι προσφέρουν δωρεάν τηλεφωνική κλήση 15 λεπτών πριν την πρώτη επί πληρωμή συνεδρία. Σκοπός είναι να δείτε αν υπάρχει χημεία χωρίς καμία δέσμευση.'],
        ['Μπορώ να ακυρώσω ένα ραντεβού;', 'Επικοινωνήστε απευθείας με τον ψυχολόγο το συντομότερο δυνατό. Η πλατφόρμα συνιστά 24ωρη ειδοποίηση για ακύρωση.'],
        ['Πώς λειτουργεί το ΓεΣΥ;', 'Χρησιμοποιήστε το φίλτρο "Αποδέχεται ΓεΣΥ" στον κατάλογο. Χρειάζεστε παραπομπή από τον Προσωπικό σας Ιατρό. Δείτε το άρθρο μας για πλήρη οδηγό ΓεΣΥ.'],
        ['Τα δεδομένα μου είναι ασφαλή;', 'Ναι. Χρησιμοποιούμε κρυπτογράφηση, δεν πουλάμε δεδομένα, και συμμορφωνόμαστε με τον GDPR. Δείτε την Πολιτική Απορρήτου για λεπτομέρειες.'],
        ['Πώς διαγράφω τον λογαριασμό μου;', 'Επικοινωνήστε στο hello@psyche.cy με θέμα "Διαγραφή λογαριασμού". Θα διαγράψουμε όλα τα δεδομένα σας εντός 30 ημερών (νόμος GDPR - δικαίωμα διαγραφής).'],
        ['Τι γίνεται αν έχω παράπονο για ψυχολόγο;', 'Επικοινωνήστε στο hello@psyche.cy. Σοβαρά παράπονα παραπέμπονται στον ΠΣΨΨ. Δείτε τον Κώδικα Δεοντολογίας για τη διαδικασία.'],
      ],
    },
    {
      cat: 'Για ψυχολόγους',
      items: [
        ['Πώς εγγράφομαι ως ψυχολόγος;', 'Κάντε κλικ στο "Εγγραφή" και επιλέξτε "Είμαι αδειούχος ψυχολόγος". Συμπληρώστε τα στοιχεία σας, εισάγετε τον αριθμό ΠΣΨΨ και ανεβάστε τα έγγραφά σας. Η επαλήθευση γίνεται εντός 24 ωρών.'],
        ['Πόσο κοστίζει;', 'Η πλατφόρμα είναι εντελώς δωρεάν τόσο για εγγραφή όσο και για χρήση κατά τη φάση εκκίνησης. Μελλοντικές αλλαγές θα ανακοινωθούν με 60 ημέρες προειδοποίηση.'],
        ['Ποιες πληροφορίες εμφανίζονται στο προφίλ μου;', 'Εμφανίζονται: όνομα, διαπιστευτήρια, αριθμός ΠΣΨΨ, επαρχία, θεραπευτικές προσεγγίσεις, ειδικεύσεις, γλώσσες, τιμή, διαθεσιμότητα και κριτικές. Δεν εμφανίζεται το email σας.'],
        ['Πώς λαμβάνω αιτήματα κράτησης;', 'Τα αιτήματα εμφανίζονται στο Ταμπλό σας και λαμβάνετε email ειδοποίηση. Αποδέχεστε ή απορρίπτετε με ένα κλικ.'],
        ['Μπορώ να αφαιρέσω κριτική;', 'Όχι — αυτό είναι σκόπιμο. Μόνο η ομάδα Psyche μπορεί να αφαιρέσει κριτικές που είναι ψευδείς ή παραβιάζουν τους όρους. Επικοινωνήστε μαζί μας αν πιστεύετε ότι μια κριτική είναι αναληθής.'],
        ['Πώς ενημερώνω το προφίλ μου;', 'Από το Ταμπλό σας, κάντε κλικ στο "Επεξεργασία δημόσιου προφίλ". Αλλαγές γίνονται αμέσως ορατές.'],
      ],
    },
    {
      cat: 'Ασφάλεια & Απόρρητο',
      items: [
        ['Πώς είναι η πλατφόρμα GDPR-συμβατή;', 'Τα δεδομένα αποθηκεύονται σε servers εντός ΕΕ, κρυπτογραφούνται κατά τη μεταφορά (HTTPS) και σε ηρεμία. Δεν χρησιμοποιούμε διαφημιστικά cookies ή trackers. Τα δεδομένα ψυχικής υγείας (άρθρο 9 GDPR) τυγχάνουν πρόσθετης προστασίας.'],
        ['Ποια cookies χρησιμοποιείτε;', 'Μόνο απαραίτητα cookies για τη λειτουργία της υπηρεσίας (authentication token, γλώσσα). Δεν χρησιμοποιούμε Google Analytics, Facebook Pixel ή άλλα tracking cookies.'],
        ['Μπορώ να ζητήσω τα δεδομένα μου;', 'Ναι. Αποστείλατε email στο hello@psyche.cy με θέμα "Εξαγωγή δεδομένων". Θα λάβετε αντίγραφο όλων των δεδομένων σας εντός 30 ημερών (δικαίωμα GDPR).'],
      ],
    },
  ] : [
    {
      cat: 'For users',
      items: [
        ['How do I book an appointment?', 'Find a psychologist in the directory, open their profile, and pick a day and time. Send a booking request. The psychologist will respond within 1–3 days. You pay nothing until the session is confirmed.'],
        ['What is the free intro call?', 'Many psychologists offer a free 15-minute phone call before a paid session. The purpose is to see if there is a good fit — with no commitment required.'],
        ['Can I cancel an appointment?', 'Contact the psychologist directly as soon as possible. The platform recommends 24h notice for cancellations.'],
        ['How does GeSY work?', 'Use the "Accepts GeSY" filter in the directory. You need a referral from your Personal Doctor (GP). See our full GeSY guide in the Learn section.'],
        ['Is my data safe?', 'Yes. We use encryption, do not sell data, and comply with GDPR. See the Privacy Policy for details.'],
        ['How do I delete my account?', 'Email hello@psyche.cy with subject "Account deletion". We will delete all your data within 30 days (GDPR right to erasure).'],
        ['What if I have a complaint about a psychologist?', 'Contact hello@psyche.cy. Serious complaints are escalated to the PSYP. See the Code of Conduct for the procedure.'],
      ],
    },
    {
      cat: 'For psychologists',
      items: [
        ['How do I register as a psychologist?', 'Click "Sign up" and select "I am a licensed psychologist". Complete your details, enter your PSYP number, and upload your documents. Verification is done within 24 hours.'],
        ['What does it cost?', 'The platform is completely free — for both registration and use — during the launch phase. Future changes will be announced with 60 days notice.'],
        ['What information appears on my profile?', 'Displayed: name, credentials, PSYP number, district, therapeutic approaches, specialisations, languages, price, availability, and reviews. Your email is not displayed.'],
        ['How do I receive booking requests?', 'Requests appear in your Dashboard and you receive an email notification. Accept or decline with one click.'],
        ['Can I remove a review?', 'No — this is intentional. Only the Psyche team can remove reviews that are false or violate the terms. Contact us if you believe a review is untrue.'],
        ['How do I update my profile?', 'From your Dashboard, click "Edit public profile". Changes are immediately visible.'],
      ],
    },
    {
      cat: 'Security & Privacy',
      items: [
        ['How is the platform GDPR compliant?', 'Data is stored on EU-based servers, encrypted in transit (HTTPS) and at rest. We do not use advertising cookies or trackers. Mental health data (GDPR Article 9) receives additional protection.'],
        ['What cookies do you use?', 'Only essential cookies required for the service (authentication token, language preference). We do not use Google Analytics, Facebook Pixel, or other tracking cookies.'],
        ['Can I request my data?', 'Yes. Email hello@psyche.cy with subject "Data export". You will receive a copy of all your data within 30 days (GDPR right of access).'],
      ],
    },
  ];

  return (
    <div className="page narrow" style={{ maxWidth: 760 }}>
      <button className="btn link" style={{ fontSize: 13, marginBottom: 24 }} onClick={() => setRoute('home')}>
        <Icon name="arrow_back" className="sm" /> {isEl ? 'Αρχική' : 'Home'}
      </button>
      <span className="eyebrow muted">{isEl ? 'ΒΟΗΘΕΙΑ' : 'SUPPORT'}</span>
      <h1 className="display" style={{ fontSize: 36, marginTop: 10, marginBottom: 8 }}>{isEl ? 'Κέντρο Βοήθειας' : 'Help Center'}</h1>
      <p style={{ color: 'var(--fg2)', fontSize: 15, marginBottom: 32, lineHeight: 1.55 }}>
        {isEl ? 'Συχνές ερωτήσεις για χρήστες και ψυχολόγους.' : 'Frequently asked questions for users and psychologists.'}
      </p>

      <div style={{ marginBottom: 16, padding: '14px 18px', background: 'var(--psy-surface)', borderRadius: 12, display: 'flex', alignItems: 'center', gap: 10 }}>
        <Icon name="mail" style={{ color: 'var(--psy-accent)' }} />
        <span style={{ fontSize: 14, color: 'var(--fg2)' }}>
          {isEl ? 'Δεν βρήκατε απάντηση; ' : "Can't find an answer? "}
          <a href="mailto:hello@psyche.cy" style={{ color: 'var(--psy-accent)', fontWeight: 600, textDecoration: 'none' }}>hello@psyche.cy</a>
        </span>
      </div>

      {faqs.map(function(group, gi) {
        return (
          <div key={gi} style={{ marginBottom: 32 }}>
            <h2 style={{ fontFamily: 'var(--font-display)', fontSize: 18, fontWeight: 600, marginBottom: 12, color: 'var(--psy-ink)' }}>{group.cat}</h2>
            <div className="card" style={{ padding: 0 }}>
              {group.items.map(function([q, a], i) {
                const key = gi + '-' + i;
                const isOpen = open === key;
                return (
                  <div key={i} style={{ borderTop: i > 0 ? '1px solid var(--psy-rule)' : 'none' }}>
                    <button
                      onClick={function() { setOpen(isOpen ? null : key); }}
                      style={{ width: '100%', display: 'flex', alignItems: 'center', justifyContent: 'space-between',
                        padding: '16px 20px', background: 'none', border: 0, cursor: 'pointer',
                        textAlign: 'left', gap: 12 }}>
                      <span style={{ fontSize: 14, fontWeight: 600, color: 'var(--psy-ink)' }}>{q}</span>
                      <Icon name={isOpen ? 'expand_less' : 'expand_more'} className="sm" style={{ flexShrink: 0, color: 'var(--fg3)' }} />
                    </button>
                    {isOpen && (
                      <div style={{ padding: '0 20px 16px', fontSize: 14, lineHeight: 1.65, color: 'var(--fg2)' }}>
                        {a}
                      </div>
                    )}
                  </div>
                );
              })}
            </div>
          </div>
        );
      })}
    </div>
  );
}

Object.assign(window, { PrivacyScreen, EthicsScreen, TermsScreen, HelpScreen: HelpScreen, CookieBanner });
