.ai_chatbox .connection_status {
  height: 21px;
  font-size: 13px;
  padding-top: 5.4px;
  padding-bottom: 4.8px;
  text-align: center;
  opacity: 0;
  background: #f9f9f9;
  transition: opacity 0.5s ease-out;
}

.ai_chatbox .connection_status.inactive_connection {
  background: rgb(165, 165, 165) !important;
  color: white;
  opacity: 1;
}

.ai_chatbox #chat-toggle {
  position: fixed;
  bottom: 70px;
  right: 20px;
  width: 98px;
  z-index: 9999;
  /* border: solid; */
}

.ai_chatbox #chat-toggle .toggle-button {
  background: #007bff;
  color: white;
  padding: 10px 15px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  font-size: 18px;
  width: 50px;
  margin-left: auto;
  margin-bottom: -4px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai_chatbox #chat-toggle .toggle-title {
  margin-right: 30px;
  margin-bottom: -18px;
  font-weight: bold;
}

.ai_chatbox .chat-widget {
  z-index: 9999;
  position: fixed;
  bottom: 120px;
  right: 20px;
  width: 300px;
  background: #f9f9f9;
  border: 1px solid #ccc;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ai_chatbox .chat-header {
  background-color: #007bff;
  color: white;
  padding: 10px;
  text-align: left;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.ai_chatbox .chat-body {
  height: 300px;
  overflow-y: auto;
  padding-bottom: 0;
  background: #f9f9f9;
  display: flex;
  flex-direction: column;
}

.ai_chatbox .message-container {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  margin-bottom: 8px;
}

.ai_chatbox .sent {
  align-items: flex-end;
}

.ai_chatbox .message-user {
  font-size: 12px;
  font-weight: bold;
  margin-bottom: 2px;
}

.ai_chatbox .message {
  max-width: 70%;
  padding: 6px;
  margin: 5px;
  margin-left: 0px;
  margin-right: 0px;
  border-radius: 5px;
  word-wrap: break-word;
  font-size: 14px;
}

.ai_chatbox .sent .message {
  background: #007bff;
  color: white;
  align-self: flex-end;
}

.ai_chatbox .received .message {
  background: #e0e0e0;
  color: black;
  align-self: flex-start;
}

.ai_chatbox .chat-footer {
  display: flex;
  padding: 10px;
  border-top: 1px solid #ccc;
  background: white;
}

.ai_chatbox .chat-input {
  flex-grow: 1;
  padding: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
}

.ai_chatbox .send-btn {
  background: #007bff;
  color: white;
  border: none;
  padding: 8px 12px;
  margin-left: 5px;
  cursor: pointer;
  border-radius: 4px;
}

.ai_typing {
  font-size: 10px;
  font-weight: normal;
  background: white;
  position: sticky;
  margin-top: auto;
  bottom: 0 !important;
  padding: 8px 10px;
  z-index: 10;
}

.poweerBy {
  display: flex;
  font-size: 11.5px;
  padding-left: 13px !important;
  background: white;
  padding-top: 5px;
  margin-bottom: 8px;
}

.poweerBy div {
  font-weight: bold;
  margin-left: 3px;
}

.ai_typing span {
  font-size: 13.5px;
  font-style: i;
}

@keyframes floatUpDown {

  0%,
  100% {
    transform: translateY(0);
  }

  50% {
    transform: translateY(-5px);
  }
}

.typing-indicator {
  display: flex;
  gap: 4px;
}

.typing-dot {
  width: 5px;
  height: 5px;
  background-color: #000000;
  border-radius: 50%;
  animation: floatUpDown 1.5s infinite ease-in-out;
  margin-top: auto;
  margin-bttom: auto;
}

.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;
}

.backslant {
  font-size: 13px;
  font-style: italic;
  transform: skewX(5deg);
}


@media (max-width: 600px) {
  .ai_chatbox .chat-header {
    background-color: #007bff;
    color: white;
    padding: 10px;
    text-align: left;
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .ai_typing span {
    font-size: 12px;
    font-style: i;
  }

  .ai_chatbox .chat-widget {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    position: fixed;
    top: 0;
    bottom: 0;
    right: 1%;
    left: 1%;
    height: 95vh;
    /* min-height: calc(99vh - 190px) !important; */
    width: 97%;
    background: #f9f9f9;
    border: 1px solid #ccc;
    border: solid;
    box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
  }

  .ai_chatbox .chat-body {
    height: calc(100% - 70px) !important;
    overflow-y: auto;
    padding-bottom: 0;

    background: #f9f9f9;
    display: flex;
    flex-direction: column;
  }

  .ai_chatbox .message-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 8px;
  }

  .ai_chatbox .sent {
    align-items: flex-end;
  }

  .ai_chatbox .message-user {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 2px;
  }

  .ai_chatbox .message {
    max-width: 70%;
    padding: 6px;
    margin: 5px;
    margin-left: 0px;
    margin-right: 0px;
    border-radius: 5px;
    word-wrap: break-word;
    font-size: 14px;
  }

  .ai_chatbox .sent .message {
    background: #007bff;
    color: white;
    align-self: flex-end;
  }

  .ai_chatbox .received .message {
    background: #e0e0e0;
    color: black;
    align-self: flex-start;
  }

  .ai_chatbox .chat-footer {
    display: flex;
    padding: 10px;
    border-top: 1px solid #ccc;
    background: white;
  }

  .ai_chatbox .chat-input {
    flex-grow: 1;
    padding: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
  }

  .ai_chatbox .send-btn {
    background: #007bff;
    color: white;
    border: none;
    padding: 8px 12px;
    margin-left: 5px;
    cursor: pointer;
    border-radius: 4px;
  }

  .ai_typing {
    font-size: 10px;
    font-weight: normal;
    background: white;
    position: sticky;
    margin-top: auto;
    bottom: 0 !important;
    padding: 8px 10px;
    z-index: 10;
  }

  .ai_chatbox #chat-toggle .toggle-button {
    background: #007bffcf;
    color: white;
    padding: 10px 15px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 18px;
    width: 50px;
    margin-left: auto;
    margin-bottom: -4px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .ai_chatbox #chat-toggle {
    position: fixed;
    bottom: 70px;
    right: 20px;
    width: 98px;
    z-index: 9999;
    /* border: solid; */
  }


  .ai_chatbox .connection_status {
    height: 21px;
    font-size: 13px;
    padding-top: 5.4px;
    padding-bottom: 4.8px;
    text-align: center;
    opacity: 0;
    background: #f9f9f9;
    transition: opacity 0.5s ease-out;
  }

  .ai_chatbox .connection_status.inactive_connection {
    background: rgb(165, 165, 165) !important;
    color: white;
    opacity: 1;
  }

  .ai_chatbox #chat-toggle .toggle-title {
    margin-right: 30px;
    margin-bottom: -18px;
    font-weight: bold;
    font-size: 14px;
  }

  .poweerBy {
    font-size: 11.5px;
    padding-left: 13px !important;
    background: white;

  }

  .poweerBy div {
    font-weight: bold;
  }
}