#openChatIcon {
    cursor: pointer;
    line-height: 30px;
    padding: 0 10px;
}

#openChatIcon .iconButton {
    color: #ccc;
}
#openChatIcon.active {
    background: #f7f7f7;
    text-shadow: none;
    opacity: 1;
}

#openChatIcon.hasNewMessages {
    text-shadow: 0 0 3px rgba(255,255,255,0.5);
}

#openChatIcon.active .iconButton {
    color: #13a7dd;
}
#openChatIcon.active .notificationCount {
    color: #FFF;
}

#openChatIcon .notificationCount {
    display: none;
}

#openChatIcon.hasNewMessages .notificationCount {
    display: inline;
}

#openChatIcon .iconButton {
    opacity: 0.5;
}

#openChatIcon:hover .iconButton,
#openChatIcon.hasNewMessages .iconButton {
    opacity: 1;
}

#chatBox {
    position: absolute;
    width: 325px;
    height: 90%;
    right: -1px;
    bottom: 1px;
    border: 1px solid #CCC;
    background: #FFF;
    z-index: 101;
    box-shadow: 0 0 7px #aaa;
}

#chatBox .recipient {
    height: 31px;
    background: #FFF;
    border-bottom: 1px dotted #ddd;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
}

#chatBox .recipient .uiContainer {
    margin: 3px 5px 0 0;
}

#chatBox .recipient .uiLabel {
    width: 1px;
    white-space: nowrap;
    padding: 6px 14px 0;
}

#chatBox .recipient .uiLabel:after {
    width: auto;
}

#chatBox .chatInput {
    width: 100%;
    height: 32px;
    background: none;
    padding: 0 30px 0 5px;
    border: solid #CCC;
    border-width: 1px 0 0;
    position: absolute;
    bottom: 0;
    left: 0;
    
    -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
    -moz-box-sizing: border-box;    /* Firefox, other Gecko */
    box-sizing: border-box;         /* Opera/IE 8+ */
}

#chatBox .bg,
#chatBox .messages {
    position: absolute;
    background: #f7f7f7;
    left: 0;
    top: 32px;
    right: 0;
    bottom: 32px;
    z-index: 1;
}

#chatBox .messages {
    overflow-y: auto;
    padding: 15px;
}

#chatBox .message {
    clear: both;
    float: left;
    max-width: 90%;
    background: #FFF;
    padding: 6px 8px 4px;
    border-radius: 2px;
    margin-bottom: 15px;
    box-shadow: 0 0 3px #999;
}

#chatBox .message .head {
/*    display: -webkit-flex;
    display: -moz-flex;
    display: flex;*/
}

#chatBox .message .name {
    min-width: 0;
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;    
    opacity: 0.66;
    display: inline-block;
}
#chatBox .message .longDate .name {
    max-width: 89px;
}

#chatBox .message .time {
/*    -webkit-flex: 1;
    -moz-flex: 1;
    flex: 1;*/
    
    float: right;
    color: #999;
    padding-left: 25px;
    white-space: nowrap;
}

#chatBox .message .content {
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid #ddd;
    padding-top: 5px;
    margin-top: 3px;
    word-break: break-word;
    word-wrap: break-word;
}

#chatBox .sendMessage {
    position: absolute;
    right: 0px;
    bottom: 6px;
    z-index: 1;
    background: none;
    border: none;
}

#chatBox .recentChats {
    width: 87px;
    position: absolute;
    top: 46px;
    bottom: 37px;
    left: -90px;
    overflow-y: scroll;
    padding: 5px 50px 0 20px;
}

#chatBox .recentChat {
    position: relative;
    cursor: pointer;
    font-size: 12px;
    margin-bottom: 5px;
    background: rgba(19, 167, 221, 0.7);
    color: #FFF;
    text-align: center;
    vertical-align: middle;
    padding: 5px;
    text-overflow: ellipsis;
    box-shadow: 0 0 3px 0 #fff;
    white-space: nowrap;
    border-top: 2px solid rgba(255, 51, 51, 0.7);
}

#chatBox .recentChat:hover {
    background: rgba(19, 167, 221, 1.0);
}

#chatBox .recentChat.selected {
    cursor: default;
    background: #f7f7f7;
    color: #000;
    border-top: 2px solid #F33;
    border-bottom: 1px solid #CCC;
    border-left: 1px solid #CCC;
}

#chatBox .recentChat.online {
    border-top-color: #3c3;
}

#chatBox .recentChat .positionHelper {
    display: inline-block;
    width: 0;
    height: 43px;
    vertical-align: middle;
}

#chatBox .recentChat .label {
    display: inline-block;
    vertical-align: middle;
    white-space: normal;
}

#chatBox .recentChat .hideChat {
    position: absolute;
    bottom: -4px;
    text-shadow: 0 0 4px #555;
    left: -3px;
    font-size: 18px;
    color: #FFF;
    display: inline;
}

#chatBox .recentChat .hideChat:hover {
    cursor: pointer;
    text-shadow: 0 0 4px #999;
}

#chatBox .newMessagesCount {
    display: none;
    min-width: 8px;
    height: 14px;
    line-height: 14px;
    background: #FFF;
    position: absolute;
    left: -2px;
    color: #666;
    font-weight: bold;
    text-align: center;
    margin-top: -8px;
    padding: 0 4px 0 3px;
    border-radius: 5px;
    box-shadow: 0 0 3px #333;
}

#chatNotificationBox {
    cursor: pointer;
    width: 210px;
    height: 48px;
    color: #FFF;
    background: rgba(19,167,221,0.8);
    border: 1px solid #FFF;
    position: absolute;
    bottom: 7px;
    right: 6px;
    padding: 13px;
    z-index: 1000000;
}

#chatNotificationBox .userName {
    font-weight: bold;
    margin-right: 8px;
}

#chatNotificationBox:hover {
    background: rgba(19,167,221,1.0);
}

#chatNotificationBox .icon {
    margin: -6px 0 0 -6px;
    font-size: 21px;
    position: absolute;
    color: #FFF;
}

#chatNotificationBox .text {
    height: 50px;
    overflow: hidden;
    text-indent: 20px;
}
#chatNotificationBox a.openChat {
    padding-left: 10px;
    position: absolute;
    right: 8px;
    bottom: 5px;
    color: #FFF;
}
