import type { Metadata, Viewport } from "next";
import type { ReactNode } from "react";
import "@/app/(site)/_styles/styles.css";
import "@/app/(site)/_styles/auth-pages.css";
import "@/app/(site)/_styles/tailwind-auth.css";

export const metadata: Metadata = {
  title: "Unionists Group",
};

export const viewport: Viewport = { width: "device-width", initialScale: 1 };

/**
 * Root layout for the full-screen navy pages (sign up, alternate login). They had
 * a different <body> and Tailwind config from the rest of the site.
 */
export default function SiteAuthLayout({ children }: { children: ReactNode }) {
  return (
    <html lang="en">
      <head>
        <link rel="preconnect" href="https://fonts.googleapis.com" />
        <link rel="preconnect" href="https://fonts.gstatic.com" crossOrigin="" />
        {/* eslint-disable-next-line @next/next/no-page-custom-font -- same font loading as the static site */}
        <link href="https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;900&display=swap" rel="stylesheet" />
      </head>
      <body
        className="auth-page-body auth-page-navy font-roboto min-h-screen flex flex-col overflow-x-hidden lg:overflow-hidden"
        style={{ background: "var(--navy-base,#0A1F44)" }}
      >
        {children}
      </body>
    </html>
  );
}
