#chat{
    position: fixed;
    bottom: 0;
    top:100%!important;
    left: 25px;
    background: #FFF;
    width: 300px;
    z-index: 10002;
    box-shadow: 1px 0 10px #826fc0;
    border-top-left-radius: 5px;
    border-top-right-radius: 5px;
}
.chat-title{
  padding: 15px;
  line-height: 100%;
  font-size: 14px;
  font-weight: bold;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.chat-status{
    position:relative;
    border-bottom:1px solid #E5E5E5;
    height:50px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.chat-close{
  margin-right: 10px;
  cursor:pointer;
}


.tab-buttons .chat__link.tab{
    border:none;
    background:none;
}
.user-short i.chat-min{
    color:#826fc0;
}
/*.chat-min, .chat-max {
    width: 30px;
    height: 30px;
    position:absolute;
    right:10px;
    bottom:10px;
    top:10px;
    cursor:pointer;
}*/
#chat.opened{
    top:100px!important;
    height:auto;
    left:50px;
    width:600px;
    max-width:100%;
}

#chat .module,
#chat .module .chat {
  height: 100%;
}

#chat .module .chat .chat-wrapper {
    max-height: 100%;
}

#chat ::-webkit-scrollbar-button {
  background-image: none;
  background-repeat: no-repeat;
  width: 5px;
  height: 0px;
}

#chat ::-webkit-scrollbar-track {
  background-color: #ecedee;
}

#chat ::-webkit-scrollbar-thumb {
  -webkit-border-radius: 0px;
  border-radius: 0px;
  background-color: dodgerblue;
}

#chat ::-webkit-scrollbar-thumb:hover {
  background-color: #56999f;
}

#chat ::-webkit-resizer {
  background-image: none;
  background-repeat: no-repeat;
  width: 4px;
  height: 0px;
}

#chat ::-webkit-scrollbar {
  width: 4px;
}

#chat hr {
  margin: 0;
}

.chat__links {
  display: flex;
  width: 100%;
  padding: 2px;
}

.chat__link {
  width: 33.3%;
  height: 30px;
  display: flex;
  justify-content: center;
  align-items: center;
}

.chat__link > i {
  font-size: 18px;
  color: #666;
}

.chat__link.active > i {
  color: #a89cee;
}

.chat__close-btn {
  font-size: 24px;
  position: absolute;
  top: 0;
  right: 0px;
  width: 0px;
  opacity: 0;
  height: 50px;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: -5;
  transition: 0.2s;
}

#chat.opened .chat__close-btn {
  right: -50px;
  width: 50px;
  opacity: 1;
  transition: 0.2s;
}

#chat .chat-status{
    z-index: 500;
}

.chat-wrapper{
  position: absolute;
  top: 50px;
  left: 0;
  bottom: 0;
  right: 0;
  background: #fff;
}

.chat__body-wrapper {
  height: 100%;
  position: relative;
}

.chat__body.tab-content.contacts{
  overflow-y: auto;
  height: calc(100% - 50px);
  min-height: 1px;
  margin-bottom: 50px;
  padding-top: 35px;
}

.contacts__search-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    background-color: #fff;
    height: 30px;
    padding: 0 10px;
    display: flex;
    align-items: center;
}

.contacts__search-wrapper input{
    width: 100%;
    height: 100%;
}

.chat__body.contacts .chat__user img {
  max-width: 30px;
  margin-right: 10px;
  border-radius: 50%;
}

.chat__body.contacts .chat__user {
  display: flex;
  align-items: center;
  font-size: 14px;
  background-color: #a89cee38;
  margin-bottom: 5px;
  padding: 10px; 
  text-overflow: ellipsis;
}

.chat__body.tab-content{
    border:none;
    background:#f8f6ff;
    padding:0;
    margin:0;
    height:100%;
}
.chat__room:hover, .chat__room:hover span{
   background:#826fc0;
   color:#FFF;
}

.chat__conversation{
    height:100%;
    position:relative;
    padding:10px;
    background:#f8f6ff;
    padding-bottom:80px;
}
.chat__conversation-content{
    height:100%;
    background:#FFF;
    overflow-y:auto;
    padding:10px;
}
.chat__conversation-input{
    width:100%;
    bottom:0;
}
#chat-input{
    float:left;
    width:Calc(100% - 51px);
    resize:none;
    padding:10px;
    font:inherit;
    font-size:12px;
    color:#888;
    border: 1px solid #E5E5E5;
    border-right: none;
}
.chat__conversation-input button{
    float:left;
    width:50px;
    height:50px;
}
.chat__message{
    float:left;
    width:70%;
    border-radius:4px;
    padding:10px;
}
.chat__message.message-own{
    float:right;
}
.chat__message.message-system{
    float: left;
    margin-left: 15%;
}
.chat__message-body{
    position:relative;
    margin-left:45px;
    min-height:40px;
    background:#F3F3F3;
    border-radius:4px;
    padding:10px;
    padding-bottom:20px;
    font-size: 12px;
    line-height: 150%;
}
.chat__message-date{
    position:absolute;
    right:10px;
    bottom:10px;
    font-size:10px;
    color:#666;
    line-height:0;
}
.chat_conversation-info{
    margin:0;
    padding:3px;
    font-size:8px;
    color:#666;
    display:block;
    min-height:16px;
}
.chat__room{
    padding:10px;
    border-bottom:1px solid #E5E5E5;
    position:relative;
}
.chat__new{
  position: absolute;
  top: 7px;
  left: 7px;
  /* font-size: 12px; */
  width: 16px;
  height: 16px;
  font-size: 10px;
  color: #FFF;
  text-align: center;
  padding-top: 9px;
  line-height: 0;
  background: red;
  border-radius: 50%;
}
.chat__message.message-own .chat__message-avatar{
    display:none;
}
.chat__name{
  max-width: Calc(100% - 80px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size:13px;
  font-weight: bold;
}
.chat__search{
  display:flex;
  position:relative;
}
.chat__search-clear{
    position: absolute;
    right: 10px;
    top: 12px;
    border-radius: 50%;
    background: #FFF;
    padding: 5px;
    text-align: center;
    font-size: 9px;
    width: 21px;
    box-shadow: 1px 0 4px #ccc;
    color: gray;
    cursor:pointer;
}
.chat__search input{
    border: 1px solid #E5e5e5;
    border-left: none;
    border-right: none;
    padding: 15px;
    border-top: none;
    background:#f3f3f3;
}
.chat__search input:focus{
    background: #FFF;
}
.chat-close{
  color: red;
    font-size: 12px;
    line-height: 100%;
    width: auto;
    padding-top: 18px;
    padding-right: 15px;
    height: 100%;
    margin-right: 0;
}
.chat-close i{
    float:left;
    margin-right:5px;
}
.chat__last{
    position:absolute;
    bottom:15px;
    right:10px;
    font-size:10px;
    color:#666;
}
.chat__room{
    cursor: pointer;
    font-size: 14px;
    line-height: 100%;
    padding:15px;
    padding-left:30px;
}
.chat__out{
    font-size:12px;
    margin-left:10px;
    color: rgb(253, 145, 145);  
    cursor:pointer;
}
.chat__out:hover{
    color:red;
}
.chat__message-author{
    white-space: nowrap;
    overflow:hidden;
    text-overflow: ellipsis;
    line-height: 100%;
    font-weight: bold;
    color: #a89cee;
    font-size: 10px;
}
.chat-blink{
  animation-name: blink;
  animation-timing-function: linear;
  animation-duration: 1s;
  animation-iteration-count: infinite;
}
.chat-back{
    color: #826fc0;
    line-height: 100%;
    margin-right: 10px;
    cursor:pointer;
}
.chat-back i{
    float:left;
    margin-right:5px;
}





@keyframes blink {
  50% {
    opacity: 0;
  }
}