#chat-original {
    display: none;
}

#chat-wrapper {
    position: fixed;
    bottom: 0;
    right: 0;
    padding-right: 10px;
    font-family: 'Sintony',"Helvetica Neue",Helvetica,Arial,sans-serif;
}

input.chat-input {
    position: absolute;
    bottom: 0;
    width: 298px;
    border-radius: 0;
}
.module {
    width: 300px;
    border: 1px solid #333333;
    margin-left: 3px;
    position: relative;
    background: #e5e5e5;
}

.top-bar {
    background: #bdbdbd;
    color: white;
    padding: 0.5rem;
    position: relative;
    overflow: hidden;
}
.top-bar h1 {
    font-size: 1.2em;
    display: inline;
}

.top-bar > * {
    position: relative;
}
.top-bar::before {
    content: "";
    position: absolute;
    top: -100%;
    left: 0;
    right: 0;
    bottom: -100%;
    opacity: 0.25;
}

.module.has-unread-messages .top-bar::before {
    animation: pulse 1s ease alternate infinite;
    -webkit-animation: pulsate 1s ease;
    -webkit-animation-iteration-count: infinite;
    background: radial-gradient(#ffffff, #000000);
}

.module.has-unread-messages .top-bar,
.module.active .top-bar {
    background: #666;
}

.module:not(.active) input.chat-input,
.module:not(.active) ol.discussion {
    display: none;
}
.module header {
    cursor: pointer;
}

.module.online h1 span.glyphicon.glyphicon-user {
    color: #00C6A4;
}

.discussion {
    list-style: none;
    margin: 0 0 50px;
    padding: 0;
    max-height: 350px;
    min-height: 150px;
    overflow-y: auto;
}
.discussion li {
    padding: 0.5rem;
    overflow: hidden;
    display: flex;
}
.discussion .avatar {
    width: 40px;
    position: relative;
}
.discussion .avatar img {
    display: block;
    width: 100%;
}

.other .avatar:after {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border: 5px solid white;
    border-left-color: transparent;
    border-bottom-color: transparent;
}

.self {
    justify-content: flex-end;
    align-items: flex-end;
}
.self .messages {
    order: 1;
    border-bottom-right-radius: 0;
}
.self .avatar {
    order: 2;
}
.self .avatar:after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 0;
    border: 5px solid white;
    border-right-color: transparent;
    border-top-color: transparent;
    box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.messages {
    background: white;
    padding: 10px;
    border-radius: 2px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}
.messages p {
    font-size: 1.2rem;
    margin: 0 0 0.2rem 0;
}
.messages time {
    font-size: 0.7rem;
    color: #ccc;
}

.module .chat-loader {
    position: absolute;
    width: 100%;
    height: 100%;
    left: 0;
    top: 0;
    z-index: 1000000;
    background: url("../lib/jQuery-File-Upload/8.6.1/img/loading.gif") no-repeat scroll 50% 50% rgba(0, 0, 0, 0.5);
}

@keyframes pulse {
    from {
        opacity: 0;
    }

    to {
        opacity: 0.5;
    }
}
@-webkit-keyframes pulsate {
    0% {opacity: 0.0;}
    50% {opacity: 0.5;}
    100% {opacity: 0.0;}
}