:root {
    --msger-bg: #ffffff;
    --border: 2px solid #ddd;
    --left-msg-bg: #ececec;
    --right-msg-bg: #0078ff;
    --color-bg: 0, 120, 255; 
}

body{
  position: relative;
}
  
.chatbot{
  display: none;
  position: fixed;
  z-index: 9999;
  background: none;
  height: auto;
  max-height: 440px;
  bottom: 125px;
  right: 30px;
  transform: translateY(10%); 
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0;
}

#chatbot.show {
  transform: translateY(0); /* Move to visible position */
  opacity: 1;
}

#chatbot.hide {
  transform: translateY(10%); /* Move to below the screen */
  opacity: 0;
}

.msger {
    display: flex;
    flex-flow: column;
    justify-content: space-between;
    font-family: Helvetica, sans-serif;
    width: 500px;
    max-width: 500px;
    max-height: 400px;
    border: var(--border);
    border-radius: 30px;
    background: var(--msger-bg);
    box-shadow: 0 15px 15px -5px rgba(0, 0, 0, 0.2);
}
  
.msger-header {
    font-size: medium;
    border-top-left-radius: 30px;
    border-top-right-radius: 30px;
    justify-content: space-between;
    padding: 10px;
    text-align: center;
    border-bottom: var(--border);
    background: var(--right-msg-bg);;
    color: #fff;
  }
  
  .msger-chat {
    flex: 1;
    overflow-y:auto;
    padding: 10px;
  }

  .msger-chat::-webkit-scrollbar {
    width: 6px;
  }

  .msger-chat::-webkit-scrollbar-track {
    background: none;
  }

  .msger-chat::-webkit-scrollbar-thumb {
    background: #bdbdbd;
    border-radius: 30px;
  }

  .msg {
    display: flex;
    align-items: flex-end;
    margin-bottom: 10px;
  }
  
  .msg-img {
    width: 50px;
    height: 50px;
    margin-right: 10px;
    background: #eee;
    background-image: url("../img/chatbot/moving-message.svg");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-radius: 50%;
  }

  .msg-bubble {
    max-width: 300px;
    padding: 15px;
    border-radius: 15px;
    word-wrap: break-word;
    background: var(--left-msg-bg);
  }

  .msg-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
  }

  .left-msg .msg-bubble {
    border-bottom-left-radius: 0;
  }
  
  .right-msg {
    flex-direction: row-reverse;
  }
  .right-msg .msg-bubble {
    background: rgba(var(--color-bg), .8);
    color: #fff;
    border-bottom-right-radius: 0;
  }
  .right-msg .msg-img {
    margin: 0 0 0 10px;
  }
  
  .msger-inputarea {
    display: flex;
    padding: 5px;
    margin: 10px;
    border-radius: 10px;
    align-items: center;
    background:rgba(var(--color-bg), .8);
  }
  .msger-inputarea * {
    padding: 5px;
    border: none;
    font-size: 1.1em;
    color: #fff;
  }
  .msger-input {
    overflow: hidden;
    flex: 1;
    background: none;
    height: 20px;
    resize: none;
    outline: none;
    line-height: 1;
    font-family: Helvetica, sans-serif;
  }

  .msger-input::placeholder {
    color: #ddd;
    opacity: .8; 
  }

  .msger-send-btn {
    font-size: 1.5rem;
    border-radius: 3px;
    margin-left: 10px;
    cursor: pointer;
    background: rgba(0, 120, 255, .2);
  }
  .msger-send-btn:hover {
    background: rgba(0, 120, 255, .4);
  }

   .powerdby{
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 40px;
    border-top: var(--border);
    border-bottom-right-radius: 30px;
    border-bottom-left-radius: 30px;
    background-color: var(--right-msg-bg);
    color: #fff;
   }

   .powerdby div a, .powerdby div a:hover, .powerdby div a::after, .powerdby div a:active{
    color: #fff;
   }

   /* -----chat button ---- */
   .chat-button {
    position: fixed;
    bottom: 40px;
    right: 35px;
    background-image: url("../img/chatbot/moving-message.svg");
    background-color: var(--left-msg-bg) ;
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    color: white;
    border: none;
    border-radius: 50%;
    padding: 15px;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    font-size: 18px;
    height: 70px;
    width: 70px;
    transition: background-image 0.3s ease;
    outline: none;
}
.chat-button:focus {
  outline: none; 
}


/* ----------------------notification msg ---------------------- */

.notification-chatbot {
  width: 300px;
  padding: 15px;
  background-color: #ececec;
  color: #000;
  border-radius: 15px 15px 5px 15px;
  position: fixed;
  box-shadow: 0 4px 20px rgba(0, 120, 255, .4);
  font-family: Helvetica, sans-serif;
  display: none;
  bottom: 130px;
  right: 50px;
  z-index: 9999;
}

.notification-chatbot::after {
  content: '';
  position: absolute;
  bottom: -10px;
  right: 10px;
  width: 0;
  height: 0;
  border-left: 10px solid transparent;
  border-right: 10px solid transparent;
  border-top: 10px solid #ececec;
}

.notification-chatbot .close-btn-chatbot {
  position: absolute;
  top: 10px;
  right: 10px;
  cursor: pointer;
  font-size: 18px;
  color: var(--right-msg-bg);
  background: none;
  border: none;
  outline: none;
}

.notification-chatbot .close-btn-chatbot:hover {
  color: #ff6f6f;
}

@media (max-width: 480px) {
  .chatbot{
    max-width: 90%;
  }
  .msger{
    max-width: 100%;
  }
  .msg-bubble {
    max-width: 200px;
  }
}