.chats *{
  transition:all .5s;
  box-sizing:border-box;
  -webkit-box-sizing:border-box;
  -moz-box-sizing:border-box;
}
/* .chats {
  margin:0;
  cursor:default;
  display: flex;
  flex-direction: column;
  height: 100%;
  left:0;
  right:0;
  bottom:0;
  top:0; */
  /* -webkit-touch-callout: none; iOS Safari */
  /* -webkit-user-select: none;   Chrome/Safari/Opera */
  /* -khtml-user-select: none;    Konqueror */
  /* -moz-user-select: none;      Firefox */
  /* -ms-user-select: none;       IE/Edge */
  /* user-select: none;   
} */
.chats ::-webkit-scrollbar {width: 6px; height:1px;transition:all .5s;z-index:10;}
.chats ::-webkit-scrollbar-track {background-color: white;}
.chats ::-webkit-scrollbar-thumb {
  background-color: #bec4c8; 
  border-radius:3px;
}
.chats .message{
  display:block;
  width:98%;
  padding:0.5%;
  cursor: pointer;
}
.chats .message p{
  margin:0;
}
.chats .sent, .chats .recv {
  max-width: 90%;
  word-wrap: break-word;
  margin-bottom: 3px;
  position: relative;
  padding: 7px 15px;
  color: white;
  border-radius: 12px;
  clear: both;
  font: 400 15px 'Open Sans', sans-serif;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
.chats .sent date, .chats .recv date {
  position: absolute; 
  top: -10px;
  padding: 7px 15px;
  font-size: 12px;
  white-space: nowrap;
  vertical-align: middle;
  color: #007bff; 
  opacity: 0;
  z-index: 4;
  background: #e1f5fe; 
  border-radius: 12px; 
  box-shadow: 0 1px .5px rgba(11, 20, 26, .13); 
  transition: opacity 0.5s, transform 0.5s;
}
.chats .sent:hover date, .chats .recv:hover date {
  opacity: 1;
  transform: translateY(-20px);
}
.chats .sent {
  background: #00e34d;
  color: white;
  float: right;
  clear: both;
  border-bottom-right-radius: 20px 0px\9;
}
.chats .sent:before {
  content: "";
  position: absolute;
  z-index: 1;
  bottom: -2px;
  right: -8px;
  height: 19px;
  border-right: 20px solid #00e34d;
  border-bottom-left-radius: 16px 14px;
  -webkit-transform: translate(0, -2px);
  transform: translate(0, -2px);
  border-bottom-left-radius: 15px 0px\9;
  transform: translate(-1px, -2px)\9;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
.chats .sent:after {
  content: "";
  position: absolute;
  z-index: 2;
  bottom: -2px;
  right: -42px;
  width: 12px;
  height: 20px;
  background: var(--background-color);
  border-bottom-left-radius: 10px;
  -webkit-transform: translate(-30px, -2px);
  transform: translate(-30px, -2px);
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
.chats .sent date {
  right:0;
}
.chats .sent date:before {
  content: "";
  position: absolute;
  z-index: 1;
  bottom: -2px;
  right: -8px;
  height: 19px;
  border-right: 20px solid #e1f5fe;
  border-bottom-left-radius: 16px 14px;
  -webkit-transform: translate(0, -2px);
  transform: translate(0, -2px);
  border-bottom-left-radius: 15px 0px\9;
  transform: translate(-1px, -2px)\9;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
.chats .sent date:after {
  content: "";
  position: absolute;
  z-index: 2;
  bottom: -2px;
  right: -42px;
  width: 12px;
  height: 20px;
  background: var(--background-color);
  border-bottom-left-radius: 10px;
  -webkit-transform: translate(-30px, -2px);
  transform: translate(-30px, -2px);
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
.chats .recv {
  background: #E5E5EA;
  color: black;
  float: left;
  clear:both;
  border-bottom-left-radius: 30px 0px\9;
}
.chats .recv:before {
  content: "";
  position: absolute;
  z-index: 2;
  bottom: -2px;
  left: -7px;
  height: 19px;
  border-left: 20px solid #E5E5EA;
  border-bottom-right-radius: 16px 14px;
  -webkit-transform: translate(0, -2px);
  transform: translate(0, -2px);
  border-bottom-right-radius: 15px 0px\9;
  transform: translate(-1px, -2px)\9;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
.chats .recv:after {
  content: "";
  position: absolute;
  z-index: 3;
  bottom: -2px;
  left: 4px;
  width: 26px;
  height: 20px;
  background: var(--background-color);
  border-bottom-right-radius: 10px;
  -webkit-transform: translate(-30px, -2px);
  transform: translate(-30px, -2px);
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
.chats .recv date {
  left:0;
}
.chats .recv date:before {
  content: "";
  position: absolute;
  z-index: 1;
  bottom: -2px;
  left: -7px;
  height: 19px;
  border-left: 20px solid #e1f5fe;
  border-bottom-right-radius: 16px 14px;
  -webkit-transform: translate(0, -2px);
  transform: translate(0, -2px);
  border-bottom-right-radius: 15px 0px\9;
  transform: translate(-1px, -2px)\9;
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
.chats .recv date:after {
  content: "";
  position: absolute;
  z-index: 2;
  bottom: -2px;
  left: 4px;
  width: 26px;
  height: 20px;
  background: var(--background-color);
  border-bottom-right-radius: 10px;
  -webkit-transform: translate(-30px, -2px);
  transform: translate(-30px, -2px);
  box-shadow: 0 1px .5px rgba(11,20,26,.13);
}
/* input styles */
.chats input {
  /* font: 400 13px 'Open Sans', sans-serif; */
  border: 0;
  padding: 0 15px;
  height: 40px;
  outline: 0;
}
.chats .input-container {
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  width: 100%;
  background: #f2f2f2;
  border-radius: 3px;
  /* box-shadow: 0 1px .5px rgba(11,20,26,.13); */
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
  text-decoration: none;
  color: #4d3252;  
  font-weight: bold;
  list-style: none;
  cursor: pointer;
  padding: 0 5px;
}
.chats .input-container .clear {
  display: none;
  background: #f2f2f2;
  border-radius: 3px;
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
  text-decoration: none;
  color: #007aff;
  font-weight: bold;
  list-style: none;
  cursor: pointer;
  font-size: 22px;
  padding:5px 10px;
  margin: 10px 5px 10px 10px;
  text-decoration: none;
  justify-content: center;
  align-items: center;
}
.chats .input-container .clear.active  {
  box-shadow: inset -3px -3px 7px #ffffff73, inset 3px 3px 5px rgba(94, 104, 121, 0.288);
}
.chats .input-container .clear:hover {
  background-color: #fff;
  border-radius: 3px;
}
.chats .chat-form textarea {
  font: 400 15px 'Open Sans', sans-serif;
  width: calc(100% - 120px);
  margin: 10px auto;
  background: #f2f2f2;
  border-radius: 3px;
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
  border: none;
  text-decoration: none;
  color: #4d3252;  
  outline: none;
  list-style: none;
  cursor: pointer;
  resize: vertical;
  padding: 10px; /* Add padding to all sides */
  box-sizing: border-box; /* Include padding in width calculation */
}
.chats .chat-form textarea:hover {
  display: block;  
  background-color: #fff;
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
  border-radius: 3px;
}
.chats .chat-form textarea.active  {
  box-shadow: inset -3px -3px 7px #ffffff73, inset 3px 3px 5px rgba(94, 104, 121, 0.288);
  /* font-size: 16px; */
}
form.chat-form input[type='submit'] {
  display: none;
  width: 60px;
  margin: 10px 0;
  /* padding: 10px; */
  font-size: 22px;
  font-weight: bold;
  color: #fff;
  background-color: #007aff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  box-shadow: -3px -3px 7px #ffffff73, 3px 3px 5px rgba(94, 104, 121, 0.288);
  text-decoration: none;
  justify-content: center;
  align-items: center;
}
form.chat-form input[type='submit'].active {
  background-color: #0055ff;
  border-radius: 5px;
  box-shadow: inset -3px -3px 7px #ffffff73, inset 3px 3px 5px rgba(94, 104, 121, 0.288);
}
form.chat-form input[type='submit']:hover {
  border-radius: 5px;
  background-color: #0055ff;
  /* box-shadow: inset -3px -3px 7px #ffffff73, inset 3px 3px 5px rgba(94, 104, 121, 0.288); */
}
.chats span.spinner{
  -moz-animation: loading-bar 1s 1;
  -webkit-animation: loading-bar 1s 1;
  animation: loading-bar 1s 1;
  display: block;
  height: 2px;
  background-color: #00e34d;
  transition: width 0.2s;
  position:absolute;
  top:0; left:0; right:0;
  z-index:4
}
@-moz-keyframes loading-bar {
  0% {
    width: 0%;
  }
  90% {
    width: 90%;
  }
  100% {
    width: 100%;
  }
}
@-webkit-keyframes loading-bar {
  0% {
    width: 0%;
  }
  90% {
    width: 90%;
  }
  100% {
    width: 100%;
  }
}
@keyframes loading-bar {
  0% {
    width: 0%;
  }
  90% {
    width: 90%;
  }
  100% {
    width: 100%;
  }
}
