@section('title', __('Booking Details') . " #" . ($order->code ?? "404"))
{{-- Main Card Container --}}
{{-- Header Section --}}

{{ __('Booking') }} #{{ $order->code }}

{{ $order->created_at->format('F j, Y, g:i a') }}
{{ __('Back to Bookings') }}
status}Color", '#0099FF') }}15; color: {{ setting("appColorTheme.{$order->status}Color", '#0099FF') }}; ring-color: {{ setting("appColorTheme.{$order->status}Color", '#0099FF') }}30;"> {{ ucfirst(__($order->status)) }}
{{-- LEFT COLUMN: Main Booking Info --}}
{{-- Trip Details --}}

{{ __('Trip Details') }}

{{ __('Check-in') }}
{{ \Carbon\Carbon::parse($bookingOrder->check_in_date)->format('D, M j, Y') }}
{{ $bookingOrder->check_in_time ?? '3:00 PM' }}
{{ __('Check-out') }}
{{ \Carbon\Carbon::parse($bookingOrder->check_out_date)->format('D, M j, Y') }}
{{ $bookingOrder->check_out_time ?? '11:00 AM' }}
{{ __('Total Duration') }}
{{ $bookingOrder->number_of_nights }} {{ __('nights') }}
{{-- Guest Info --}}

{{ __('Guest Information') }}

{{ $bookingOrder->number_of_guests }} {{ __('Guests') }} ({{ $bookingOrder->number_of_adults }} {{ __('Adults') }}, {{ $bookingOrder->number_of_children }} {{ __('Children') }}, {{ $bookingOrder->number_of_infants }} {{ __('Infants') }}, {{ $bookingOrder->number_of_pets }} {{ __('Pets') }})
{{-- Primary Guest --}}
@if($order->user->photo) {{ $order->user->name }} @else
{{ substr($order->user->name, 0, 1) }}
@endif

{{ $order->user->name }} {{ __('Primary') }}

{{ $order->user->email }} • {{ $order->user->phone }}

{{-- Additional Guests --}} @if($bookingOrder->guests && $bookingOrder->guests->count() > 0)

{{ __('Additional Guests') }}

@foreach($bookingOrder->guests as $guest)
@if(!empty($guest->full_name)) {{ substr($guest->full_name, 0, 1) }} @else @endif

{{ !empty($guest->full_name) ? $guest->full_name : ucfirst($guest->guest_type) }}

@if(!empty($guest->full_name))

{{ ucfirst($guest->guest_type) }}

@endif
@endforeach
@endif
{{-- Payment Details --}}

{{ __('Payment Details') }}

{{ currencyFormat($bookingOrder->base_price) }} x {{ $bookingOrder->number_of_nights }} {{ __('nights') }} {{ currencyFormat($bookingOrder->total_nights_cost) }}
@foreach($bookingOrder->fees as $fee)
{{ $fee->name }} {{ currencyFormat($fee->calculated_amount) }}
@endforeach @if($order->discount > 0)
{{ __('Discount') }} -{{ currencyFormat($order->discount) }}
@endif @if($order->tax > 0)
{{ __('Tax') }} {{ currencyFormat($order->tax) }}
@endif
{{ __('Total') }} {{ currencyFormat($order->total) }}
{{ __('Payment Status') }} {{ ucfirst(__($order->payment_status)) }}
{{-- RIGHT COLUMN: Property & Actions --}}
{{-- Actions Card --}} @can('manage-bookings')

{{ __('Actions') }}

{{-- Check-in/Check-out Verification --}} @if($order->payment_status == 'successful' && in_array($order->status, [\App\Models\BookingOrder::AWAITING_HOST_APPROVAL, \App\Models\BookingOrder::CHECKIN]))
{{ __('Verify') }}

{{ __('Ask the guest for the verification code from their app.') }}

@endif @if($order->status === 'pending')
@elseif(!in_array($order->status, [\App\Models\BookingOrder::CANCELLED, \App\Models\BookingOrder::COMPLETED]))
@if($order->can_cancel) @endif
@endif
@endcan {{-- Property Card --}}
@if($bookingOrder->property->photos && count($bookingOrder->property->photos) > 0)

{{ $bookingOrder->property->name }}

@endif

{{ $bookingOrder->property->address ?? '' }}
{{ $bookingOrder->property->city ?? '' }}, {{ $bookingOrder->property->country ?? '' }}

{{-- Host Mini --}}

{{ __('Hosted by') }}

{{ $order->vendor->name }}