<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">

    <title>{{ $title ?? config('app.name') }}</title>

    @vite(['resources/css/app.css', 'resources/js/app.js'])
    @livewireStyles
    {!! ToastMagic::styles() !!}
</head>

<body class="min-h-dvh bg-background text-foreground">
<div class="mx-auto min-h-dvh w-full max-w-[430px] bg-background px-4 pt-4 pb-[calc(env(safe-area-inset-bottom)+1rem)]">
    <main class="@auth pb-24 @else pb-6 @endauth">
        {{ $slot }}
    </main>

    @auth
        <livewire:layout.navbar />
    @endauth
</div>

@livewireScripts
{!! ToastMagic::scripts() !!}
</body>
</html>
