body .messages-content .message.typing span, body .messages-content .message.typing::after, body .chat {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

body .action-box::after, body .chat-title::after {
  content: "";
  display: block;
  clear: both;
}

@keyframes ball {
  0% {
    margin-top: 0;
  }
  20% {
    margin-top: 3px;
  }
  80% {
    margin-top: -5px;
  }
}
@keyframes pop {
  0% {
    transform: scale(0.0);
  }

  100% {
    transform: scale(1);
  }
}
.mCSB_container {
  margin: 0 !important;

}

.mCSB_scrollTools {
  margin-right: -3px;
}

* {
  outline: none;
}

/*
body, html {
  margin: 0;
  height: 100%;
  width: 100%;
}*/

/*
html {
  background: #bdc3c7;
  background: -webkit-linear-gradient(to right bottom, #bdc3c7, #2c3e50);
  background: linear-gradient(to right bottom, #bdc3c7, #2c3e50);
}*/


body .chat {
  width: 800px;
  height: 100vh;
  max-height: 800px;
  border-radius: 15px;
  background-color: rgba(0, 0, 0, 0.5);
  overflow: hidden;
}
body .chat-title {
  background-color: rgba(0, 0, 0, 0.3);
  width: 100%;
  height: 100px; /* not clear at the moment why the text field dissapear*/
}
body .chat-title h2 {
  margin: 40px 0;
  margin-left: 60px;
  padding: 0;
  color: #f0f0f0;
  font-weight: normal;
  font-size: 24px;
  display: inline-block;
  line-height: 30px;
}
body .chat-title .avatar {
  float: left;
  margin: 10px;
  padding: 0;
  width: 30px;
  height: 30px;
}
body .chat-title .avatar img {
  border-radius: 50%;
  width: 90px;
  height: 90px;
}
body .messages {
  width: 100%;
  height: calc(100% - 175px);
   bottom: 7px;/* important for the position of the text field*/
}
body .messages-content {
  width: 100%;
  height: 100%;
  overflow-y: auto;
  box-sizing: border-box;
}

/* Hide the scrollbar in WebKit browsers */
body .messages-content::-webkit-scrollbar {
    display: none;
}

body .messages-content {
    overflow: -moz-scrollbars-none; /* For Firefox */
    scrollbar-width: none; /* For Firefox */

}

body .messages-content .message {
  max-width: calc(100% - 76px);
  padding: 8px;
  margin: 100px 0 -85px 12px;
  border-radius: 5px;
  background-color: rgba(170, 187, 204, 0.1);
  color: #e3e3e3;
  float: left;
  font-size: 13px;
  position: relative;
  word-break: normal; /* Ensure breaks only happen at natural break points */
  overflow-wrap: break-word; /* Allow long words to break but only if necessary */
  clear: both;
  /*transition: height 0.8s ease, opacity 0.8s ease, margin 0.8s ease;  Smooth transition for height, opacity, and margin */
  transition: all 1.5s ease !important;  /* Use 'all' or specify properties you want to animate */
  animation: pop 1.2s forwards;
}

body .messages-content .message .timestamp {
  position: absolute;
  right: -40px;
  bottom: 7px;
  font-size: 12px;
  color: #bababa;
}
body .messages-content .message.personal {
  float: right;
  margin: 100px 12px -85px 0;
}
body .messages-content .message.personal .timestamp {
  right: auto;
  left: -40px;
}
body .messages-content .message.typing {
  width: 30px;
  height: 16px;
}
body .messages-content .message.typing::after {
  content: "";
  border-radius: 50%;
  width: 3px;
  height: 3px;
  background-color: white;
  transform: translate(-50%, -50%);
  animation: ball 1.2s infinite linear;
}
body .messages-content .message.typing span {
  width: 3px;
  height: 3px;
  transform: translate(-50%, -50%);
}
body .messages-content .message.typing span::before, body .messages-content .message.typing span::after {
  content: "";
  border-radius: 50%;
  width: 3px;
  height: 3px;
  position: absolute;
  background-color: white;
  animation: ball 1.2s infinite linear;
}
body .messages-content .message.typing span::before {
  left: 8px;
  animation-delay: 0.3s;
}
body .messages-content .message.typing span::after {
  right: 8px;
  animation-delay: -0.3s;
}


.action-box {
    display: flex;
    align-items: center; /* Center-align items vertically */
    background-color: rgba(0, 0, 0, 0.3);
    width: 100%;
      height: auto; /* Set to auto if specific height causes issues */
    margin-top: -5px;
}

.action-box-input {
    flex-grow: 1; /* Allow input to use available space */
    height: 60px;
    background-color: transparent;
    resize: none;
    color: white;
    margin-left: 5px; /* Minimal horizontal margin */
    margin-right: 10px;
}

.action-box-submit {
   width :60px ;
   height :62.5px ; /* Match textarea’s height for alignment */
   padding :7.5 px;
   background-color: #90EE90;
   }



body .action-box-input::-webkit-input-placeholder {
  line-height: 20px;
  font-size: 13px;
}

.messages-content {
    scroll-behavior: smooth; /* Enable smoothing if supported */
}

/* When fading out */
.fade-out {
  opacity: 0!important;
  height: 0 !important; /* You can adjust this to a small value if necessary */
  padding: 0!important; /* Adjust the padding if applicable */
  margin: 0!important; /* Adjust the margin if applicable */
  overflow: hidden !important; /* Prevent content overflow */

}