import type { Metadata } from "next";
import "./globals.css";
import Navbar from "@/components/Navbar";
import Footer from "@/components/Footer";
import AssistantDrawer from "@/components/AssistantDrawer";
import { Toaster } from "@/components/ui/sonner";
import { ThemeProvider } from "@/components/theme-provider";

export const metadata: Metadata = {
  title: "ACVE",
  description: "ACVE Coursera/Udemy-style legal learning MVP",
};

export default function RootLayout({ children }: Readonly<{ children: React.ReactNode }>) {
  return (
    <html lang="es" suppressHydrationWarning>
      <body>
        <ThemeProvider attribute="class" defaultTheme="system" enableSystem disableTransitionOnChange>
          <div className="acve-shell flex min-h-screen flex-col">
            <Navbar />
            <main className="mx-auto w-full max-w-[1240px] flex-1 px-4 py-6 md:px-6 md:py-8">{children}</main>
            <Footer />
          </div>
          <Toaster />
          <AssistantDrawer />
        </ThemeProvider>
      </body>
    </html>
  );
}
