 </div>
 
 <nav class="fixed bottom-0 left-0 right-0 bg-[#0F0A1F] border-t border-gray-800/50 md:hidden z-50">
    <div class="max-w-screen-xl mx-auto">
        <div class="grid grid-cols-5 w-full">
            
            <a href="transactions.php" 
                 
                class="group relative flex flex-col items-center justify-center px-2 py-4 transition-colors text-gray-400">
                <div class="relative w-10 h-10 flex items-center justify-center">
                    <div class="w-full h-full absolute bg-[#2FE6DE]/5 rounded-xl group-hover:bg-[#2FE6DE]/10 transition-colors"></div>
                    <i class="fas fa-clock-rotate-left w-5 h-5"></i>
                    <div class="absolute inset-0 bg-[#2FE6DE]/10 rounded-xl scale-0 group-hover:scale-100 transition-transform"></div>
                </div>
                <span class="text-xs mt-1 font-medium group-hover:text-[#2FE6DE] transition-colors">History</span>
                            </a>

            
            <a href="deposit.php" 
                                class="group relative flex flex-col items-center justify-center px-2 py-4 transition-colors text-gray-400">
                <div class="relative w-10 h-10 flex items-center justify-center">
                    <div class="w-full h-full absolute bg-[#2FE6DE]/5 rounded-xl group-hover:bg-[#2FE6DE]/10 transition-colors"></div>
                    <i class="fas fa-coins w-5 h-5"></i>
                    <div class="absolute inset-0 bg-[#2FE6DE]/10 rounded-xl scale-0 group-hover:scale-100 transition-transform"></div>
                </div>
                <span class="text-xs mt-1 font-medium group-hover:text-[#2FE6DE] transition-colors">Deposit</span>
                            </a>

            
            <a href="dashboard.php" 
                                class="group relative flex flex-col items-center justify-center px-2 py-4 transition-colors text-[#2FE6DE]">
                <div class="relative w-10 h-10 flex items-center justify-center">
                    <div class="w-full h-full absolute bg-[#2FE6DE]/5 rounded-xl group-hover:bg-[#2FE6DE]/10 transition-colors"></div>
                    <i class="fas fa-home w-5 h-5"></i>
                    <div class="absolute inset-0 bg-[#2FE6DE]/10 rounded-xl scale-0 group-hover:scale-100 transition-transform"></div>
                </div>
                <span class="text-xs mt-1 font-medium group-hover:text-[#2FE6DE] transition-colors">Home</span>
                                    <div class="absolute top-0 left-1/2 -translate-x-1/2 w-8 h-1 bg-[#2FE6DE] rounded-b-full active-indicator"></div>
                            </a>

            
            <a href="withdraw.php" 
                                class="group relative flex flex-col items-center justify-center px-2 py-4 transition-colors text-gray-400">
                <div class="relative w-10 h-10 flex items-center justify-center">
                    <div class="w-full h-full absolute bg-[#2FE6DE]/5 rounded-xl group-hover:bg-[#2FE6DE]/10 transition-colors"></div>
                    <i class="fas fa-wallet w-5 h-5"></i>
                    <div class="absolute inset-0 bg-[#2FE6DE]/10 rounded-xl scale-0 group-hover:scale-100 transition-transform"></div>
                </div>
                <span class="text-xs mt-1 font-medium group-hover:text-[#2FE6DE] transition-colors">Withdraw</span>
                            </a>

            
            <button id="mobileMenuToggle" 
                class="group relative flex flex-col items-center justify-center px-2 py-4 w-full text-gray-400">
                <div class="relative w-10 h-10 flex items-center justify-center">
                    <div class="w-full h-full absolute bg-[#2FE6DE]/5 rounded-xl group-hover:bg-[#2FE6DE]/10 transition-colors"></div>
                    <div class="menu-icon">
                       <i class="fas fa-ellipsis w-5 h-5"></i>
                    </div>
                    <div class="absolute inset-0 bg-[#2FE6DE]/10 rounded-xl scale-0 group-hover:scale-100 transition-transform"></div>
                </div>
                <span class="text-xs mt-1 font-medium group-hover:text-[#2FE6DE] transition-colors">Menu</span>
            </button>
            
        </div>
    </div>
</nav>


    <div id="mobileSidebar" class="fixed inset-0 bg-black/60 backdrop-blur-sm z-50 md:hidden hidden">
    <div class="absolute left-0 top-0 bottom-0 w-80 bg-[#0F0A1F] shadow-xl overflow-hidden">
        
        <button id="closeMobileSidebar" 
            class="absolute top-4 right-4 w-8 h-8 flex items-center justify-center rounded-full bg-gray-800/50 text-gray-400 hover:text-[#2FE6DE] transition-colors">
            <i class="fas fa-times"></i>
        </button>

        
        <div class="flex flex-col h-full">
            
          <div class="p-6 border-b border-gray-800/50">
    <div class="flex items-center gap-4">
        <div class="w-12 h-12 rounded-xl bg-[#1A1428] flex-shrink-0 overflow-hidden flex items-center justify-center">
            <?php if (!empty(['P_location'])): ?>
                <!-- Show uploaded photo -->
                <img 
                    src="../<?= $P_location ?>"
                    alt="<?php echo htmlspecialchars($fullname); ?>"
                    class="w-full h-full object-cover">
            <?php else: ?>
                <!-- Show AI/Default avatar icon -->
                <i class="fas fa-user-circle text-gray-500 text-4xl"></i>
            <?php endif; ?>
        </div>
        <div class="flex-1 min-w-0">
            <h3 class="font-medium truncate"><?php echo htmlspecialchars($fullname); ?></h3>
            <p class="text-sm text-gray-400 truncate"><?php echo htmlspecialchars($email); ?></p>
        </div>
    </div>
</div>
            
            <div class="flex-1 overflow-y-auto">
                <div class="p-4">
                    <nav class="space-y-6">
                        
                      
                   <?php
$user_id = $user['id'] ?? $_SESSION['user_id'] ?? 0;

// Count unread messages (status=2, marked=0)
$countStmt = $pdo->prepare("SELECT COUNT(*) FROM message WHERE status=2 AND log_id=?");
$countStmt->execute([$user_id]);
$unreadCount = $countStmt->fetchColumn();

// Fetch only the most recent message
$msgStmt = $pdo->prepare("SELECT * FROM message WHERE status=2 AND log_id=? ORDER BY date DESC LIMIT 1");
$msgStmt->execute([$user_id]);
$latestMessage = $msgStmt->fetch(PDO::FETCH_ASSOC);
?>

<div class="p-4 border-t border-gray-800/50">
    <?php if ($latestMessage): ?>
        <div class="bg-gradient-to-br from-[#2FE6DE]/20 to-transparent p-4 rounded-xl mb-4">
            <h4 class="font-medium text-[#2FE6DE] mb-2">
                <a href="support.php?id=<?= (int)$latestMessage['id'] ?>" 
                   class="hover:underline">
                    <?= htmlspecialchars($latestMessage['title'] ?? 'No title') ?>
                </a>
            </h4>
            <p class="text-sm text-gray-400 mb-3">
                <?= htmlspecialchars(mb_strimwidth($latestMessage['note'] ?? 'No message', 0, 100, '...')) ?>
            </p>
            <a href="inbox.php" 
               class="block w-full bg-gradient-to-r from-[#2FE6DE] to-[#2FE6DE]/80 text-black text-sm font-medium py-2.5 px-4 rounded-lg hover:brightness-110 transition-all text-center">
                View Inbox
            </a>
        </div>
    <?php else: ?>
        <p class="text-gray-400 text-sm">No recent messages.</p>
    <?php endif; ?>
</div>

                      
                      
                      
                      
                        <div class="space-y-1">
                            <p class="px-4 text-xs font-medium text-gray-400 uppercase mb-2">Main Menu</p>
                            
                            <a href="dashboard.php" 
                                                                class="flex items-center gap-3 px-4 py-2.5 rounded-xl transition-all bg-gradient-to-r from-[#2FE6DE]/10 to-transparent text-[#2FE6DE]">
                                <i class="fas fa-th-large w-5 h-5"></i>
                                <span>Dashboard</span>
                            </a>
                        </div>

                        
                        <div class="space-y-1">
                            <p class="px-4 text-xs font-medium text-gray-400 uppercase mb-2">Finance Management</p>
                            
                                                        <a href="deposit.php" 
                                                                class="flex items-center gap-3 px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:bg-[#1A1428] hover:text-gray-100">
                                <i class="fas fa-arrow-down w-5 h-5"></i>
                                <span>Deposit</span>
                            </a>
                            
                                                        <a href="withdraw.php" 
                                                                class="flex items-center gap-3 px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:bg-[#1A1428] hover:text-gray-100">
                                <i class="fas fa-arrow-up w-5 h-5"></i>
                                <span>Withdraw</span>
                            </a>
                            
                                                        <a href="transactions.php" 
                                                                class="flex items-center gap-3 px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:bg-[#1A1428] hover:text-gray-100">
                                <i class="fas fa-file-alt w-5 h-5"></i>
                                <span>Transactions</span>
                            </a>
                            
                                                    </div>

                        
                        <div class="space-y-1">
                            <p class="px-4 text-xs font-medium text-gray-400 uppercase mb-2">Trading &amp; Signals</p>

                                                        <div x-data="{ open: false }">
                                <button @click="open = !open" 
                                    class="flex items-center justify-between w-full px-4 py-2.5 rounded-xl transition-all"
                                    :class="{'bg-gradient-to-r from-[#2FE6DE]/10 to-transparent text-[#2FE6DE]': open, 'text-gray-400 hover:bg-[#1A1428] hover:text-gray-100': !open}">
                                    <div class="flex items-center gap-3">
                                        <i class="fas fa-chart-line w-5 h-5"></i>
                                        <span>Signals Plans</span>
                                    </div>
                                    <i class="fas fa-chevron-down w-4 h-4 transition-transform" :class="open ? 'rotate-180' : ''"></i>
                                </button>
                                <div x-show="open"
                                    x-transition:enter="transition ease-out duration-200"
                                    x-transition:enter-start="opacity-0 -translate-y-2"
                                    x-transition:enter-end="opacity-100 translate-y-0"
                                    class="pl-12 mt-1 space-y-1">
                                                                        <a href="buy_signal.php" 
                                                                                class="flex items-center gap-3 px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:text-gray-100">
                                        Buy Signals
                                    </a>
                                                                                                            <a href="my_signals.php" 
                                                                                class="flex items-center gap-3 px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:text-gray-100">
                                        My Signals
                                    </a>
                                    
                                    <a href="trade_logs.php" 
                                                                class="flex items-center gap-3 px-4 py-2 rounded-xl transition-all text-gray-400 hover:text-gray-100">
                                Trade History
                            </a>
                                                                    </div>
                            </div>
                            
                            
                            
                            
                            
                            
                            
                            
                             <div x-data="{ open: false }">
                                            
                                            
                        <button @click="open = !open" 
                            class="flex items-center justify-between w-full px-4 py-2.5 rounded-xl transition-all"
                            :class="{'bg-gradient-to-r from-[#2FE6DE]/10 to-transparent text-[#2FE6DE]': open, 'text-gray-400 hover:bg-[#1A1428] hover:text-gray-100': !open}">
                            <div class="flex items-center gap-3">
                                <i class="fas fa-chart-line w-5 h-5"></i>
                                <span>Investment Plans</span>
                            </div>
                            <i class="fas fa-chevron-down w-4 h-4 transition-transform" :class="open ? 'rotate-180' : ''"></i>
                        </button>
                        
                        
                        
                        <div x-show="open" 
                            x-transition:enter="transition ease-out duration-200"
                            x-transition:enter-start="opacity-0 -translate-y-2"
                            x-transition:enter-end="opacity-100 translate-y-0"
                            class="pl-12 mt-1 space-y-1">
                                            <a href="buy_plan.php" 
                                                                class="flex items-center gap-3 px-4 py-2 rounded-xl transition-all text-gray-400 hover:text-gray-100">
                                Buy Plans
                            </a>
                                                                                    <a href="my_plans.php" 
                                                                class="flex items-center gap-3 px-4 py-2 rounded-xl transition-all text-gray-400 hover:text-gray-100">
                                My Investment
                            </a>
                            
                            
                             <a href="investment_logs.php" 
                                                                class="flex items-center gap-3 px-4 py-2 rounded-xl transition-all text-gray-400 hover:text-gray-100">
                                Investment History
                            </a>
                                                    </div>
                    </div>
                    
                            <!--                            <div x-data="{ open: false }">-->
                            <!--    <button @click="open = !open" -->
                            <!--        class="flex items-center justify-between w-full px-4 py-2.5 rounded-xl transition-all"-->
                            <!--        :class="{'bg-gradient-to-r from-[#2FE6DE]/10 to-transparent text-[#2FE6DE]': open, 'text-gray-400 hover:bg-[#1A1428] hover:text-gray-100': !open}">-->
                            <!--        <div class="flex items-center gap-3">-->
                            <!--            <i class="fas fa-exchange-alt w-5 h-5"></i>-->
                            <!--            <span>Swap Crypto</span>-->
                            <!--        </div>-->
                            <!--        <i class="fas fa-chevron-down w-4 h-4 transition-transform" :class="open ? 'rotate-180' : ''"></i>-->
                            <!--    </button>-->
                            <!--    <div x-show="open"-->
                            <!--        x-transition:enter="transition ease-out duration-200"-->
                            <!--        x-transition:enter-start="opacity-0 -translate-y-2"-->
                            <!--        x-transition:enter-end="opacity-100 translate-y-0"-->
                            <!--        class="pl-12 mt-1 space-y-1">-->
                            <!--        <a href="crypto-swap/assets" -->
                            <!--                                                    class="flex items-center gap-3 px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:text-gray-100">-->
                            <!--            Assets-->
                            <!--        </a>-->
                            <!--        <a href="crypto-swap/transactions" -->
                            <!--                                                    class="flex items-center gap-3 px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:text-gray-100">-->
                            <!--            Swap History-->
                            <!--        </a>-->
                            <!--    </div>-->
                            <!--</div>-->
                                                        
                            <!--<div x-data="{ open: false }">-->
                            <!--    <button @click="open = !open" -->
                            <!--        class="w-full flex items-center justify-between px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:bg-[#1A1428] hover:text-gray-100">-->
                            <!--        <div class="flex items-center gap-3">-->
                            <!--            <i class="fas fa-chart-line w-5 h-5"></i>-->
                            <!--            <span>Trading</span>-->
                            <!--        </div>-->
                            <!--        <i class="fas fa-chevron-down w-4 h-4 transition-transform" :class="open ? 'rotate-180' : ''"></i>-->
                            <!--    </button>-->
                                
                            <!--    <div x-show="open" -->
                            <!--        x-transition:enter="transition ease-out duration-200"-->
                            <!--        x-transition:enter-start="opacity-0 -translate-y-2"-->
                            <!--        x-transition:enter-end="opacity-100 translate-y-0"-->
                            <!--        x-transition:leave="transition ease-in duration-150"-->
                            <!--        x-transition:leave-start="opacity-100 translate-y-0"-->
                            <!--        x-transition:leave-end="opacity-0 -translate-y-2"-->
                            <!--        class="pl-12 mt-1 space-y-1">-->
                                    
                            <!--        <a href="trading" -->
                            <!--                                                    class="flex items-center gap-3 px-4 py-2 rounded-lg transition-all text-gray-400 hover:bg-[#1A1428]/50 hover:text-gray-100">-->
                            <!--            Overview-->
                            <!--        </a>-->
                                    
                            <!--        <a href="trading/trade" -->
                            <!--                                                    class="flex items-center gap-3 px-4 py-2 rounded-lg transition-all text-gray-400 hover:bg-[#1A1428]/50 hover:text-gray-100">-->
                            <!--            Trade-->
                            <!--        </a>-->
                                    
                            <!--        <a href="trading/copy" -->
                            <!--                                                    class="flex items-center gap-3 px-4 py-2 rounded-lg transition-all text-gray-400 hover:bg-[#1A1428]/50 hover:text-gray-100">-->
                            <!--            Copy Trading-->
                            <!--        </a>-->
                                    
                            <!--        <a href="trading/bots" -->
                            <!--                                                    class="flex items-center gap-3 px-4 py-2 rounded-lg transition-all text-gray-400 hover:bg-[#1A1428]/50 hover:text-gray-100">-->
                            <!--            Bot Trading-->
                            <!--        </a>-->
                                    
                            <!--        <a href="trading/history" -->
                            <!--                                                    class="flex items-center gap-3 px-4 py-2 rounded-lg transition-all text-gray-400 hover:bg-[#1A1428]/50 hover:text-gray-100">-->
                            <!--            History-->
                            <!--        </a>-->
                            <!--    </div>-->
                            <!--</div>-->
                
                            <!--    <a href="trade-signals/1" 
                                        class="flex items-center gap-3 px-3 py-2 text-gray-400 hover:text-gray-100 rounded-lg hover:bg-[#1A1428] transition-colors">
                    <i data-lucide="radio" class="w-5 h-5"></i>
                    Trade Signals
                </a> -->
                
                
                              <!--  <div x-data="{ open: false }">
                    <button @click="open = !open" 
                    class="flex items-center justify-between w-full px-4 py-2.5 rounded-xl transition-all"
                    :class="{'bg-gradient-to-r from-[#2FE6DE]/10 to-transparent text-[#2FE6DE]': open, 'text-gray-400 hover:bg-[#1A1428] hover:text-gray-100': !open}">
                        <div class="flex items-center gap-3">
                            <i data-lucide="graduation-cap" class="w-5 h-5"></i>
                            Education
                        </div>
                        <i class="fas fa-chevron-down w-4 h-4 transition-transform" :class="open ? 'rotate-180' : ''"></i>
                    </button>
                    <div x-show="open" class="pl-11 mt-1 space-y-1" x-collapse>
                        <a href="membership/courses/1" 
                                                        class="block px-3 py-2 text-gray-400 rounded-lg hover:bg-[#1A1428] transition-colors">
                            Courses
                        </a>
                        <a href="membership/my-courses" 
                                                        class="block px-3 py-2 text-gray-400 rounded-lg hover:bg-[#1A1428] transition-colors">
                            My Courses
                        </a>
                    </div>
                </div> -->
                                        </div>

                        
                        <div class="space-y-1">
                            <p class="px-4 text-xs font-medium text-gray-400 uppercase mb-2">Account</p>

                                                        <a href="referral.php" 
                                                                class="flex items-center gap-3 px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:bg-[#1A1428] hover:text-gray-100">
                                <i class="fas fa-users w-5 h-5"></i>
                                <span>Referrals</span>
                            </a>
                             
                
                
                
                
                 <div x-data="{ open: false }">
                    <button @click="open = !open" 
                        class="w-full flex items-center justify-between px-4 py-2.5 rounded-xl transition-all text-gray-400 hover:bg-[#1A1428] hover:text-gray-100">
                        <div class="flex items-center gap-3">
                            <i class="fas fa-bell w-5 h-5"></i>
                            <span>Notifications</span>
                        </div>
                        <i class="fas fa-chevron-down w-4 h-4 transition-transform" :class="open ? 'rotate-180' : ''"></i>
                    </button>
                    
                    <div x-show="open" 
                        x-transition:enter="transition ease-out duration-200"
                        x-transition:enter-start="opacity-0 -translate-y-2"
                        x-transition:enter-end="opacity-100 translate-y-0"
                        x-transition:leave="transition ease-in duration-150"
                        x-transition:leave-start="opacity-100 translate-y-0"
                        x-transition:leave-end="opacity-0 -translate-y-2"
                        class="pl-12 mt-1 space-y-1">
                        
                        <a href="inbox.php" 
                                                        class="flex items-center gap-3 px-4 py-2 rounded-lg transition-all text-gray-400 hover:bg-[#1A1428]/50 hover:text-gray-100">
                            Inbox
                        </a>
                        
                        <a href="outbox.php" 
                                                        class="flex items-center gap-3 px-4 py-2 rounded-lg transition-all text-gray-400 hover:bg-[#1A1428]/50 hover:text-gray-100">
                            Outbox
                        </a>
                        
                        
                        
                        <a href="support.php" 
                                                        class="flex items-center gap-3 px-4 py-2 rounded-lg transition-all text-gray-400 hover:bg-[#1A1428]/50 hover:text-gray-100">
                            Compose
                        </a>
                    </div>
                </div>


            <div x-data="{ open: false }">
                <form action="https://trade.helplabs.cloud/logout.php" method="POST">
                      <button type="submit" 
                        class="block w-full bg-gradient-to-r from-[red] to-[#2FE6DE]/80 text-black text-sm font-medium py-2.5 px-4 rounded-lg hover:brightness-110 transition-all text-center">
                        <i class="fas fa-sign-out-alt w-5 h-5"></i>
                        <span>Logout</span>
                    </button>
                </form> </div>




                                                       
                                                    </div>
                                                    
                                                    
                                                    
                                                    
                                                    
                                                    
                                                    
                                                    
                    </nav>
                </div>
                </div>
                
                
                
                
                
                
                
                

           

           
               
           
        </div>
    </div>
</div>
<script>
    // Mobile Sidebar Toggle
    document.addEventListener('DOMContentLoaded', function() {
        const mobileSidebar = document.getElementById('mobileSidebar');
        const closeMobileSidebar = document.getElementById('closeMobileSidebar');
        
        // Close button click
        closeMobileSidebar.addEventListener('click', function() {
            mobileSidebar.classList.add('hidden');
        });

        // Close on outside click
        mobileSidebar.addEventListener('click', function(e) {
            if (e.target === mobileSidebar) {
                mobileSidebar.classList.add('hidden');
            }
        });
    });
</script>
    <script>
        document.addEventListener('DOMContentLoaded', () => {
            lucide.createIcons();

            window.locale = 'en';
            window.translations = "investment";
        });

        function setupDropdown(triggerId, menuId) {
            const trigger = document.getElementById(triggerId);
            const menu = document.getElementById(menuId);

            if (trigger && menu) {
                trigger.addEventListener('click', (e) => {
                    e.stopPropagation();
                    menu.classList.toggle('hidden');
                });

                document.addEventListener('click', (e) => {
                    if (!menu.contains(e.target)) {
                        menu.classList.add('hidden');
                    }
                });
            }
        }

        setupDropdown('languageDropdown', 'languageMenu');
        setupDropdown('notificationDropdown', 'notificationMenu');
        setupDropdown('userDropdown', 'userMenu');
    </script>
      <script>
    document.addEventListener('DOMContentLoaded', function() {
        // Simulate loading progress
        const progressBar = document.getElementById('loader-progress');
        let width = 0;
        const interval = setInterval(function() {
            if (width >= 100) {
                clearInterval(interval);
                // Hide loader when loading is complete
                setTimeout(function() {
                    const loader = document.getElementById('site-loader');
                    if (loader) {
                        loader.classList.add('opacity-0');
                        setTimeout(function() {
                            loader.style.display = 'none';
                        }, 500);
                    }
                }, 200);
            } else {
                width += Math.floor(Math.random() * 10) + 1;
                if (width > 100) width = 100;
                if (progressBar) progressBar.style.width = width + '%';
            }
        }, 150);
    });
</script>
    <script src="livewire/livewire.min.js?id=cc800bf4"   data-csrf="ZYX5TIZgMGxCAhfOsH5GKhGqRe3HCsXusJ2EeNQd" data-update-uri="/livewire/update" data-navigate-once="true"></script> 
    <script>
    // Initialize Lucide/Font Awesome icons if not already initialized
    if (typeof lucide !== 'undefined') {
        lucide.createIcons();
    }
</script>
<script>
    if (typeof lucide !== 'undefined') {
        lucide.createIcons();
    }
</script>
<script>
    // Mobile menu toggle functionality
    document.addEventListener('DOMContentLoaded', function() {
        const mobileMenuToggle = document.getElementById('mobileMenuToggle');
        const mobileSidebar = document.getElementById('mobileSidebar');
        const closeMobileSidebar = document.getElementById('closeMobileSidebar');

        if (mobileMenuToggle && mobileSidebar && closeMobileSidebar) {
            // Toggle menu
            mobileMenuToggle.addEventListener('click', () => {
                mobileSidebar.classList.toggle('hidden');
            });

            // Close menu
            closeMobileSidebar.addEventListener('click', () => {
                mobileSidebar.classList.add('hidden');
            });

            // Close on outside click
            mobileSidebar.addEventListener('click', (e) => {
                if (e.target === mobileSidebar) {
                    mobileSidebar.classList.add('hidden');
                }
            });
        }
    });
</script>








  <!-- Font Awesome (for icons) -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.0/css/all.min.css" />

<!-- Styles -->
<style>
  #multiChatBtn {
      position: fixed;
      top: 50%;
      right: 20px;
      transform: translateY(-50%);
      background-color: blue;
      border-radius: 50%;
      width: 50px;
      height: 45px;
      border: none;
      cursor: pointer;
      z-index: 9999;
      box-shadow: 0 4px 10px rgba(0,0,0,0.2);
      font-size: 28px;
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
  }

  #multiChatPopup {
      position: fixed;
      top: 50%;
      right: 90px;
      transform: translateY(-50%);
      width: 250px;
      background: white;
      border-radius: 10px;
      box-shadow: 0 4px 20px rgba(0,0,0,0.3);
      padding: 10px;
      max-height: 300px;
      overflow-y: auto;
      display: none;
      z-index: 9999;
      font-family: Arial, sans-serif;
      font-size: 14px;
  }

  #multiChatPopup h4 {
      background-color: #b58ee3;
      color: white;
      margin: -10px -10px 8px -10px;
      padding: 8px;
      border-top-right-radius: 10px;
      font-size: 15px;
  }

  #multiChatPopup p {
      color: #444;
      font-size: 11px;
      margin-bottom: 50px;
  }

  .chat-icons {
      display: flex;
      justify-content: space-around;
      margin-top: 8px;
  }

  .chat-icons a {
      width: 55px;
      height: 55px;
      border-radius: 50%;
      display: inline-flex;
      justify-content: center;
      align-items: center;
      text-decoration: none;
      color: white;
  }

  .chat-icons a.whatsapp { background-color: #25D366; }
  .chat-icons a.telegram { background-color: #0088cc; }
  .chat-icons a.messenger { background-color: #0078FF; }

  .chat-icons i {
      font-size: 25px;
  }
</style>

<!-- Floating Chat Button -->
<button id="multiChatBtn" title="Open Chat"><img src="CHAT/chat.png" alt="Messenger" style="width: 100%; height: 100%; border-radius: 20%;"></button>

<!-- Popup Chat Box -->
<div id="multiChatPopup" aria-live="polite" role="dialog" aria-hidden="true">
  <h4>LIVE-CHAT</h4>
  <p>Thanks for reaching out to <?php echo $domain_name ?>. <br />Click the button below to start chatting...</p>
  <div class="chat-icons">
    <!-- Replace with your actual links -->
    <a href="<?php echo $webmasta ?>" target="_blank" title="Messenger" class="messenger" rel="noopener noreferrer">
      <img src="CHAT/SMARTSUOO.png" alt="Messenger" style="width: 100%; height: 100%; border-radius: 50%;">
    </a>
  </div>
</div>

<!-- Toggle Script -->
<script>
  const multiChatBtn = document.getElementById("multiChatBtn");
  const multiChatPopup = document.getElementById("multiChatPopup");

  multiChatBtn.addEventListener("click", function () {
    if (multiChatPopup.style.display === "block") {
      multiChatPopup.style.display = "none";
      multiChatPopup.setAttribute("aria-hidden", "true");
    } else {
      multiChatPopup.style.display = "block";
      multiChatPopup.setAttribute("aria-hidden", "false");
    }
  });
</script>

  
  
  
  

<!--===========START=L=Translator===============================-->
  
  <!-- TRANSLATOR POPUP - Middle Right -->
<style>
/* Position the translator trigger */
.translator-trigger {
    position: fixed;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 9999;
    background-color: #f1f1f1;
    border-radius: 50%;
    padding: 12px;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Style for the translator container */
#ytWidget {
    position: fixed;
    top: 50%;
    left: 70px;
    transform: translateY(-50%);
    z-index: 9998;
    display: none;
}

/* Additional translator widget styles */
#yt-widget .yt-listbox__col {
    display: block !important;
    list-style: none;
    vertical-align: top;
    max-width: 90% !important;
}
.yt-listbox {
    min-width: 200px !important;
    max-width: 500px !important;
    max-height: 500px !important;
    padding: 10px 10px !important;
    overflow: auto !important;
}
#yt-widget.yt-state_bottom .yt-listbox {
    bottom: unset !important;
}
.yt-listbox li {
    display: block !important;
}
.yt-servicelink {
    display: none !important;
}
</style>

<!-- Translator Trigger Icon -->
<div class="translator-trigger" onclick="toggleTranslator()">
    🌐
</div>

<!-- Translator Container -->
<div id="ytWidget"></div>

<!-- Yandex Translator Script -->
<script src="https://translate.yandex.net/website-widget/v1/widget.js?widgetId=ytWidget&pageLang=en&widgetTheme=light&autoMode=true" type="text/javascript"></script>

<!-- Toggle Script -->
<script>
function toggleTranslator() {
    const widget = document.getElementById("ytWidget");
    widget.style.display = widget.style.display === "none" || widget.style.display === "" ? "block" : "none";
}
</script>
<!--===========end==Translator===============================-->


  

</body>

</html>