.chat-popup {
    background-color: rgb(6, 156, 219);
    width: 70px;
    height: 70px;
    border-radius: 35px;
    position: fixed;
    bottom: 15px;
    left: 15px;
    color: #fff;
    line-height: 70px;
    font-size: 30px;
    text-align: center;
    z-index: 900;
    cursor: pointer;
}

.chat-popup:before {
    font-family: FontAwesome;
    content: "\f075";
}

.chat-popup[data-unread]:after {
    content: attr(data-unread);
    position: absolute;
    background-color: #c11e63;
    height: 25px;
    font-size: 15px;
    width: 25px;
    line-height: 25px;
    border-radius: 15px;
}

.chat {
    height: 500px;
    width: 350px;
    position: fixed;
    bottom: 100px;
    left: 15px;
    border: 2px solid rgb(6, 156, 219);
    border-top-width: 50px;
    border-radius: 15px;
    background-color: #fff;
    z-index: 900;
    max-height: calc(100vh - 115px);
    max-width: calc(100vw - 30px);
}

.chat.loading {
    font-size: 50px;
    text-align: center;
    line-height: 100px;
}

.chat.loading:after {
    font-family: FontAwesome;
    content: "\f1ce";
    animation: 2s fa-spin infinite linear;
    display: inline-block;
}

.chat .title {
    position: absolute;
    top: -50px;
    font-size: 20px;
    padding: 0 15px;
    line-height: 50px;
    color: #fff;
    width: 100%;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
}

.chat .title .new,
.chat .title .back {
    margin-right: 10px;
    border-radius: 50%;
    transition: 0.25s;
    width: 30px;
    height: 30px;
    line-height: 30px;
    text-align: center;
    cursor: pointer;
}

.chat .title .new:hover,
.chat .title .back:hover {
    background-color: #fff;
    color: rgb(6, 156, 219);
}

.chat .title .new {
    position: absolute;
    right: 0;
    top: 10px;
}

.chat .title img {
    height: 40px;
    width: 40px;
    position: absolute;
    top: 5px;
    right: 5px;
    border-radius: 20px;
    cursor: pointer;
}

.chat .messages,
.chat .users {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
}

.chat .messages .message {
    border-bottom: 2px solid rgb(6, 156, 219);
    padding: 10px;
    position: relative;
    height: 90px;
}

.chat .messages .message:last-of-type:not(:first-child) {
    border: none;
}

.chat .messages .message img {
    border-radius: 35px;
    height: 70px;
    width: 70px;
    float: left;
}

.chat .messages .message .status {
    position: absolute;
    height: 70px;
    line-height: 70px;
    width: 30px;
    text-align: center;
    font-size: 12px;
}

.chat .messages .message .status b {
    background-color: #c11e63;
    color: #fff;
    padding: 3px 6px;
    border-radius: 10px;
}

.chat .messages .message p {
    display: inline-block;
    margin: 0;
    padding-left: 30px;
    width: calc(100% - 70px);
    height: 70px;
    line-height: 70px;
    white-space: nowrap; 
    overflow: hidden;
    text-overflow: ellipsis;
    cursor: pointer;
}

.chat .messages .message span.user {
    position: absolute;
    top: 8px;
    left: 90px;
    font-size: 14px;
    font-weight: bold;
}

.chat .messages .message span.time {
    font-size: 12px;
    position: absolute;
    right: 5px;
    bottom: 2px;
}

.chat .input {
    border-top: 2px solid rgb(6, 156, 219);
    position: absolute;
    width: 100%;
    left: 0;
    bottom: 0px;
    padding: 5px;
}

.chat .input textarea {
    border: 0;
    width: calc(100% - 54px);
    min-width: calc(100% - 54px);
    max-width: calc(100% - 54px);
    height: 72px;
    min-height: 72px;
    max-height: 72px;
    padding: 7px 10px;
}

.chat .input button {
    position: absolute;
    right: 11px;
    top: 11px;
}

.chat .in-chat {
    padding: 5px;
    max-height: 100%;
    height: calc(100% - 91PX);
    overflow-y: auto;
    overflow-x: hidden;
}

.chat .in-chat .msg {
    margin: 5px;
    margin-right: 20px;
}

.chat .in-chat .msg .inner {
    border-radius: 10px;
    padding: 5px 10px 0px;
    display: inline-block;
    background-color: #d2ebf8;
    position: relative;
}

.chat .in-chat .msg .inner .time {
    font-size: 10px;
    color: #3c9cdc;
    white-space: nowrap;
    display: block;
    line-height: 10px;
    margin: 2px;
}

.chat .in-chat .msg.mine {
    text-align: right;
    margin-right: 5px;
    margin-left: 20px;
}

.chat .in-chat .msg.mine .inner {
    background-color: #eee;
}

.chat .search-users {
    width: 100%;
    padding: 5px;
}

.chat .search-users input {
    width: calc(100% - 60px);
}

.chat .search-users button {
    width: 60px;
    float: right;
}

.chat .max-height {
    height: 100%;
    max-height: 100%;
}

.chat .users {
    height: calc(100% - 48px);
    padding: 5px;
}

.chat .users .user {
    border-bottom: 2px solid rgb(6, 156, 219);
    position: relative;
    height: 40px;
    line-height: 40px;
    padding-left: 36px;
    cursor: pointer;
}

.chat .users .user:last-of-type {
    border-bottom: none;
}

.chat .users .user img {
    height: 32px;
    top: 3px;
    position: absolute;
    left: 0px;
}

.chat .no-messages {
    padding: 15px;
}


.media-left img {
    max-width: unset;
}
