/* global React */

/* Legal pages — Privacy, Terms, Accessibility.
   One component, switched by the `doc` prop. Shared layout + styles
   (see .dh-legal* rules in the page <style>). DRAFT — for lawyer review. */

const LAST_UPDATED = "July 15, 2026";

function LegalShell({ eyebrow, title, lead, children, draft = true }) {
  return (
    <section className="dh-legal">
      <div className="dh-legal-inner">
        <header className="dh-legal-head">
          <span className="dh-eyebrow">{eyebrow}</span>
          <h1 className="dh-legal-title">{title}</h1>
          <p className="dh-legal-lead">{lead}</p>
          <p className="dh-legal-updated">Last updated {LAST_UPDATED}</p>
        </header>
        <div className="dh-legal-body">
          {children}
        </div>
        {draft && (
          <div className="dh-legal-draftnote">
            <strong>Draft for review.</strong> This document is a starting template and has not yet been
            reviewed by a Florida attorney. Have legal counsel review before launch.
          </div>
        )}
      </div>
    </section>
  );
}

function H({ children }) { return <h2 className="dh-legal-h2">{children}</h2>; }
function P({ children }) { return <p className="dh-legal-p">{children}</p>; }
function UL({ children }) { return <ul className="dh-legal-ul">{children}</ul>; }

/* ============================================================ PRIVACY */
function PrivacyPolicy() {
  return (
    <LegalShell
      eyebrow="Legal"
      title="Privacy Policy"
      draft={false}
      lead="How Dimi's Greek House collects, uses, and protects your personal information."
    >
      <P>
        Dimi's Greek House ("we," "us," "our"), operated by Dimi's Hospitality LLC, respects your privacy.
        This policy explains what we collect when you visit our website, sign up for our newsletter,
        make a reservation, place an order, purchase a gift card, or contact us, and how we use it.
      </P>

      <H>Information we collect</H>
      <P>We collect the following when you choose to provide it:</P>
      <UL>
        <li><strong>Contact details</strong> — your name, email address, and phone number.</li>
        <li><strong>Birthday</strong> — month and day only, if you provide it when subscribing, so we can send you a birthday offer.</li>
        <li><strong>Reservation &amp; event details</strong> — party size, dates, seating preferences, and any notes you share when booking or inquiring about private events or catering.</li>
        <li><strong>Order information</strong> — items ordered and pickup details, processed through our ordering partners.</li>
        <li><strong>Gift card information</strong> — recipient details and purchase amount.</li>
        <li><strong>Usage data</strong> — basic, non-identifying information about how you use our website (pages visited, device type), collected through analytics tools.</li>
      </UL>

      <H>How we use your information</H>
      <UL>
        <li>To send you our newsletter and promotional offers, if you've subscribed.</li>
        <li>To send you a birthday offer, if you've shared your birthday.</li>
        <li>To process and fulfill reservations, orders, gift cards, and event inquiries.</li>
        <li>To respond to your questions and requests.</li>
        <li>To improve our website and understand what our guests find useful.</li>
      </UL>

      <H>Who we share it with</H>
      <P>
        We <strong>do not sell</strong> your personal information. We share it only with the service
        providers that help us run the restaurant, and only as needed to provide their service:
      </P>
      <UL>
        <li><strong>Mailchimp</strong> — email newsletter delivery.</li>
        <li><strong>OpenTable</strong> — reservations.</li>
        <li><strong>Toast</strong> — online ordering and gift cards.</li>
        <li><strong>Uber Eats</strong> — third-party delivery, if you order through them.</li>
        <li><strong>Google &amp; Meta (Instagram)</strong> — website analytics and social features.</li>
      </UL>
      <P>
        Each of these partners has its own privacy policy governing how it handles your information.
        We may also disclose information if required by law.
      </P>

      <H>Cookies &amp; tracking</H>
      <P>
        Our website may use cookies and similar technologies to remember your preferences and to
        understand how the site is used. You can disable cookies in your browser settings, though some
        features may not work as intended.
      </P>

      <H>Your choices &amp; rights</H>
      <UL>
        <li><strong>Unsubscribe</strong> anytime using the link at the bottom of any newsletter email.</li>
        <li><strong>Request a copy</strong> of the personal information we hold about you.</li>
        <li><strong>Request deletion</strong> of your personal information, subject to any legal record-keeping obligations.</li>
      </UL>
      <P>To exercise any of these, email us at <a href="mailto:info@dimisgreekhouse.com">info@dimisgreekhouse.com</a>.</P>

      <H>Children's privacy</H>
      <P>
        Our website is not directed to children under 13, and we do not knowingly collect personal
        information from them.
      </P>

      <H>Text messages &amp; calls</H>
      <P>
        If you give us your phone number, we may contact you by call or text about reservations, orders, or
        (with your consent) promotions, consistent with the Telephone Consumer Protection Act. Message and
        data rates may apply. Reply STOP to any text to opt out, or reach us using the contact info below.
      </P>

      <H>Florida residents &amp; data security</H>
      <P>
        Dimi's Hospitality LLC is a small, single-location business, so the Florida Digital Bill of Rights
        (which applies only to companies with over $1 billion in annual global revenue) does not currently
        apply to us — but we still follow its spirit of transparency above.
      </P>
      <P>
        We are, however, subject to the Florida Information Protection Act (Fla. Stat. § 501.171), Florida's
        data security and breach notification law. In line with that law, we take reasonable measures to
        protect personal information and to securely dispose of records that are no longer needed. If we
        ever experience a breach of security involving your personal information, we will notify affected
        individuals without unreasonable delay and no later than 30 days after discovering the breach, and
        will notify the Florida Department of Legal Affairs if the breach affects 500 or more Florida
        residents, as required by law.
      </P>

      <H>Changes to this policy</H>
      <P>
        We may update this policy from time to time. The "last updated" date above reflects the most
        recent version.
      </P>

      <H>Contact us</H>
      <P>
        Questions about this policy? Email <a href="mailto:info@dimisgreekhouse.com">info@dimisgreekhouse.com</a> or
        call <a href="tel:+15615103381">(561) 510-3381</a>. Dimi's Greek House, 157 US-1, Tequesta, FL 33469.
      </P>
    </LegalShell>
  );
}

/* ============================================================ TERMS */
function TermsOfService() {
  return (
    <LegalShell
      eyebrow="Legal"
      title="Terms of Service"
      lead="The terms for using the Dimi's Greek House website and services."
    >
      <P>
        By using the Dimi's Greek House website (the "Site"), operated by Dimi's Hospitality LLC, you
        agree to these terms. If you don't agree, please don't use the Site.
      </P>

      <H>Using our site</H>
      <P>
        You may use the Site for personal, non-commercial purposes — browsing our menu, making
        reservations, placing orders, purchasing gift cards, and contacting us. You agree not to misuse
        the Site, interfere with its operation, or use it for any unlawful purpose.
      </P>

      <H>Reservations &amp; orders</H>
      <P>
        Reservations are handled through OpenTable and orders through Toast, each subject to their own
        terms. We reserve the right to refuse service, cancel a reservation, or correct pricing or
        menu errors. Menu items, prices, and availability may change without notice.
      </P>

      <H>Gift cards</H>
      <UL>
        <li>Digital gift cards are redeemable for food and beverage at Dimi's Greek House.</li>
        <li>Gift cards do not expire and are not redeemable for cash except where required by law.</li>
        <li>Lost or stolen gift cards cannot be replaced without proof of purchase.</li>
        <li>Gift cards are processed through our payment partner and subject to their terms.</li>
      </UL>

      <H>Newsletter &amp; promotions</H>
      <P>
        Promotional offers — including any welcome offer for newsletter subscribers — are limited to
        one per person unless stated otherwise, are not transferable, have no cash value, are
        dine-in only where noted, and may be modified or discontinued at any time.
      </P>

      <H>Intellectual property</H>
      <P>
        All content on the Site — including our name, logo, photography, menu descriptions, and design —
        is the property of Dimi's Hospitality LLC and may not be copied or used without our permission.
      </P>

      <H>Disclaimers &amp; limitation of liability</H>
      <P>
        The Site is provided "as is." We make no warranties about its accuracy or availability. To the
        fullest extent permitted by law, Dimi's Hospitality LLC is not liable for any damages arising
        from your use of the Site. Nothing here limits liability that cannot be limited under
        Florida law.
      </P>

      <H>Allergens &amp; food safety</H>
      <P>
        Menu descriptions are provided for general information. Our kitchen handles common allergens and
        cross-contact is possible. If you have a food allergy, please tell your server. Consuming raw or
        undercooked meats, poultry, seafood, shellfish, or eggs may increase your risk of foodborne illness.
      </P>

      <H>Governing law</H>
      <P>
        These terms are governed by the laws of the State of Florida. Any disputes will be handled in
        the courts of Palm Beach County, Florida.
      </P>

      <H>Contact</H>
      <P>
        Questions? Email <a href="mailto:info@dimisgreekhouse.com">info@dimisgreekhouse.com</a> or call{" "}
        <a href="tel:+15615103381">(561) 510-3381</a>.
      </P>
    </LegalShell>
  );
}

/* ============================================================ ACCESSIBILITY */
function AccessibilityStatement() {
  return (
    <LegalShell
      eyebrow="Legal"
      title="Accessibility"
      lead="Our commitment to making Dimi's Greek House welcoming to everyone — online and in person."
    >
      <P>
        At Dimi's Greek House, <em>filoxenia</em> — the love of strangers — is our only house rule. That
        extends to everyone, including guests with disabilities. We're committed to making both our
        website and our restaurant accessible and welcoming.
      </P>

      <H>Our website</H>
      <P>
        We aim to meet the Web Content Accessibility Guidelines (WCAG) 2.1 Level AA. We work toward:
      </P>
      <UL>
        <li>Clear, readable text with strong color contrast.</li>
        <li>Descriptive text for images.</li>
        <li>Keyboard navigation for interactive elements.</li>
        <li>Compatibility with screen readers and assistive technology.</li>
      </UL>
      <P>
        Accessibility is ongoing work, and some areas of the site may not yet be perfect. We're
        continually improving.
      </P>

      <H>Our restaurant</H>
      <UL>
        <li>Accessible parking and a step-free entrance at Tequesta Shoppes Plaza.</li>
        <li>Accessible restrooms.</li>
        <li>Seating arrangements to accommodate wheelchairs and mobility aids — let us know when you book.</li>
        <li>Staff happy to read menu items aloud or describe dishes.</li>
        <li>Service animals always welcome.</li>
      </UL>

      <H>Need something?</H>
      <P>
        If you have an accessibility need for your visit, or if you encounter a barrier on our website,
        please tell us — we want to help. Email <a href="mailto:info@dimisgreekhouse.com">info@dimisgreekhouse.com</a> or
        call <a href="tel:+15615103381">(561) 510-3381</a> and we'll do everything we can to accommodate you.
      </P>
    </LegalShell>
  );
}

window.PrivacyPolicy = PrivacyPolicy;
window.TermsOfService = TermsOfService;
window.AccessibilityStatement = AccessibilityStatement;
