<?php $total_beds = 0; ?>
<?php $total_extra = 0; ?>
<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" rel="stylesheet"
        integrity="sha384-BmbxuPwQa2lc/FVzBcNJ7UAyJxM6wuqIj61tLrc4wSX0szH/Ev+nYRRuWlolflfl" crossorigin="anonymous">
    <style>
        @font-face {
            font-family: "AGENCY";
            src: url("/fonts/AGENCY.TTF");
        }

        @font-face {
            font-family: "ROCC";
            src: url("/fonts/ROCCB___.TTF");
        }

        @font-face {
            font-family: "dl";
            src: url("/fonts/DeepLake-Regular.TTF");
        }

        body {
            background: rgb(204, 204, 204);
            font-size: 18px;
        }

        .page {
            background-image: url('/img/ticket.png');
            background-size: 100% 100%;
            width: 21cm;
            height: 29.7cm;
            margin: 0 auto;
            padding: 200px 10px 0 10px;
        }

        .page p {
            font: 14px "Tahoma";
            line-height: 1.6;
        }

        .t1 {
            text-align: center;
            margin-bottom: 10px;
            width: 100%;
        }

        table td {
            padding-top: 8px;
        }

        .dl {
            font-family: "dl";
        }

        .fnt {
            font-family: "AGENCY";
        }

        .rc {
            font-family: "ROCC";
        }

        .text-cb {
            color: #1b74a7;
        }

        .bg {
            background-color: #a7aeb0;

        }

        .header-1 {
            font-size: 20px;
            color: #020a11;
        }

    </style>
</head>

<body>
    <div class="page fnt">
        <table class="t1">
            <tr class="header-1">
                <td style="text-align: left;padding-left: 20px;">Booking Reference: <span
                        class="dl">{{ $booking->number }}</span></td>
                <td style="width: 30%;"></td>
                <td>DATE OF ISSUE: {{ $booking->created_at->format('j F Y') }}</td>
            </tr>
        </table>
        <table style="text-align: justify;">
            <tr>
                <td colspan="2">
                    <img style="width:100%" src="/img/car_ticket_1.png" alt="">
                </td>
            </tr>
            <td style="width:33%;padding-left: 20px;">
                <p>Name: {{ $booking->office->admin ? $booking->office->admin->name : '--' }} </p>
                <p>Mobile: {{ $booking->office ? $booking->office->phone : '--' }}</p>
            </td>
            @if($car->details)
            <td style="width:45%;" >
                <table style="width:100%;">
                    <tr>
                        <td>{{ $car->details['owner'] }}</td>
                        <td>{{ $car->details['color'] }}, {{$car->details['car_number']}}</td>
                        <td>{{ $car->ticket_number??'--'  }}</td>
                    </tr>
                </table>
            </td>
            @endif

            </tr>
        </table>
        @foreach ($booking->segments as $segment)
            @include('segment-services.print_one',['item'=>$segment])
        @endforeach
        <table style="margin-top: 20px;align-items: center;" class="text-cb rc">
            <tr>
                <td colspan="2"> <img style="width:100%" src="/img/ticket6.gif" alt=""> </td>
            </tr>
            <tr>
                <td style="width:47%">

                </td>
                <td></td>
            </tr>
            <tr>
                <td></td>
                <td>
                    Payment Amount: <span class="fnt" style="font-weight: 700;">{{ formatPrice($car->price) }}</span>
                </td>
            </tr>
        </table>
    </div>
</body>

</html>
