import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import "./globals.css";
import { JobsProvider } from "@/contexts/JobsContext";
import Sidebar from "@/components/Sidebar";

const geistSans = Geist({
  variable: "--font-geist-sans",
  subsets: ["latin"],
});

const geistMono = Geist_Mono({
  variable: "--font-geist-mono",
  subsets: ["latin"],
});

export const metadata: Metadata = {
  title: "Google Reviews Scraper Pro",
  description: "Scrape and analyze Google Reviews",
};

export default function RootLayout({
  children,
}: Readonly<{
  children: React.ReactNode;
}>) {
  return (
    <html lang="en">
      <body
        className={`${geistSans.variable} ${geistMono.variable} antialiased`}
      >
        <JobsProvider>
          <div className="h-screen w-screen overflow-hidden flex">
            <Sidebar />
            <div className="flex-1 bg-gray-50 overflow-auto">
              {children}
            </div>
          </div>
          {/* Portal target for modals - outside overflow-hidden container */}
          <div id="modal-root" />
        </JobsProvider>
      </body>
    </html>
  );
}
