"use client"

import { useEffect } from "react"
import { clearMailBackgroundDom } from "@/lib/mail-settings/mail-background-dom"

/** Login shell: plain canvas, no mail wallpaper. */
export function LoginChrome({ children }: { children: React.ReactNode }) {
  useEffect(() => {
    clearMailBackgroundDom()
  }, [])

  return (
    <div className="ultimail-login relative flex min-h-dvh flex-col">
      <div className="ultimail-login-backdrop" aria-hidden>
        <div className="ultimail-login-orb ultimail-login-orb--a" />
        <div className="ultimail-login-orb ultimail-login-orb--b" />
        <div className="ultimail-login-orb ultimail-login-orb--c" />
        <div className="ultimail-login-aurora" />
      </div>
      <div className="relative z-10 flex min-h-dvh flex-col">{children}</div>
    </div>
  )
}
