"use client";
import { Navbar } from "@/components/layout/Navbar";
import { Footer } from "@/components/layout/Footer";
import { useRouter } from "next/navigation";
import { XCircle } from "lucide-react";
import React from "react";

export default function PaymentFailurePage() {
  const router = useRouter();
  return (
    <div className="min-h-screen flex flex-col">
      <Navbar />
      <main className="flex-1 px-4 py-10 max-w-2xl mx-auto w-full">
        <div className="border rounded-xl p-6 bg-white shadow-sm">
          <div className="flex items-center gap-3 mb-2">
            <div className="w-10 h-10 rounded-xl bg-red-50 flex items-center justify-center shrink-0">
              <XCircle className="w-5 h-5 text-red-600" />
            </div>
            <h1 className="text-2xl font-semibold text-gray-900">Payment failed</h1>
          </div>
          <p className="text-gray-700 mb-4">Unfortunately, your payment failed. Please try again or use a different method.</p>
          <button className="px-4 py-2 rounded-lg bg-brand-600 hover:bg-brand-700 text-white text-sm font-medium transition-colors" onClick={() => router.push('/dashboard/user')}>Go to Dashboard</button>
        </div>
      </main>
      <Footer />
    </div>
  );
}
