@extends('layouts.admin')
@section('content')
<style>
        .chat-container {
            height: 100vh;
            max-height: 100vh;
            display: flex;
            flex-direction: column;
        }
        .chat-header {
            border-bottom: 1px solid #dee2e6;
        }
        .messages-container {
            flex: 1;
            overflow-y: auto;
            padding: 1rem;
            background-color: #f8f9fa;
        }
        .message {
            max-width: 70%;
            margin-bottom: 1rem;
            padding: 0.75rem 1rem;
            border-radius: 1rem;
            position: relative;
        }
        .received {
            background-color: #ffffff;
            align-self: flex-start;
            border: 1px solid #dee2e6;
        }
        .sent {
            background-color: #a1e417;
            color: #000000;
            align-self: flex-end;
        }
        .message-time {
            font-size: 0.75rem;
            opacity: 0.7;
            display: block;
            text-align: right;
            margin-top: 0.25rem;
        }
        .typing-indicator {
            display: inline-block;
            padding: 0.5rem 1rem;
            background-color: #e9ecef;
            border-radius: 1rem;
            margin-bottom: 1rem;
        }
        .typing-dot {
            display: inline-block;
            width: 8px;
            height: 8px;
            border-radius: 50%;
            background-color: #6c757d;
            margin-right: 3px;
            animation: typingAnimation 1.4s infinite ease-in-out;
        }
        .typing-dot:nth-child(1) {
            animation-delay: 0s;
        }
        .typing-dot:nth-child(2) {
            animation-delay: 0.2s;
        }
        .typing-dot:nth-child(3) {
            animation-delay: 0.4s;
            margin-right: 0;
        }
        @keyframes typingAnimation {
            0%, 60%, 100% { transform: translateY(0); }
            30% { transform: translateY(-5px); }
        }
        .avatar {
            width: 40px;
            height: 40px;
            border-radius: 50%;
            object-fit: cover;
            margin-right: 0.75rem;
        }
    </style>
    
<!-- start page title -->
<!-- start page title -->
<div class="row">
    <div class="col-12">
        <div class="page-title-box d-sm-flex align-items-center justify-content-between bg-galaxy-transparent">
            <h4 class="mb-sm-0">User Chat</h4>

            <div class="page-title-right">
                <ol class="breadcrumb m-0">
                    <li class="breadcrumb-item"><a href="javascript: void(0);">Chat</a></li>
                    <li class="breadcrumb-item active">User Chat</li>
                </ol>
            </div>
        </div>
    </div>
</div>
<!-- end page title -->

<div class="row">
    <div class="col-lg-12">
        <div class="card" id="orderList">
            <div class="card-header border-0">
                <div class="row align-items-center gy-3">
                    <div class="col-sm">
                        <h5 class="card-title mb-0">Conversation</h5>
                    </div>
                </div>
            </div>
            <div class="card-body">
                
                 <div class="container-fluid chat-container p-0">
                    <!-- Chat Header -->
                    <!--<div class="chat-header bg-white p-3 d-flex align-items-center shadow-sm">-->
                    <!--    <div class="d-flex align-items-center">-->
                    <!--        <img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png" alt="User Avatar" class="avatar">-->
                    <!--        <div>-->
                    <!--            <h6 class="mb-0 fw-bold">John Doe</h6>-->
                    <!--            <small class="text-muted">+971 XXX XXXX </small>-->
                    <!--        </div>-->
                    <!--    </div>-->
                    <!--    <div class="ms-auto">-->
                    <!--    <div class="d-flex align-items-center">-->
                    <!--        <img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png" alt="User Avatar" class="avatar">-->
                    <!--        <div>-->
                    <!--            <h6 class="mb-0 fw-bold">Sam Doe</h6>-->
                    <!--            <small class="text-muted">+971 XXX XXXX </small>-->
                    <!--        </div>-->
                    <!--    </div>-->
                    <!--    </div>-->
                    <!--</div>-->
            
                    <!-- Messages Container -->
                    <div class="messages-container d-flex flex-column">
                        <!-- Date divider -->
                        <div class="text-center my-3">
                            <span class="badge bg-secondary bg-opacity-10 text-secondary">Today</span>
                        </div>
            
                        <!-- Received message -->
                        <div class="d-flex align-items-center">
                            <div class="d-flex flex-column align-items-center me-2">
                                <img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png" alt="User Avatar" class="avatar me-0 mb-2">
                                <div>
                                    <h6 class="mb-0 fw-bold text-center">John Doe</h6>
                                    <small class="text-muted text-center">+971-98765432 </small>
                                </div>
                            </div>
                            <div class="message received">
                                <div>Hey there! How are you doing?</div>
                                <span class="message-time">10:30 AM</span>
                            </div>
                        </div>
            
                        <!-- Sent message -->
                        <div class="d-flex align-items-center flex-row-reverse">
                            <div class="d-flex flex-column align-items-center ms-2">
                                <img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png" alt="User Avatar" class="avatar me-0 mb-2">
                                <div>
                                    <h6 class="mb-0 fw-bold text-center">Sam Doe</h6>
                                    <small class="text-muted text-center">+971-23456789 </small>
                                </div>
                            </div>
                            <div class="message sent">
                                <div>I'm doing great! Just working on some Bootstrap stuff.</div>
                                <span class="message-time">10:32 AM</span>
                            </div>
                        </div>
            
                        <!-- Received message -->
                        <div class="d-flex align-items-center">
                            <div class="d-flex flex-column align-items-center me-2">
                                <img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png" alt="User Avatar" class="avatar me-0 mb-2">
                                <div>
                                    <h6 class="mb-0 fw-bold text-center">John Doe</h6>
                                    <small class="text-muted text-center">+971-98765432 </small>
                                </div>
                            </div>
                            <div class="message received">
                                <div>That's awesome! Bootstrap 5.3 has some great new features.</div>
                                <span class="message-time">10:33 AM</span>
                            </div>
                        </div>
            
                        <!-- Sent message -->
                        <div class="d-flex align-items-center flex-row-reverse">
                            <div class="d-flex flex-column align-items-center ms-2">
                                <img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png" alt="User Avatar" class="avatar me-0 mb-2">
                                <div>
                                    <h6 class="mb-0 fw-bold text-center">Sam Doe</h6>
                                    <small class="text-muted text-center">+971-23456789 </small>
                                </div>
                            </div>
                            <div class="message sent">
                                <div>Yes! I'm particularly liking the new color modes and CSS variables.</div>
                                <span class="message-time">10:34 AM</span>
                            </div>
                        </div>
            
                        <!-- Received message -->
                        <div class="d-flex align-items-center">
                            <div class="d-flex flex-column align-items-center me-2">
                                <img src="https://cdn.pixabay.com/photo/2015/10/05/22/37/blank-profile-picture-973460_640.png" alt="User Avatar" class="avatar me-0 mb-2">
                                <div>
                                    <h6 class="mb-0 fw-bold text-center">John Doe</h6>
                                    <small class="text-muted text-center">+971-98765432 </small>
                                </div>
                            </div>
                            <div class="message received">
                                <div>Have you tried the new offcanvas components? They're really useful for mobile designs.</div>
                                <span class="message-time">10:35 AM</span>
                            </div>
                        </div>
                    </div>
            
                    <!-- Message Input -->
                    <!--<div class="chat-footer bg-white p-3 border-top">-->
                    <!--    <div class="input-group">-->
                    <!--        <input type="text" class="form-control" placeholder="Type a message...">-->
                    <!--        <button class="btn btn-primary" type="button">-->
                    <!--            <i class='bx bxs-paper-plane'></i>-->
                    <!--        </button>-->
                    <!--    </div>-->
                    <!--</div>-->
                
                <!--<div class="table-responsive">-->
                <!--    <table id="UserReportTable" class="table table-bordered nowrap align-middle" style="width: 100%;">-->
                <!--        <thead class="">-->
                <!--            <tr class="text-uppercase">-->
                <!--                <th>Sl No</th>-->
                <!--                <th>Person Chatted With</th>-->
                <!--                <th>Profile Picture</th>-->
                <!--                <th>Mobile Number</th>-->
                <!--                <th>Massage Count</th>-->
                <!--                <th>View Chat</th>-->
                <!--            </tr>-->
                <!--        </thead>-->
                <!--        <tbody class="list form-check-all">-->
                <!--            <tr>-->
                <!--                <td>1</td>-->
                <!--                <td>John Doe</td>-->
                <!--                <td>Image</td>-->
                <!--                <td>+971-xxxx-xxxxxxx</td></td>-->
                <!--                <td>12 messages</td>-->
                <!--                <td>Link</td>-->
                <!--            </tr>-->
                <!--            <tr>-->
                <!--                <td>1</td>-->
                <!--                <td>John Doe</td>-->
                <!--                <td>Image</td>-->
                <!--                <td>+971-xxxx-xxxxxxx</td></td>-->
                <!--                <td>12 messages</td>-->
                <!--                <td>Link</td>-->
                <!--            </tr>-->
                <!--        </tbody>-->
                <!--    </table>-->
                <!--</div>-->
                <div class="hstack gap-2 justify-content-between mt-3">
                    <a href="{{ route('admin.users.chats') }}" class="btn btn-success">Back</a>
                </div>
                
            </div>
        </div>
    </div>
    <!--end col-->
</div>
<!--end row-->
<!--end row-->
@endsection
@section('script')


@endsection
