/* chat window */
.chat_window{
    position: fixed;
    bottom: 0px;
    right: 10px;
    height: 380px;
    width: 320px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, .3);
    border-radius: 8px 8px 0px 0px;
    font-family: 'Roboto', sans-serif;
    font-weight: 300;
    transition: all 1s;
    background-color: white;
    z-index: 1000;
    box-sizing: content-box;
}

.chat_window *{
    box-sizing: content-box;
}

.chat_window.inactive{
    display: none;
}

.chat_window.window_collapsed{
    height: 50px;
    animation-name: chat_window_collapse_animation;
    animation-duration: 1s;
}

.chat_window.window_collapsed .chat_window_message_box{
    /* transition: padding 10s; */
    padding: unset;
    height: 0px !important;
}

.chat_window.window_collapsed .chat_window_footer{
    display: none;
}

@keyframes chat_window_collapse_animation {
  from {height: 380px;}
  to {height: 50px;}
}


/* chat window header */
.chat_window_header{
    height: 40px;
    box-shadow: 0 2px 1px rgba(0, 0, 0, .1);
    border-radius: 8px 8px 0px 0px;
    padding: 5px;
    cursor: pointer;
}

.chat_window_header .header_content{
    display:flex;
    justify-content:space-between;
    align-items: center;
}

.chat_window_header .header_info{
    display: flex;
    align-items: center;
}

.header_info .header_image{
    height: 40px;
    width: 40px;
    border-radius: 100%;
}

.chat_window_header .header_action{

}

.chat_window_header .header_title{
    margin-left: 8px;
    font-weight: 400;
    font-size: 17px;
    white-space: nowrap;
    overflow: hidden;
    width: 200px;
    text-overflow: ellipsis;
}



/* chat window footer */
.chat_window_footer{
    position: absolute;
    bottom: 0;
    width: 100%;
    border-top: 1px solid #c5c2c2;
    box-shadow: 0px -5px 10px -10px #c5c2c2;
}

.chat_window_footer .action_bar{

    height: 20px;
    background-color: #efefef85;
    padding: 5px 10px;
}

.action_bar i{
    font-size:20px;
    cursor:pointer;
    color:gray;
}

.action_bar i:hover{
    color: #0b7bfd;
}

.action_bar .action_bar_icons{
    display: flex;
    justify-content: space-between;
}

.chat_window_footer .input_box{

    min-height: 30px;
    background-color: #efefef85;
    cursor: text;
    padding: 10px 10px 5px 10px;
    max-height: 90px;
    overflow-y: auto;
    overflow-wrap: break-word;
}

.input_box:focus{
    outline: unset;
}

.input_box::after{

}

.chat_window_footer .input_box.placeholder::after{
    content: 'Type your message here...';
    color: gray;
}




/* chat window message box */
.chat_window .chat_window_message_box{
    padding: 10px;
    height: calc(100% - 90px - 35px - 20px );
    overflow-y: auto;
}

.chat_window_message_box .chat_start_div_indicator
  {
    text-align: center;
    padding: 5px;
    background-color: #ececec;
    color: gray;
    border-radius: 5px;
  }

.chat_window_message_box .single_message{
    /* max-width: 225px; */
    margin: 5px 2px;
    font-size: 14px;
    word-break: break-word;
    overflow-wrap: break-word;
}

.chat_window_message_box .message_date{
    text-align: center;
    border-bottom: 1px solid gray;
    line-height: 1px;
    margin: 20px 0px;
}

.chat_window_message_box .time_div{
    font-size: 12px;
}


.message_date_span{
    font-size: 13px;
    font-weight: 400;
    color: gray;
    padding: 2px 5px;
    border: 1px solid gray;
    border-radius: 10px;
    background-color: white;
}

.single_message.left{
    /* float: left; */
    /* direction: ltr; */
    margin-right: 50px;
}

.single_message.right{
    /* float: right; */
    /* direction: rtl; */
    margin-left: 50px;
    display: flex;
    justify-content: flex-end;
}

.single_message.right .time_div{
    text-align: right;
}

/* .single_message.right > *{
    display: flex;
} */

/* .single_message .text{
    border-radius: 20px;
    padding: 10px;
    margin: 2px 0px;
    width: fit-content;
}

.text-own{
    background-color: #0099ff;
    color: white;
    font-weight: 400;
}

.text-sender{
    background-color: #f1f0f0;
    font-weight: 300;
} */

.single_message .text{
      margin: 2px 0px;
      display: flex;
  }
  .text.start{
      justify-content: flex-start;
  }
  .text.end{
      justify-content: flex-end;
  }
  .text-own{
      padding: 10px;
      width: fit-content;
      background-color: #0099ff;
      color: white;
      font-weight: 400;
  }
  .text-sender{
      padding: 10px;
      width: fit-content;
      background-color: #f1f0f0;
  }
  .text:first-child .text-sender{
      border-radius: 15px 15px 15px 5px;
  }
  .text:nth-last-child(2):not(:first-child) .text-sender{
      border-radius: 5px 15px 15px 15px;
  }
  .text:not(:first-child):not(:nth-last-child(2)) .text-sender{
      border-radius: 5px 15px 15px 5px;
  }
  .text:first-child .text-own{
      border-radius: 15px 15px 5px 15px;
  }
  .text:nth-last-child(2):not(:first-child) .text-own{
      border-radius: 15px 5px 15px 15px;
  }

  .text:not(:first-child):not(:nth-last-child(2)) .text-own{
      border-radius: 15px 5px 5px 15px;
  }
