import type { ReactNode } from "react";

/**
 * The embedded Sanity Studio ships its own styled-components theme and
 * must NOT inherit the site's Tailwind globals, custom fonts, Header,
 * or Footer. This layout shadows the root layout for the /studio route
 * subtree and returns the bare <html>/<body> shell required by Next.js.
 *
 * `metadata` + `viewport` are re-exported here (server component) because
 * the page below is `"use client"` and Next.js forbids metadata exports
 * from client component files.
 */
export default function StudioLayout({ children }: { children: ReactNode }) {
  return (
    <html lang="en">
      <body style={{ margin: 0 }}>{children}</body>
    </html>
  );
}

export { metadata, viewport } from "next-sanity/studio";
