import Link from "next/link";

export const metadata = { title: "Access Denied — GSC My" };

// NextAuth's error landing — typically only hit if Keycloak auth
// itself failed (misconfigured client / cancelled login). gscMy
// has no role-based signin gate so this should be rare.
export default function AccessDeniedPage() {
  return (
    <div className="min-vh-100 d-flex align-items-center justify-content-center bg-light">
      <div className="card shadow-sm" style={{ maxWidth: 480 }}>
        <div className="card-body p-4 text-center">
          <div className="mb-3">
            <i className="ph ph-shield-warning text-danger" style={{ fontSize: "3rem" }}></i>
          </div>
          <h4 className="mb-2">Access Denied</h4>
          <p className="text-muted mb-4">
            We couldn&apos;t complete your sign-in. Please try again or
            contact support if the problem persists.
          </p>
          <div className="d-flex gap-2 justify-content-center">
            <Link href="/auth/keycloak" className="btn btn-primary">Try again</Link>
            <a href="https://support.gosec.cloud/" className="btn btn-outline-secondary">Contact Support</a>
          </div>
        </div>
      </div>
    </div>
  );
}
