<!DOCTYPE html>
<html lang="bn">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>নগর ডিজিটাল সেবা</title>
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">
  
  <!-- সোলায়মান লিপি ফন্ট লোড -->
  <link href="https://fonts.maateen.me/solaiman-lipi/font.css" rel="stylesheet">

  <style>
    body {
      font-family: 'SolaimanLipi', Arial, sans-serif; /* Apply Solaiman Lipi font */
      margin: 0;
      padding: 0;
      background-color: #f4f4f4;
    }

    .whatsapp-btn {
      font-family: 'SolaimanLipi', Arial, sans-serif; /* Apply font to button */
      position: fixed;
      bottom: 20px;
      right: 20px;
      background-color: #25d366;
      color: white;
      padding: 10px 20px; /* Add padding for a rectangular shape */
      border-radius: 15px; /* Create rounded edges */
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
      z-index: 1000;
      cursor: pointer;
      border: none;
      display: flex;
      align-items: center;
      justify-content: center;
    }

    .whatsapp-btn i {
      margin-right: 10px; /* Keep space for the icon */
      font-size: 24px; /* Set icon size */
    }

    .whatsapp-chat-box {
      display: none;
      position: fixed;
      bottom: 90px;
      right: 20px;
      width: 300px;
      background-color: white;
      border-radius: 10px;
      box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
      z-index: 1000;
    }

    .whatsapp-header {
      font-family: 'SolaimanLipi', Arial, sans-serif; /* Apply font to header */
      background-color: #25d366;
      color: white;
      padding: 10px;
      border-radius: 10px 10px 0 0;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }

    .logo-container {
      position: relative; /* Set position relative to parent for absolute positioning of circle */
      display: inline-block; /* Keep the logo and circle aligned */
    }

    .logo-container .logo-circle {
      position: absolute;
      top: -5px; /* Positioning of circle */
      left: -5px; /* Positioning of circle */
      width: 70px; /* Width of the black circle */
      height: 70px; /* Height of the black circle */
      border-radius: 50%; /* Make it circular */
      background-color: black; /* Black background */
      z-index: -1; /* Ensure the circle is behind the logo */
    }

    .whatsapp-header img {
      width: 50px; /* Increased width of the logo */
      height: 50px; /* Increased height of the logo */
      border-radius: 50%; /* Keep logo round */
      margin-right: 10px; /* Space between logo and text */
    }

    .whatsapp-header .company-info {
      margin-left: 10px;
    }

    .whatsapp-header .company-info h3 {
      margin: 0;
      font-size: 15px; /* Increased font size */
      font-weight: bold; /* Make text bold */
      color: white; /* Change text color to white */
    }

    .whatsapp-header .company-info p {
      margin: 0;
      font-size: 12px;
    }

    .close-btn {
      background-color: transparent;
      border: none;
      color: white;
      font-size: 20px;
      cursor: pointer;
    }

    /* WhatsApp Background */
    .whatsapp-body {
      font-family: 'SolaimanLipi', Arial, sans-serif; /* Apply font to chat body */
      padding: 10px;
      background-image: url('https://i.ibb.co/ZztRSqV/Default-Whats-App-background-for-people-who-lost-it-Requested-by-u-Marvin-der-kuhle.jpg');
      background-repeat: repeat;
      background-size: cover;
    }

    .operator-info {
      display: flex;
      align-items: center;
      margin-bottom: 10px;
    }

    .operator-info img {
      width: 30px;
      height: 30px;
      border-radius: 50%;
      margin-right: 10px;
    }

    .operator-info .operator-name {
      font-weight: bold;
      font-size: 14px;
      margin: 0;
    }

    .whatsapp-body p {
      margin: 10px 0;
      background-color: #f1f1f1;
      padding: 10px;
      border-radius: 5px;
      display: inline-block;
    }

    .whatsapp-footer {
      font-family: 'SolaimanLipi', Arial, sans-serif; /* Apply font to footer */
      background-color: #f1f1f1;
      padding: 10px;
      border-radius: 0 0 10px 10px;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    .whatsapp-footer input {
      flex: 1;
      padding: 10px;
      border: 1px solid #ccc;
      border-radius: 5px;
      margin-right: 10px; /* Space between input and button */
    }

    .whatsapp-footer button {
      background-color: #25d366;
      color: white;
      border: none;
      border-radius: 5px;
      padding: 10px;
      cursor: pointer;
      font-size: 16px;
    }

    .whatsapp-footer button:hover {
      background-color: #128c7e;
    }
  </style>
</head>
<body>

  <div class="whatsapp-chat-box" id="whatsappChatBox">
    <div class="whatsapp-header">
      <div class="logo-container">
        <div class="logo-circle"></div> <!-- Black circle around the logo -->
        <img src="assets/images/logos/1.png" alt="ENGAGE"> <!-- Updated logo link -->
      </div>
      <div class="company-info">
        <h3><strong>নগর ডিজিটাল সেবা</strong></h3> <!-- Bolded text -->
        <p>Typically replies in a minute</p>
      </div>
      <button class="close-btn" onclick="closeChatBox()">&times;</button>
    </div>
    <div class="whatsapp-body">
      <div class="operator-info">
     <!--   <img src="https://i.postimg.cc/QN5XbNJL/IMG-20241123-132643-194.jpg" alt="ENGAGE">
        <p class="operator-name">ADMIN</p>    -->
      </div>
      <p>Hi!<br>How can I help you?</p>
    </div>
    <div class="whatsapp-footer">
      <input type="text" id="smsInput" placeholder="এখানে আপনার বার্তা লিখুন..." /> <!-- SMS input box -->
      <button onclick="sendSms()">Send</button> <!-- Send button -->
    </div>
  </div>

  <button class="whatsapp-btn" onclick="openChatBox()">
    <i class="fab fa-whatsapp"></i> WhatsApp Us
  </button>

  <script>
    function openChatBox() {
      document.getElementById("whatsappChatBox").style.display = "block";
    }

    function closeChatBox() {
      document.getElementById("whatsappChatBox").style.display = "none";
    }

    function sendSms() {
      const smsInput = document.getElementById("smsInput");
      const message = smsInput.value;

      if (message) {
        // Encode the message for the URL
        const encodedMessage = encodeURIComponent(message);
        const phoneNumber = '8801605578459'; // Replace with your WhatsApp number
        const whatsappUrl = `https://wa.me/${phoneNumber}?text=${encodedMessage}`;

        // Open the WhatsApp chat with the pre-filled message
        window.open(whatsappUrl, '_blank');
        
        smsInput.value = ''; // Clear the input box after sending
      } else {
        alert('অনুগ্রহ করে বার্তা লিখুন।'); // Alert if the input is empty
      }
    }
  </script>

</body>
</html>
