"use client";

import { useLanguage } from "@/contexts/LanguageContext";

const content = {
  en: {
    title: "Privacy Policy & Data Protection",
    lastUpdated: "Last updated: July 19, 2026",
    sections: [
      {
        title: "1. Scope and roles",
        content:
          "This policy explains how SkyLight Chat and Halla handle personal data when businesses use our messaging, automation, and voice services. Depending on the activity, SkyLight Chat may act as a service provider or processor for a customer, while that customer remains responsible for deciding why and how its end-user data is processed. Separate contract or data-processing terms may also apply.",
      },
      {
        title: "2. Data we may process",
        content:
          "We may process business account and contact details, workspace settings, billing records, support requests, conversation content, channel identifiers, files submitted to a knowledge base, and technical logs needed to operate and secure the service. If a customer enables Halla, the service may also process call metadata, recordings, and transcripts according to that customer's configuration and instructions.",
      },
      {
        title: "3. Why data is processed",
        content:
          "We process data to provide contracted services, connect approved communication channels, deliver messages and calls, operate AI-assisted workflows, maintain security, troubleshoot incidents, provide customer support, manage billing, and meet applicable legal obligations. Customers are responsible for obtaining any consent or other legal basis required for their campaigns, recordings, uploads, and end-user communications.",
      },
      {
        title: "4. Service providers, transfers, and residency",
        content:
          "SkyLight Chat may use contracted hosting, communications, analytics, payment, and AI service providers where needed to deliver selected features. Hosting region and data-residency options can depend on the customer's plan, configuration, connected channels, and third-party providers. Customers with a specific residency or cross-border-transfer requirement should confirm the available configuration in their order form or data-processing agreement before sending regulated data.",
      },
      {
        title: "5. AI, messaging, and call recordings",
        content:
          "Customers control the information and instructions they submit to automated workflows. AI output can be incomplete or incorrect and should be reviewed before use in sensitive decisions. Customers using call recording, outbound messaging, or marketing features must provide required notices, honor opt-outs, and follow applicable law and the policies of connected providers such as Meta and telecom operators.",
      },
      {
        title: "6. Security",
        content:
          "We use administrative and technical safeguards intended to protect customer data, including access controls, encryption in transit, logging, backups, and separation of customer workspaces where supported by the service architecture. No internet service can guarantee absolute security. Customers should use strong authentication, limit user permissions, review access, and promptly report suspected incidents.",
      },
      {
        title: "7. Retention and deletion",
        content:
          "Retention depends on the type of data, customer configuration, contract terms, security needs, backup cycles, and legal record-keeping requirements. Customers can request account or data deletion through support. Some information may remain for a limited period in backups or where retention is required to resolve disputes, prevent abuse, or comply with law.",
      },
      {
        title: "8. Privacy rights",
        content:
          "Subject to applicable law, individuals may request access, correction, deletion, or restriction of personal data, or object to certain processing. Because SkyLight Chat often processes end-user data on behalf of a business customer, we may direct a request to that customer for verification and response. We will support verified requests as required by the applicable agreement and law.",
      },
      {
        title: "9. Updates and contact",
        content:
          "We may update this policy when our services, providers, or legal obligations change. Material changes will be communicated through an appropriate channel. For privacy questions or verified rights requests, email privacy@skylightchat.com or submit a support ticket from the customer dashboard.",
      },
    ],
  },
  ar: {
    title: "سياسة الخصوصية وحماية البيانات",
    lastUpdated: "آخر تحديث: 19 يوليو 2026",
    sections: [
      {
        title: "١. نطاق السياسة والأدوار",
        content:
          "توضح هذه السياسة كيفية تعامل سكاي لايت شات وهلا مع البيانات الشخصية عند استخدام الشركات لخدمات المراسلة والأتمتة والمكالمات. بحسب النشاط، قد تعمل سكاي لايت شات كمقدم خدمة أو معالج بيانات نيابة عن العميل، بينما يبقى العميل مسؤولاً عن تحديد أسباب وطرق معالجة بيانات مستخدميه النهائيين. وقد تطبق أيضاً شروط تعاقدية أو اتفاقية معالجة بيانات منفصلة.",
      },
      {
        title: "٢. البيانات التي قد نعالجها",
        content:
          "قد نعالج بيانات حساب المنشأة وجهات الاتصال، إعدادات مساحة العمل، سجلات الفوترة، طلبات الدعم، محتوى المحادثات، معرفات القنوات، الملفات المضافة إلى قاعدة المعرفة، والسجلات التقنية اللازمة لتشغيل الخدمة وحمايتها. وإذا فعّل العميل هلا، فقد تعالج الخدمة بيانات المكالمات وتسجيلاتها ونصوصها وفق إعدادات العميل وتعليماته.",
      },
      {
        title: "٣. أغراض المعالجة",
        content:
          "نعالج البيانات لتقديم الخدمات المتعاقد عليها، وربط قنوات التواصل المعتمدة، وإرسال الرسائل وإجراء المكالمات، وتشغيل التدفقات المدعومة بالذكاء الاصطناعي، وحماية النظام، ومعالجة الأعطال، وتقديم الدعم، وإدارة الفوترة، والوفاء بالالتزامات النظامية المطبقة. ويتحمل العميل مسؤولية الحصول على الموافقة أو المسوغ النظامي المطلوب لحملاته وتسجيلاته وملفاته وتواصله مع المستخدمين النهائيين.",
      },
      {
        title: "٤. مزودو الخدمة والنقل وموقع الاستضافة",
        content:
          "قد تستخدم سكاي لايت شات مزودي استضافة واتصالات وتحليلات ودفع وخدمات ذكاء اصطناعي متعاقدين عند الحاجة لتقديم المزايا المختارة. وقد تعتمد منطقة الاستضافة وخيارات توطين البيانات على باقة العميل وإعداداته والقنوات المتصلة ومزودي الطرف الثالث. على العملاء ذوي المتطلبات المحددة للإقامة أو النقل عبر الحدود تأكيد الإعداد المتاح في نموذج الطلب أو اتفاقية معالجة البيانات قبل إرسال بيانات منظمة.",
      },
      {
        title: "٥. الذكاء الاصطناعي والمراسلة وتسجيل المكالمات",
        content:
          "يتحكم العميل في المعلومات والتعليمات التي يرسلها إلى التدفقات المؤتمتة. وقد تكون مخرجات الذكاء الاصطناعي غير مكتملة أو غير دقيقة، ويجب مراجعتها قبل استخدامها في القرارات الحساسة. ويلتزم العملاء الذين يستخدمون تسجيل المكالمات أو الرسائل الصادرة أو التسويق بتقديم الإشعارات المطلوبة واحترام إلغاء الاشتراك واتباع الأنظمة المطبقة وسياسات المزودين المتصلين مثل ميتا ومشغلي الاتصالات.",
      },
      {
        title: "٦. الأمان",
        content:
          "نستخدم ضوابط إدارية وتقنية تهدف إلى حماية بيانات العملاء، ومنها التحكم في الوصول، والتشفير أثناء النقل، والسجلات، والنسخ الاحتياطية، وفصل مساحات عمل العملاء حيث تدعم بنية الخدمة ذلك. لا يمكن لأي خدمة عبر الإنترنت ضمان الأمان المطلق. وينبغي للعملاء استخدام مصادقة قوية، وتقييد الصلاحيات، ومراجعة الوصول، والإبلاغ سريعاً عن أي حادث مشتبه به.",
      },
      {
        title: "٧. الاحتفاظ والحذف",
        content:
          "تعتمد مدة الاحتفاظ على نوع البيانات وإعدادات العميل وشروط العقد واحتياجات الأمان ودورات النسخ الاحتياطي ومتطلبات حفظ السجلات النظامية. يمكن للعملاء طلب حذف الحساب أو البيانات عبر الدعم. وقد تبقى بعض المعلومات لفترة محدودة في النسخ الاحتياطية أو عندما يلزم الاحتفاظ بها لحل نزاع أو منع إساءة الاستخدام أو الامتثال للنظام.",
      },
      {
        title: "٨. حقوق الخصوصية",
        content:
          "وفقاً للنظام المطبق، قد يطلب الفرد الوصول إلى بياناته الشخصية أو تصحيحها أو حذفها أو تقييد معالجتها، أو الاعتراض على بعض أوجه المعالجة. ولأن سكاي لايت شات تعالج غالباً بيانات المستخدم النهائي نيابة عن عميل تجاري، فقد نحيل الطلب إلى ذلك العميل للتحقق والرد. وسندعم الطلبات الموثقة وفق الاتفاقية والنظام المطبقين.",
      },
      {
        title: "٩. التحديثات والتواصل",
        content:
          "قد نحدّث هذه السياسة عند تغير خدماتنا أو مزودينا أو التزاماتنا النظامية، وسنبلغ عن التغييرات الجوهرية عبر قناة مناسبة. للاستفسارات المتعلقة بالخصوصية أو طلبات الحقوق الموثقة، راسل privacy@skylightchat.com أو افتح تذكرة دعم من لوحة العميل.",
      },
    ],
  },
} as const;

export default function PrivacyArea() {
  const { language } = useLanguage();
  const page = content[language];

  return (
    <section className="privacy-section">
      <div className="privacy-container">
        <header className="privacy-header">
          <h1>{page.title}</h1>
          <p>{page.lastUpdated}</p>
        </header>
        <div className="privacy-content">
          {page.sections.map((section) => (
            <section key={section.title}>
              <h2>{section.title}</h2>
              <p>{section.content}</p>
            </section>
          ))}
        </div>
      </div>

      <style jsx>{`
        .privacy-section {
          min-height: 100vh;
          padding: 170px 0 100px;
          color: #fff;
          background:
            radial-gradient(ellipse 80% 50% at 50% 0%, rgba(102, 16, 242, 0.15), transparent 50%),
            #000;
        }
        .privacy-container {
          position: relative;
          z-index: 1;
          max-width: 1000px;
          margin: 0 auto;
          padding: 0 24px;
        }
        .privacy-header {
          margin-bottom: 60px;
          text-align: center;
        }
        .privacy-header h1 {
          margin-bottom: 20px;
          font-size: clamp(32px, 4vw, 48px);
          font-weight: 800;
          background: linear-gradient(135deg, #fff 30%, #a78bfa);
          background-clip: text;
          -webkit-background-clip: text;
          -webkit-text-fill-color: transparent;
        }
        .privacy-header p {
          display: inline-block;
          padding: 6px 16px;
          color: #94a3b8;
          font-size: 14px;
          background: rgba(255, 255, 255, 0.04);
          border: 1px solid rgba(255, 255, 255, 0.06);
          border-radius: 30px;
        }
        .privacy-content {
          display: flex;
          flex-direction: column;
          gap: 32px;
          padding: 48px;
          background: rgba(255, 255, 255, 0.02);
          border: 1px solid rgba(255, 255, 255, 0.05);
          border-radius: 24px;
        }
        .privacy-content section {
          padding-bottom: 32px;
          border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        }
        .privacy-content section:last-child {
          padding-bottom: 0;
          border-bottom: 0;
        }
        h2 {
          margin-bottom: 14px;
          color: #a78bfa;
          font-size: 22px;
        }
        .privacy-content p {
          margin: 0;
          color: #cbd5e1;
          font-size: 15.5px;
          line-height: 1.85;
        }
        @media (max-width: 768px) {
          .privacy-section {
            padding: 140px 0 60px;
          }
          .privacy-content {
            padding: 24px;
          }
          h2 {
            font-size: 18px;
          }
          .privacy-content p {
            font-size: 14px;
          }
        }
      `}</style>
    </section>
  );
}
