<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="csrf-token" content="{{ csrf_token() }}">
    <title>
        @php
            $__mt = $hotel->getPublicSiteSetting('meta_title', '');
        @endphp
        @if(filled($__mt))
            {{ $__mt }}
        @else
            @yield('title', $hotel->name . ' — Book your stay')
        @endif
    </title>
@php
    $metaDef = 'Reserve a room at ' . e($hotel->name) . ($hotel->city ? ' in ' . e($hotel->city) : '') . '.';
    $metaFromSettings = $hotel->getPublicSiteSetting('meta_description', '');
@endphp
    <meta name="description" content="@yield('meta_description', $metaFromSettings ?: $metaDef)">
    @include('public-booking.partials.public-site-ui-styles')
    @stack('head')
</head>
<body class="pb-guest-site pb-tpl tpl-{{ (string) ($templateKey ?? '1') }}">
@if (session('public_booking_success'))
    <div class="pb-flash-success" role="status" style="position:fixed;inset:0 auto auto 0;right:0;z-index:9999;padding:0.75rem 1rem;background:#166534;color:#fff;text-align:center;font-size:0.95rem;">
        {{ session('public_booking_success') }}
    </div>
    <script>setTimeout(function(){var e=document.querySelector('.pb-flash-success');if(e)e.remove();},8000);</script>
@endif
@if (session('error'))
    <div class="pb-flash-err" role="alert" style="position:fixed;inset:0 auto auto 0;right:0;z-index:9999;padding:0.75rem 1rem;background:#991b1b;color:#fff;text-align:center;font-size:0.95rem;">
        {{ session('error') }}
    </div>
    <script>setTimeout(function(){var e=document.querySelector('.pb-flash-err');if(e)e.remove();},10000);</script>
@endif
@yield('content')
@stack('scripts')
</body>
</html>
