// site/page-ticketholder-agreement.jsx, Legal: Ticketholder Agreement Waiver
// and Release. Intentionally NOT linked from the main site nav or footer,
// the Fairs.com platform links here directly via /ticketholder-agreement
// (path-based) or #ticketholder-agreement (hash-based) so deep links resolve
// from either form.

const TH_SECTIONS = [
  {
    id: 1,
    title: 'TICKET OBLIGATIONS',
    items: [
      ['1.1.', 'All sales are final. No refunds.'],
      ['1.2.', 'The purchase of Tickets grants you the revocable license to attend the event described on the Ticket or its confirmation (the "Event"). No other relationship between the Parties, either expressed or implied, is created by your purchase of the Tickets.'],
      ['1.3.', 'If, for any reason whatsoever, you do not receive a confirmation, or if you receive an error message or encounter a service interruption while you are completing the purchase of Ticket(s), it is your entire responsibility to contact our Customer Service Department at support@fairs.com to confirm whether your order has been properly processed. You are solely responsible for any problem that may occur during the purchase of Ticket(s). In such case, Fairs.com shall not be responsible for any loss (monetary or otherwise) that may result from any problem occurring during the purchase of Ticket(s) through their website, including, without limitation, the failure of a transaction to be completed or confirmed, whether through the actions of Fairs.com and / or its related entities, or a third party.'],
    ],
  },
  {
    id: 2,
    title: 'PAYMENT OBLIGATION',
    items: [
      ['2.1.', 'By accepting the terms of this Agreement, you agree to pay the full price of the Ticket(s) ordered, including any applicable taxes and delivery, convenience, and other fees, as described on the Order Confirmation.'],
    ],
  },
  {
    id: 3,
    title: 'COPYRIGHT',
    items: [
      ['3.1.', 'All Intellectual Property rights in all materials produced or distributed by Fairs.com in connection with this event are expressly reserved and any unauthorized duplication, publication or distribution is prohibited.'],
    ],
  },
  {
    id: 4,
    title: 'LIMITATION OF LIABILITY',
    items: [
      ['4.1.', 'By accepting the terms of the Agreement, you assume all risk, liability and responsibility for any and all damages of any nature suffered by you, including, without limitation, bodily harm and loss of property incurred during or in connection with the event. Furthermore, you hereby waive any and all rights to claim damages, monetary or otherwise, or to institute civil, criminal, administrative or legal proceedings against Fairs.com, its affiliates and other related entities or their directors, officers, administrators, employees, representatives and all other persons acting on behalf of Fairs.com, resulting from any cause whatsoever arising either before, during or after the event. In certain cases, applicable laws may not allow the limitation of liability set forth above, so this limitation of liability may not apply in such particular cases. If any part of this limitation of liability is found to be invalid or unenforceable for any reason, then Fairs.com\'s aggregate liability (and that of its affiliates and other related entities or their directors, officers, administrators, employees, representatives and all other persons acting on behalf of Fairs.com) under such circumstances for liabilities that otherwise would have been limited shall not exceed ten US dollars (USD$10).'],
    ],
  },
  {
    id: 5,
    title: 'INDEMNIFICATION',
    items: [
      ['5.1.', 'You hereby agree to indemnify and hold harmless Fairs.com, its affiliates and other related entities, their directors, officers, administrators, managers, employees, representatives and all other persons acting on behalf of Fairs.com from and against any and all claims, actions, damages or other demands, including, but not limited to, reasonable costs and expenses of litigation such as counsel fees, arising from or relating to your purchase of Ticket(s) (including, without limitation, relating to your presence at the event and to any of your act or omission before, during or after the event).'],
    ],
  },
  {
    id: 6,
    title: 'APPLICABLE LAWS',
    items: [
      ['6.1.', 'This Agreement shall be governed by and construed in accordance with the internal laws of the State of Ohio without giving effect to any choice or conflict of law provision or rule that would cause the application of laws of any other jurisdiction. Any legal suit, action, or proceeding arising out of or related to this Agreement shall be instituted exclusively in the federal courts of the United States or the courts of the State of Ohio, and each Party irrevocably submits to the exclusive jurisdiction of such courts in any such suit, action, or proceeding and waives any objection based on improper venue or forum non conveniens. Where a Court of competent jurisdiction declares a portion of the Agreement invalid or unenforceable, the remainder of the Agreement shall remain in force. The headings in the Agreement are provided for clarity only and do not form an integral part of the Agreement. Where you have read the Agreement in English, the Parties agree that the Agreement shall be drawn up in the English language.'],
    ],
  },
  {
    id: 7,
    title: 'PROCESSING OF YOUR DATA',
    items: [
      ['7.1.', <>The processing of your personal data is governed by the Fairs.com Privacy Policy found at <a href="https://www.fairs.com/privacy" target="_blank" rel="noopener noreferrer" style={{ color: S.redText || S.red, textDecoration: 'underline' }}>https://www.fairs.com/privacy</a>. We are not liable for any damages if you use our services and upload the data contrary to these Terms.</>],
    ],
  },
  {
    id: 8,
    title: 'TEXT MESSAGE (SMS) PROGRAMS',
    items: [
      ['8.1.', 'This section governs text messages sent in connection with your ticket purchase and the events for which you have purchased tickets. By providing your mobile telephone number during purchase, you agree to the terms set forth below.'],
      ['', 'Fairs.com and the fair, event, or venue from which you purchased tickets (the "Fair") operate two separate text message programs: transactional messages and marketing messages.'],
      ['', 'Transactional messages are sent by Fairs.com regarding your ticket order and the event you purchased tickets for, including order confirmations, schedule changes, weather-related event updates, gate and entry information, parking information, and other operational notifications relating to your purchase or your attendance. By providing your mobile telephone number during ticket purchase, you agree that Fairs.com may send you automated transactional text messages at that number relating to your order and the event. You may opt out at any time by replying STOP after receiving a message (note that opting out may prevent you from receiving important updates about your event, including cancellations or schedule changes).'],
      ['', 'Marketing messages are sent by the Fair and may include promotional content such as ticket sales, fair announcements, vendor promotions, sponsor content, and event marketing. Marketing messages are sent only to recipients who separately opt in by affirmatively checking a marketing-consent box at the time of ticket purchase or through another designated consent point. Consent to receive marketing messages is not a condition of purchasing tickets. You may opt out at any time by replying STOP to any marketing message.'],
      ['', 'You can cancel either SMS program at any time by replying STOP to a message from that program. After you send the SMS message "STOP" to us, we will send you an SMS message to confirm that you have been unsubscribed. After this, you will no longer receive SMS messages from that program. Opting out of one program (transactional or marketing) does not automatically opt you out of the other. If you want to join the marketing program again, just sign up as you did the first time and we will start sending SMS messages to you again.'],
      ['', 'If you are experiencing issues with either messaging program, you can reply with the keyword HELP for more assistance, or you can get help directly at support@fairs.com.'],
      ['', 'Carriers are not liable for delayed or undelivered messages.'],
      ['', 'As always, message and data rates may apply for any messages sent to you from us and to us from you. Transactional message frequency varies based on the event and any operational developments. Marketing message frequency varies by Fair and typically increases in the weeks leading up to an event. If you have any questions about your text plan or data plan, it is best to contact your wireless provider.'],
      ['', 'The SMS programs are compatible with all major US wireless carriers, including AT&T, T-Mobile, Verizon, US Cellular, Boost, Cricket, MetroPCS, and others. You must be 18 years or older, or have the consent of a parent or legal guardian, to enroll in or receive messages through any of these SMS programs. Fairs.com and the Fair may modify or discontinue these SMS programs at any time. Material changes will be communicated in advance where required by law.'],
      ['', <>If you have any questions regarding privacy, please read our privacy policy at <a href="https://www.fairs.com/privacy" target="_blank" rel="noopener noreferrer" style={{ color: S.redText || S.red, textDecoration: 'underline' }}>https://www.fairs.com/privacy</a>. Mobile telephone numbers and consent information are not sold or shared with third parties or affiliates for their own marketing or promotional purposes.</>],
    ],
  },
  {
    id: 9,
    title: 'ACKNOWLEDGEMENT',
    items: [
      ['9.1.', 'This Agreement constitutes the entire agreement of the Company and me with respect to the subject matter contained herein and supersedes all prior and contemporaneous understandings, agreements, representations and warranties, both written and oral, with respect to such subject matter. This Agreement is binding on and shall ensure to the benefit of me and my heirs and next-of-kin, and the Company and its successors and assigns.'],
    ],
  },
];

function PageTicketholderAgreement({ onNav }) {
  const accentRed = (typeof S !== 'undefined' && S.redText) || S.red;
  return (
    <div>
      {/* Hero, simple and conservative for a legal page */}
      <section style={{ background: S.cream2, padding: '96px 64px 56px', position: 'relative' }}>
        <div className="has-grain light" style={{ position: 'absolute', inset: 0 }} />
        <div style={{ position: 'relative', maxWidth: 820, margin: '0 auto' }}>
          <div style={{
            fontFamily: 'var(--font-mono)', fontSize: 12, fontWeight: 700,
            color: accentRed, letterSpacing: '0.2em', textTransform: 'uppercase',
          }}>★ Legal ★</div>
          <h1 style={{
            fontFamily: 'var(--font-display)', fontWeight: 500, fontSize: 56,
            lineHeight: 1.05, letterSpacing: '-0.03em', color: S.ink,
            margin: '14px 0 18px',
          }}>
            Ticketholder Agreement <em style={{ fontStyle: 'italic', color: S.red }}>Waiver and Release</em>
          </h1>
          <div style={{
            fontFamily: 'var(--font-mono)', fontSize: 12, color: S.mute,
            letterSpacing: '0.08em', textTransform: 'uppercase',
          }}>
            Last updated, May 18, 2026
          </div>
        </div>
      </section>

      {/* Intro caps block, verbatim */}
      <section style={{ background: S.cream, padding: '56px 64px 24px' }}>
        <div style={{ maxWidth: 820, margin: '0 auto' }}>
          <div style={{
            background: S.cream2, border: `1.5px solid ${S.ink}`, borderRadius: 12,
            padding: '24px 28px', boxShadow: `4px 4px 0 0 ${S.ink}`,
          }}>
            <p style={{
              fontFamily: 'var(--font-display)', fontSize: 16, lineHeight: 1.6,
              color: S.ink, margin: 0, letterSpacing: '0.01em',
            }}>
              THE FOLLOWING TERMS AND CONDITIONS APPLY TO ALL TICKET HOLDERS (A "HOLDER" AS USED IN THIS AGREEMENT) USING A TICKET, PRINTED AND/OR DIGITAL, TO GAIN ADMITTANCE TO A FAIRS.COM, INC. ("FAIRS.COM" AS USED IN THIS AGREEMENT) EVENT. AN "EVENT" MEANS A TICKET MADE AVAILABLE THROUGH FAIRS.COM'S SERVICES. "FAIRS.COM'S SERVICES" ARE DEFINED AS FAIRS.COM'S ONLINE TICKETING SOFTWARE PLATFORM AND RELATED SERVICES ON FAIRS.COM'S MOBILE APPLICATION AND WEBSITE, AS WELL AS OTHER RELATED PRODUCTS AND SERVICES. ANYONE PURCHASING A TICKET IS CONSIDERED TO HAVE AGREED TO THIS AGREEMENT IN ORDER TO ENTER THE EVENT. ENTRY INTO THE BOUNDARIES OF THE EVENT SHALL BE CONSIDERED ACCEPTANCE.
            </p>
          </div>
        </div>
      </section>

      {/* Numbered sections */}
      <section style={{ background: S.cream, padding: '32px 64px 64px' }}>
        <div style={{ maxWidth: 820, margin: '0 auto' }}>
          {TH_SECTIONS.map((sec) => (
            <div key={sec.id} style={{ marginTop: 48 }}>
              <div style={{ display: 'flex', alignItems: 'baseline', gap: 16, marginBottom: 18, paddingBottom: 10, borderBottom: `1.5px solid ${S.ink}` }}>
                <span style={{
                  fontFamily: 'var(--font-display)', fontWeight: 500, fontSize: 36,
                  color: accentRed, letterSpacing: '-0.02em', lineHeight: 1,
                }}>{sec.id}.</span>
                <h2 style={{
                  fontFamily: 'var(--font-display)', fontWeight: 600, fontSize: 22,
                  letterSpacing: '0.04em', color: S.ink, margin: 0, textTransform: 'uppercase',
                }}>{sec.title}</h2>
              </div>
              <div style={{ display: 'flex', flexDirection: 'column', gap: 14 }}>
                {sec.items.map(([n, body], i) => (
                  <p key={i} style={{
                    fontFamily: 'var(--font-display)', fontSize: 16, lineHeight: 1.65,
                    color: S.ink, margin: 0,
                  }}>
                    {n && (
                      <span style={{
                        fontFamily: 'var(--font-mono)', fontSize: 12,
                        color: accentRed, fontWeight: 700, marginRight: 10,
                        letterSpacing: '0.06em',
                      }}>{n}</span>
                    )}
                    {body}
                  </p>
                ))}
              </div>
            </div>
          ))}

          {/* Verbatim all-caps acknowledgement paragraph */}
          <div style={{ marginTop: 40, padding: 24, background: S.cream2, border: `1.5px solid ${S.ink}`, borderRadius: 12 }}>
            <p style={{
              fontFamily: 'var(--font-display)', fontWeight: 600, fontSize: 16,
              lineHeight: 1.6, color: S.ink, margin: 0, letterSpacing: '0.01em',
            }}>
              I ACKNOWLEDGE THAT I HAVE READ AND UNDERSTOOD ALL OF THE TERMS OF THIS AGREEMENT AND THAT I AM VOLUNTARILY WAIVING SUBSTANTIAL LEGAL RIGHTS (ON MY BEHALF AND ON BEHALF OF MY HEIRS, EXECUTORS, ADMINISTRATORS AND NEXT-OF-KIN), INCLUDING THE RIGHT TO SUE THE COMPANY AND THE RELEASEES.
            </p>
          </div>
        </div>
      </section>

      {/* Contact block */}
      <section style={{ background: S.cream2, padding: '64px 64px 96px', position: 'relative' }}>
        <div className="has-grain" style={{ position: 'absolute', inset: 0 }} />
        <div style={{ position: 'relative', maxWidth: 820, margin: '0 auto' }}>
          <div style={{
            fontFamily: 'var(--font-mono)', fontSize: 12, fontWeight: 700,
            color: accentRed, letterSpacing: '0.2em', textTransform: 'uppercase', marginBottom: 16,
          }}>★ Contact ★</div>
          <div style={{ display: 'grid', gridTemplateColumns: '1fr 1fr', gap: 32 }} className="th-contact-row">
            <div>
              <div style={{ fontFamily: 'var(--font-mono)', fontSize: 12, color: S.mute, letterSpacing: '0.1em', textTransform: 'uppercase', marginBottom: 8 }}>
                Email
              </div>
              <a href="mailto:support@fairs.com" style={{
                fontFamily: 'var(--font-display)', fontWeight: 600, fontSize: 22,
                color: accentRed, textDecoration: 'none',
              }}>
                support@fairs.com
              </a>
            </div>
            <div>
              <div style={{ fontFamily: 'var(--font-mono)', fontSize: 12, color: S.mute, letterSpacing: '0.1em', textTransform: 'uppercase', marginBottom: 8 }}>
                Address
              </div>
              <div style={{ fontFamily: 'var(--font-display)', fontSize: 16, color: S.ink, lineHeight: 1.5 }}>
                Fairs.com, Inc.<br />
                3737 Easton Market #1043<br />
                Columbus, OH 43219
              </div>
            </div>
          </div>
        </div>
      </section>
    </div>
  );
}

Object.assign(window, { PageTicketholderAgreement });
