import type { Metadata } from "next"
import Link from "next/link"
import { Clock, Calendar, ArrowLeft } from "lucide-react"
import { Button } from "@/components/ui/button"

export const metadata: Metadata = {
  title: "Refund Policy | Teertham",
  description:
    "Learn about Teertham's refund policy. Understand refund eligibility, processing timelines, and how refunds are issued for cancelled bookings across all our services.",
  openGraph: {
    title: "Refund Policy | Teertham",
    description:
      "Learn about Teertham's refund policy. Understand refund eligibility, processing timelines, and how refunds are issued for cancelled bookings across all our services.",
    type: "website",
  },
  twitter: {
    card: "summary_large_image",
    title: "Refund Policy | Teertham",
    description:
      "Learn about Teertham's refund policy. Understand refund eligibility, processing timelines, and how refunds are issued for cancelled bookings across all our services.",
  },
}

export default function RefundPolicyPage() {
  const readTime = "6 min read"
  const lastUpdated = "December 15, 2024"

  return (
    <main className="min-h-screen bg-gradient-to-br from-background via-background to-muted/20">
      <div className="mx-auto max-w-4xl px-4 py-12 md:py-16 lg:py-20">
        {/* Back Button */}
        <Link href="/">
          <Button variant="ghost" size="sm" className="mb-8 -ml-2">
            <ArrowLeft className="mr-2 h-4 w-4" />
            Back to Home
          </Button>
        </Link>

        <div className="bg-card rounded-2xl shadow-xl border border-border/50 overflow-hidden">
          {/* Header */}
          <header className="px-6 md:px-10 pt-10 pb-8 bg-gradient-to-br from-primary/5 via-primary/10 to-primary/5">
            <h1 className="text-4xl md:text-5xl lg:text-6xl font-bold tracking-tight text-balance mb-6">
              Refund Policy
            </h1>

            <div className="flex flex-wrap items-center gap-4 text-sm text-muted-foreground">
              <div className="flex items-center gap-1.5">
                <Clock className="h-4 w-4" aria-hidden="true" />
                <span>{readTime}</span>
              </div>
              <div className="flex items-center gap-1.5">
                <Calendar className="h-4 w-4" aria-hidden="true" />
                <span>Last updated: {lastUpdated}</span>
              </div>
            </div>
          </header>

          {/* Content */}
          <article className="px-6 md:px-10 py-10 prose prose-slate dark:prose-invert prose-headings:font-bold prose-headings:tracking-tight prose-h2:text-3xl prose-h2:mt-12 prose-h2:mb-6 prose-h3:text-xl prose-h3:mt-8 prose-h3:mb-4 prose-p:text-foreground/80 prose-p:leading-relaxed prose-li:text-foreground/80 prose-strong:text-foreground max-w-none">
            <section>
              <p className="text-lg leading-relaxed">
                This Refund Policy explains how Teertham processes refunds for cancelled or modified bookings. Refund
                eligibility and amounts are determined by our{" "}
                <Link href="/cancellation-policy" className="text-primary hover:underline">
                  Cancellation Policy
                </Link>{" "}
                and individual service provider terms.
              </p>
            </section>

            <section>
              <h2>1. Refund Eligibility</h2>

              <h3>1.1 Eligible Refunds</h3>
              <p>You may be eligible for a refund in the following situations:</p>
              <ul>
                <li>You cancel your booking in accordance with our Cancellation Policy</li>
                <li>A service provider cancels or significantly changes your booking</li>
                <li>Services are not provided as described at the time of booking</li>
                <li>You experience service failures or issues beyond your control</li>
                <li>Payment errors or duplicate charges occur</li>
              </ul>

              <h3>1.2 Non-Refundable Charges</h3>
              <p>The following charges are non-refundable:</p>
              <ul>
                <li>Platform convenience fees and service charges</li>
                <li>Payment gateway processing fees</li>
                <li>Non-refundable booking components (as specified at booking)</li>
                <li>Cancellation fees as per our Cancellation Policy</li>
                <li>No-show charges</li>
              </ul>
            </section>

            <section>
              <h2>2. Refund Calculation</h2>

              <h3>2.1 How Refunds Are Calculated</h3>
              <p>Your refund amount is calculated as follows:</p>
              <ul>
                <li>
                  <strong>Total Booking Amount</strong> - Paid amount for the service
                </li>
                <li>
                  <strong>Minus Cancellation Fee</strong> - As per the applicable cancellation policy
                </li>
                <li>
                  <strong>Minus Non-Refundable Charges</strong> - Convenience fees, processing fees, etc.
                </li>
                <li>
                  <strong>Equals Refund Amount</strong> - Amount credited to your original payment method
                </li>
              </ul>

              <h3>2.2 Example Calculation</h3>
              <p>
                <strong>Scenario:</strong> Vehicle booking worth ₹5,000, cancelled 30 hours before pickup
              </p>
              <ul>
                <li>Total booking amount: ₹5,000</li>
                <li>Cancellation fee (25%): ₹1,250</li>
                <li>Convenience fee (non-refundable): ₹100</li>
                <li>
                  <strong>Refund amount: ₹3,650</strong>
                </li>
              </ul>
            </section>

            <section>
              <h2>3. Refund Processing Timeline</h2>

              <h3>3.1 Initiation</h3>
              <p>
                Once your cancellation is confirmed, we will initiate the refund process within 2-3 business days. You
                will receive an email notification confirming refund initiation with the refund amount and expected
                timeline.
              </p>

              <h3>3.2 Processing Time by Payment Method</h3>
              <p>Refund timelines vary based on your original payment method:</p>
              <ul>
                <li>
                  <strong>Credit Card:</strong> 5-7 business days from initiation
                </li>
                <li>
                  <strong>Debit Card:</strong> 7-10 business days from initiation
                </li>
                <li>
                  <strong>UPI/Net Banking:</strong> 5-7 business days from initiation
                </li>
                <li>
                  <strong>Digital Wallets:</strong> 3-5 business days from initiation
                </li>
                <li>
                  <strong>Bank Transfer:</strong> 7-14 business days from initiation
                </li>
              </ul>

              <h3>3.3 Delays</h3>
              <p>
                In some cases, refunds may take longer due to bank processing times, holidays, or technical issues. If
                you do not receive your refund within the expected timeline, please contact our support team with your
                booking reference number.
              </p>
            </section>

            <section>
              <h2>4. Refund Methods</h2>

              <h3>4.1 Original Payment Method</h3>
              <p>
                Refunds are typically processed to your original payment method. This ensures security and compliance
                with financial regulations.
              </p>

              <h3>4.2 Alternative Refund Methods</h3>
              <p>
                In exceptional circumstances where refund to the original payment method is not possible (e.g., expired
                card, closed account), we may offer alternative refund options such as:
              </p>
              <ul>
                <li>Bank transfer to a nominated account</li>
                <li>Teertham travel credits for future bookings</li>
                <li>Digital wallet transfer</li>
              </ul>
              <p>You will need to provide valid identification and account verification for alternative methods.</p>
            </section>

            <section>
              <h2>5. Partial Refunds</h2>

              <h3>5.1 When Partial Refunds Apply</h3>
              <p>Partial refunds are issued in the following situations:</p>
              <ul>
                <li>Cancellation within a timeframe that incurs cancellation fees</li>
                <li>Partial service delivery (e.g., only some days of a multi-day booking are cancelled)</li>
                <li>Service quality issues that do not warrant a full refund</li>
                <li>Late cancellation or no-show with provider discretion</li>
              </ul>

              <h3>5.2 Dispute Resolution</h3>
              <p>
                If you disagree with a partial refund amount, you may raise a dispute with our customer support team. We
                will review your case and work with the service provider to reach a fair resolution.
              </p>
            </section>

            <section>
              <h2>6. Service Provider Cancellations</h2>

              <h3>6.1 Full Refund Policy</h3>
              <p>
                If a service provider cancels your booking or fails to deliver the service as confirmed, you are
                entitled to a full refund including all fees (convenience fees, service charges, etc.).
              </p>

              <h3>6.2 Compensation</h3>
              <p>
                In cases of service provider cancellation or significant disruption, we may offer additional
                compensation such as:
              </p>
              <ul>
                <li>Travel credits for future bookings</li>
                <li>Discount vouchers</li>
                <li>Priority rebooking assistance</li>
                <li>Complimentary upgrades on future services</li>
              </ul>
            </section>

            <section>
              <h2>7. Failed Transactions and Double Charges</h2>

              <h3>7.1 Failed Transaction Refunds</h3>
              <p>
                If your payment is deducted but the booking fails to confirm, the amount will be automatically refunded
                within 7-10 business days. If you do not receive the refund, contact our support team immediately.
              </p>

              <h3>7.2 Duplicate Charges</h3>
              <p>
                If you are charged multiple times for the same booking, please report it immediately. We will
                investigate and refund the duplicate charges within 3-5 business days after verification.
              </p>
            </section>

            <section>
              <h2>8. Teertham Travel Credits</h2>

              <h3>8.1 What Are Travel Credits?</h3>
              <p>
                Travel credits are virtual currency that can be used for future bookings on the Teertham platform. They
                may be offered as an alternative to monetary refunds or as compensation for service issues.
              </p>

              <h3>8.2 Using Travel Credits</h3>
              <p>Travel credits can be applied to any booking on our platform and offer the following benefits:</p>
              <ul>
                <li>Instant availability (no waiting for bank processing)</li>
                <li>Often offered with bonus value (e.g., 110% of refund amount)</li>
                <li>No expiration date (unless otherwise specified)</li>
                <li>Can be combined with other offers and discounts</li>
              </ul>

              <h3>8.3 Opting for Travel Credits</h3>
              <p>
                When cancelling a booking, you may be offered the option to receive travel credits instead of a monetary
                refund. This choice is entirely voluntary.
              </p>
            </section>

            <section>
              <h2>9. Refund Tracking</h2>

              <h3>9.1 How to Track Your Refund</h3>
              <p>You can track your refund status through the following methods:</p>
              <ul>
                <li>Log in to your account and check &quot;My Bookings&quot; for refund status updates</li>
                <li>Check the email notification sent when the refund was initiated</li>
                <li>Contact customer support with your booking reference number</li>
              </ul>

              <h3>9.2 Refund Status Indicators</h3>
              <ul>
                <li>
                  <strong>Pending:</strong> Refund request received, awaiting processing
                </li>
                <li>
                  <strong>Initiated:</strong> Refund has been processed and sent to your payment provider
                </li>
                <li>
                  <strong>Completed:</strong> Refund has been credited to your account
                </li>
                <li>
                  <strong>Failed:</strong> Refund could not be processed; alternative method required
                </li>
              </ul>
            </section>

            <section>
              <h2>10. Important Notes</h2>
              <ul>
                <li>Refund timelines are approximate and depend on your bank or payment provider</li>
                <li>Teertham is not responsible for delays caused by third-party payment processors or banks</li>
                <li>
                  Refund amounts may differ from the original booking amount due to currency fluctuations (if
                  applicable)
                </li>
                <li>Always keep your booking reference number for refund inquiries</li>
                <li>Refund policies are subject to change; the policy at the time of booking applies</li>
              </ul>
            </section>

            <section>
              <h2>11. Contact Us</h2>
              <p>
                If you have questions about refunds or need assistance tracking your refund, please contact our customer
                support team:
              </p>
              <ul>
                <li>
                  <strong>Email:</strong> refunds@teertham.com
                </li>
                <li>
                  <strong>Phone:</strong> +91 123 456 7890 (Available 24/7)
                </li>
                <li>
                  <strong>Live Chat:</strong> Available on our website during business hours
                </li>
              </ul>
            </section>
          </article>
        </div>
      </div>
    </main>
  )
}
