import { createFileRoute } from "@tanstack/react-router";
import { MarketingLayout } from "@/components/marketing/MarketingLayout";

export const Route = createFileRoute("/terms")({
  head: () => ({
    meta: [
      { title: "Terms of Service — eBay BOS" },
      { name: "description", content: "The terms governing your use of eBay BOS." },
      { property: "og:title", content: "Terms of Service — eBay BOS" },
      { property: "og:description", content: "The terms governing your use of eBay BOS." },
    ],
  }),
  component: Terms,
});

function Terms() {
  return (
    <MarketingLayout>
      <article className="prose prose-neutral mx-auto max-w-3xl px-6 py-16 dark:prose-invert">
        <h1>Terms of Service</h1>
        <p className="text-sm text-muted-foreground">
          Last updated: {new Date().toLocaleDateString()}
        </p>
        <p>
          These Terms of Service ("Terms") govern your access to and use of the eBay BOS application
          and website (the "Service"). By creating an account or using the Service you agree to
          these Terms.
        </p>
        <h2>1. Accounts</h2>
        <p>
          You must provide accurate information when creating an account and keep your credentials
          secure. You are responsible for all activity under your account.
        </p>
        <h2>2. Acceptable use</h2>
        <p>
          You agree not to misuse the Service — including attempting to disrupt it, circumvent
          security, reverse engineer it, or use it to violate any law or the rights of others.
        </p>
        <h2>3. eBay integration</h2>
        <p>
          eBay BOS integrates with eBay via eBay's public APIs and OAuth. We are not affiliated
          with, endorsed by, or sponsored by eBay Inc. Your use of eBay APIs is also governed by
          eBay's terms.
        </p>
        <h2>4. Subscriptions and billing</h2>
        <p>
          Paid plans are billed in advance on the interval you select and may be cancelled at any
          time. Fees already paid are non-refundable except where required by law.
        </p>
        <h2>5. Availability</h2>
        <p>
          We work to provide a reliable Service, but we do not guarantee uninterrupted availability.
          The Service is provided "as is" without warranties of any kind.
        </p>
        <h2>6. Limitation of liability</h2>
        <p>
          To the fullest extent permitted by law, eBay BOS will not be liable for indirect,
          incidental, or consequential damages, or for lost profits or lost data.
        </p>
        <h2>7. Termination</h2>
        <p>
          We may suspend or terminate accounts that violate these Terms. You may delete your
          account at any time from your settings.
        </p>
        <h2>8. Changes</h2>
        <p>
          We may update these Terms. Material changes will be communicated in-app or by email.
          Continued use of the Service after updates constitutes acceptance.
        </p>
        <h2>9. Contact</h2>
        <p>
          Questions about these Terms? Reach us at support@ebaybos.app.
        </p>
      </article>
    </MarketingLayout>
  );
}
