@import url("https://fonts.googleapis.com/css2?family=Inter:opsz,wght@14..32,100..900&display=swap");



#chatbot-toggler{
  position: fixed;
  bottom: 130px;
  right: 35px;
  border:none;
  cursor: pointer;
  height: 50px;
  width: 50px;
  border-radius: 50%;
  background: #5350C4;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: all 0.2s ease;
  z-index: 10000000000 !important;
}

:root[style*="--device: mobile"] #chatbot-toggler{
display: none;
}

body.show-chatbot #chatbot-toggler{
  transform: rotate(90deg);
}

#chatbot-toggler span{
  color: #fff;
  position: absolute;
}

body.show-chatbot #chatbot-toggler span:first-child,
#chatbot-toggler span:last-child{
  opacity: 0;
}

body.show-chatbot #chatbot-toggler span:last-child{
  opacity: 1;
}

.chatbot-popup {
  position: fixed;
  right: 35px;
  bottom: 190px;
  width: 420px;
  background: #fff;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 0 128px 0 rgba(0, 0, 0, 0.1),
    0 32px 64px -48px rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: all 0.1s ease;
    transform: scale(0.2);
    transform-origin: bottom right ;
    z-index: 10 !important;
}

body.show-chatbot .chatbot-popup{
  opacity: 1;
  pointer-events: auto;
  transform: scale(1);
}

.chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #5350c4;
  padding: 15px 22px;
}

.chat-header .header-info {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-info .chatbot-logo {
  height: 35px;
  width: 35px;
  background-color: #fff;
  border-radius: 50%;
  padding: 6px;
  fill: #5350c4;
  flex-shrink: 0;
}

.header-info .logo-text {
  color: #fff;
  font-size: 1.31rem;
  font-weight: 600;
}

.chat-header #close-chatbot {
  border: none;
  color: #fff;
  height: 40px;
  width: 40px;
  border-radius: 50%;
  background: none;
  font-size: 1.9rem;
  margin-right: -10px;
  padding-top: 2px;
  cursor: pointer;
  transition: 0.2 ease;
}

.chat-header #close-chatbot:hover {
  background: #3d39ac;
}

.chat-body {
  padding: 25px 22px;
  display: flex;
  gap: 20px;
  overflow-y: auto;
  flex-direction: column;
  height: 460px;
  margin-bottom: 82px;
  scrollbar-width: thin;
  scrollbar-color: #ccccf5 transparent;
}

.chat-body .message {
  display: flex;
  align-items: center;
  gap: 11px;
}

.chat-body .bot-message .bot-avatar {
  height: 35px;
  width: 35px;
  background-color: #5350c4;
  border-radius: 50%;
  padding: 6px;
  fill: #fff;
  flex-shrink: 0;
  align-self: flex-end;
  margin-bottom: 2px;
}

.chat-body .user-message {
  flex-direction: column;
  align-items: flex-end;
}

.chat-body .message .message-text {
  padding: 12px 16px;
  max-width: 75%;
  font-size: 0.95rem;
  background: #f2f2ff;
  word-wrap: break-word;
  word-break: break-word;
  overflow-wrap: break-word;
  white-space: normal;
}

.chat-body .bot-message.thinking .message-text {
  padding: 2px 16px;
}

.chat-body .bot-message .message-text {
  background: #f2f2ff;
  border-radius: 13px 13px 13px 3px;
  color: #000;
}
.chat-body .user-message .message-text {
  background: #5350c4;
  border-radius: 13px 13px 3px 13px;
  color: #fff;
}

.chat-body .bot-message .thinking-indicator {
  display: flex;
  gap: 4px;
  padding-block: 15px;
}

.chat-body .bot-message .thinking-indicator .dot {
  height: 7px;
  width: 7px;
  background: #6f6bc2;
  border-radius: 50%;
  animation: dotPulse 1.8s ease-in-out infinite;
}

.chat-body .bot-message .thinking-indicator .dot:nth-child(1) {
  animation-delay: 0.2s;
}
.chat-body .bot-message .thinking-indicator .dot:nth-child(1) {
  animation-delay: 0.3s;
}
.chat-body .bot-message .thinking-indicator .dot:nth-child(1) {
  animation-delay: 0.4s;
}

@keyframes dotPulse {
  0%,
  44% {
    transform: translateY(0);
  }
  28% {
    opacity: 0.4;
    transform: translateY(-4px);
  }

  44% {
    opacity: 0.2;
  }
}
.chat-footer {
  position: absolute;
  width: 100%;
  bottom: 0;
  background: #fff;
  padding: 15px 22px 20px;
}

.chat-footer .chat-form {
  position: relative;
  display: flex;
  align-items: center;
  background: #fff;
  outline: 1px solid #cccce5;
  border-radius: 32px;
}

.chat-footer .chat-form:focus-within {
  outline: 2px solid #5350c4;
}

.chat-form .message-input {
  border: none;
  outline: none;
  height: 47px;
  width: 100%;
  font-size: 0.95rem;
  padding: 14px 0 13px 18px;
  border-radius: inherit;
  resize: none;
  max-height: 180px;
  white-space: pre-line;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

.chat-form .message-input:hover{
  scrollbar-color: #ccccf5 transparent;
}

.chat-form .chat-controls {
  display: flex;
  height: 47px;
  align-items: center;
  align-self: flex-end;
  padding-right: 6px;
  gap: 3px;
}

.chat-form .chat-controls button {
  height: 35px;
  width: 35px;
  border: none;
  cursor: pointer;
  background: none;
  color: #706db0;
  border-radius: 50%;
  font-size: 1.15rem;
  transition: 0.2s ease;
}
.chat-form .chat-controls #send-message {
  background: #5350c4;
  color: #fff;
  display: none;
}

.chat-form .message-input:valid ~ .chat-controls #send-message {
  display: block;
}

.chat-form .chat-controls #send-message:hover {
  background: #3d39ac;
}

.chat-form .chat-controls button:hover {
  background: #f1f1ff;
}


em-emoji-picker{
    position: absolute;
    left: 50%;
    top: -337px;
    width: 100%;
    max-width:350px ;
    max-height: 330px;
    transform: translateX(-50%);
    visibility: hidden;
}

body.show-emoji-picker em-emoji-picker{
    visibility: visible;
}



@media(max-width: 520px){
  #chatbot-toggler{
    right:20px;
    bottom: 20px;
  }
  .chatbot-popup{
    right: 0;
    bottom: 0;
    height: 100%;
    border-radius: 0;
    width: 100%;
  }

  .chatbot-popup .chat-header{
    padding: 12px 15px;
  }

  .chat-body{
    height: calc(90% - 55px);
    padding: 25px 15px;
  }

  .chat-footer{
    padding: 10px 15px 15px;
  }


}