@import url(https://fonts.googleapis.com/css?family=Open+Sans:400,600,700,300italic);

body {
    margin: 0;
    padding: 0;
    height: 100%;
    width: 100%;
    font-family: Open Sans, sans serif;
}

.popup {
    position: absolute;
    border-radius: 5px;
    background: #F5F5F8;
    z-index: 3;
    box-shadow: 2px 4px 4px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    text-align: center;
    display: none;
}

.popup h3 {
    font-size: 16px;
    margin: 0 0 20px 0;
    font-weight: bold;
    width: 100%;
    height: 30px;
    background: #333;
    color: white;
    padding: 6px 10px;
}

#create-channel, #update-channel {
    top: calc(50% - 100px);
    left: calc(50% - 160px);
    width: 300px;
    height: 220px;
}

#invite-member {
    top: calc(50% - 48px);
    left: calc(50% - 130px);
    width: 260px;
    height: 96px;
}

#add-member {
    top: calc(50% - 48px);
    left: calc(50% - 130px);
    width: 260px;
    height: 96px;
}

#create-channel input, #update-channel input {
    display: block;
    margin: 5px auto;
    width: 250px;
}

#update-channel input[disabled='true'] {
    background: #DDD;
}

#create-channel input[type='checkbox'], #update-channel input[type='checkbox'] {
    width: auto;
    margin: 10px;
    display: inline;
}

#create-channel label, #update-channel label {
    display: inline;
}

#create-channel button, #update-channel button {
    display: block;
    width: 90%;
    margin: 10px auto 5px auto;
}

#login {
    top: calc(50% - 60px);
    left: calc(50% - 200px);
    width: 400px;
    /*height: 160px;*/
    display: block;
    text-align: center;
}

#login p {
    margin: 10px auto;
}

#login div {
    /*margin: 0 auto;*/
}

#login button {
    float: right;
    width: 130px;
    margin-right: 14px;
}

#login input {
    /*  width: calc(100% - 170px);
      margin-left: 14px;*/
}

/*#overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 2;
}*/

#sidebar {
    height: 460px;
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    background: #ffffff;
    color: white;
    padding-bottom: 80px;
    overflow-y: auto;
    box-shadow: 0px 1px 8px #444d58;
}

#profile {
    width: 250px;
    padding: 10px;
    height: 60px;
    line-height: 40px;
    background-color: #bdbdbd;
    position: fixed;
    border-bottom: 2px solid #666;
    z-index: 200;
}

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    border: solid 2px white;
    margin-right: 10px;
}

#profile > img {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: 2px solid white;
}

#profile > label {
    width: 170px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    font-size: 1.2em;
    margin-left: 6px;
}

#profile > #presence {
    display: inline-block;
    height: 20px;
    width: 20px;
    position: absolute;
    border-radius: 20px;
    top: 20px;
    right: 15px;
}

#profile > #presence.connected { background: green; }
#profile > #presence.disconnected { background: gray; }
#profile > #presence.connecting { background: yellow; }
#profile > #presence.denied { background: red; }
.channel-container {
    position: absolute;
    width: 60%;
    top: 126px;
    margin-left: 180px !important;
}
#channels {
    margin-top: 60px;
}

#sidebar h3 {
    margin-left: 20px;
}

#sidebar ul {
    list-style-type: none;
    padding: 0;
}

#sidebar li {
    margin: 5px 0;
    cursor: pointer;
    padding: 5px 5px 5px 15px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#sidebar li span {
    color: #555;
}

#sidebar li span.joined {
    color: #333333;
    font-weight: bold;
    font-size: 14px;
}

#sidebar li.new-messages span {
    font-weight: bold;
}

#sidebar li span.invited {
    font-weight: bold;
    color: #FF9800;
}

#sidebar li.new-messages span.messages-count {
    background: #f5e9a5;
    padding: 2px;
    border-radius: 4px;
    font-size: 8pt;
    margin-left: 4px;
}


#sidebar li div {
    display: none;
}

#sidebar li:hover {
    background: #d2d2d2;
    border-radius: 5px;
}

#sidebar li:hover div {
    display: block;
}

#sidebar-footer {
    position: fixed;
    bottom: 0;
    width: 250px;
    height: 80px;
    padding: 20px 0;
    text-align: center;
    background-color: #222;
}

#create-channel-button {
    margin: 0 auto;
    padding: 12px;
    width: 90%;
}

#channel, #no-channel {
    position: absolute;
    top: 0;
    left: 250px;
    height: 460px;
    bottom: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 1px 8px #444d58;
}

#channel {
    /*display: none;*/
}

#channel.view-only div.edit-button,
#channel.view-only div.remove-button,
#channel.view-only #channel-info button,
#channel.view-only #channel-members,
#channel.view-only #channel-message-send,
#channel.view-only #typing-indicator {
    display: none;
}

#channel.view-only #channel-chat {
    right: 0;
}

#channel.view-only #channel-join-panel {
    display: block;
}

#no-channel p {
    padding: 50px;
    font-size: 2em;
    color: #555;
}

#channel-info {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    padding: 5px 10px;
    background: #FFF;
    border-bottom: 2px solid #666;
}

#channel-info h1 {
    font-size: 20px;
    line-height: 30px;
    margin: 0;
    padding: 0;
    font-weight: bold;
    color: #4a4a4a;
}

div.remove-button {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 4px;
    cursor: pointer;
    display: inline-block;
    float: right;
}

div.edit-button {
    width: 16px;
    height: 16px;
    vertical-align: middle;
    margin-left: 4px;
    cursor: pointer;
}

#channel-info h2 {
    font-size: 16px;
    line-height: 20px;
    font-style: italic;
    color: #444;
    margin: 0;
    padding: 0;
    display: inline-block;
}

.red-button {
    border-radius: 5px;
    border: 1px solid black;
    color: white;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.75);
    background-color: #E30000;
}

.red-button:hover {
    background-color: #B30000;
}

.white-button {
    border-radius: 5px;
    border: 1px solid black;
    color: white;
    box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4);
    text-shadow: 1px 1px 1px rgba(0, 0, 0, 0.75);
    background-color: #E3E3E3;
}

.white-button:hover {
    background-color: #B3B3B3;
}

#edit-channel {
    position: absolute;
    right: 170px;
    top: 10px;
    padding: 10px;
    line-height: 20px;
    font-size: 16px;
}

#delete-channel {
    position: absolute;
    right: 10px;
    top: 10px;
    padding: 10px;
    line-height: 20px;
    font-size: 16px;
}

#channel-body {
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    bottom: 0;
    height: 380px;
}

#channel-chat {
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0px;
    overflow: hidden;
}

#channel-messages {
    margin-bottom: 70px;
    position: relative;
    width: 100%;
    height: calc(100% - 70px);
    overflow-y: auto;
}


#channel-messages ul {
    list-style-type: none;
    margin: 0;
    padding: 0;
}

#channel-messages li {
    padding: 10px;
    position: relative;
    float: left;
    width: 100%;
}

#channel-messages li > img {
    width: 30px;
    height: 30px;
    border-radius: 15px;
    border: 2px solid #333;
    margin-right: 5px;
}

#channel-messages p.members-read {
    position: absolute;
    bottom: 2px;
    right: 10px;
    margin: 0;
    padding: 0;
    width: 100%;
}

#channel-messages p.members-read img {
    height: 16px;
    width: 16px;
    border-radius: 8px;
    border: solid 1px #333;
    float: right;
    margin-left: 4px;
}

#channel-messages p.last-read {
    position: absolute;
    bottom: 2px;
    right: 10px;
    margin: 0;
    font-size: 12px;
    color: red;
    font-weight: bold;
    display: none;
}

/*#channel-messages li:nth-child(even) {
    background: #F0F0FA;
}*/

#channel-messages li.last-read {
    border-bottom: 1px solid red;
}

#channel-messages li.last-read p.last-read {
    display: block;
}

#channel-messages li > div {
    display: none;
}

#channel-messages li:hover > div {
    display: block;
}

#channel-messages li.editing:hover > div {
    display: none;
}

/*#channel-messages li:hover {
    background: #EBEBF0;
}*/

#channel-messages p.author {
    display: inline-block;
    font-weight: bold;
    margin: 0;
    padding: 0;
    width: calc(100% - 90px);
}

#channel-messages .timestamp {
    font-style: italic;
    color: #333;
    margin-left: 4px;
}

#channel-messages p.body {
    margin: 0 0 0 35px;
    padding: 0;
    width: calc(100% - 90px);
}

#channel-messages textarea.edit-body {
    width: calc(100% - 90px);
    margin: 5px 0 0 35px;
    padding: 0;
    display: none;
}

#channel-messages button {
    display: none;
    margin: 0 5px;
}

#channel-messages span.edited {
    font-style: italic;
    color: #444;
    margin-left: 8px;
}

#channel-messages div {
    float: right;
}

#channel-message-send {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding-bottom: 10px;
    border-top: 1px solid #AAA;
    background: #ffffff;
}

#typing-indicator {
    padding: 5px 15px;
    font-style: italic;
    color: #444;
}

#typing-indicator span {
    display: block;
    min-height: 18px;
}

#channel-message-send input {
    display: inline-block;
    width: calc(100% - 90px);
    margin-left: 10px;
    height: 40px;
    right: 60px;
    padding: 0px 10px;
    border-radius: 5px;
    border: 1px solid black;
    border-radius: 8px !important;
}

#channel-message-send button {
    margin: 0px 10px;
    height: 30px;
    padding: 0px 5px;
    display: inline-block;
    background: none;
    border: none;
    color: #656565;
    box-shadow: none;
    font-size: 26px;
    vertical-align: middle;
}

#channel-join-panel {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: none;
    font-size: 20px;
    border-top: 1px solid #AAA;
    background: #F5F5F8;
    padding: 10px;
    text-align: center;
}

#channel-join-panel button {
    margin: 0 auto;
    padding: 5px 10px;
}

#my-channels ul> li> img,#invited-channels ul> li> img {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    border: 2px solid white;
    margin-right: 10px;
}

#channel-members {
    position: absolute;
    right: 0;
    top: 60px;
    bottom: 0;
    width: 200px;
    border-left: 2px solid #667;
    background-color: #333;
    color: white;
}

#channel-members h3 {
    margin: 5px;
    padding: 10px;
}

#channel-members button {
    width: 80px;
    margin-left: 10px;
    display: inline-block;
}

#channel-members ul {
    list-style-type: none;
    margin: 20px 0 0 0;
    padding: 0 10px;
}

#channel-members li {
    margin: 5px 0;
    cursor: pointer;
    padding: 5px 5px 5px 15px;
    width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#channel-members li img {
    width: 20px;
    height: 20px;
    border-radius: 10px;
    border: 1px solid black;
    margin-right: 5px;
}

#channel-members li div {
    display: none;
}

#channel-members li:hover {
    background: #E30000;
    border-radius: 5px;
}

#channel-members li:hover div {
    display: block;
}

#channel-members li span {
    display: inline-block;
    width: 110px;
    vertical-align: top;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#channel-members .member-online {
    font-weight: bold;
}

#channel-members .member-offline {
    color: gray;
}

.loader {
    -webkit-filter: grayscale(100%) blur(2px);
    -moz-filter: grayscale(100%) blur(2px);
    -o-filter: grayscale(100%) blur(2px);
    -ms-filter: grayscale(100%) blur(2px);
    filter: grayscale(100%) blur(2px);
}

#channel-messages li.other p.body {
    margin: 0 30px;
    padding: 14px;
    width: 65%;
    background: #c1c1c1;
    border-radius: 5px !important;
    color: white;
    display: inline-block;

}

#channel-messages li.other > img {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    border: 2px solid #333;
    margin-right: 5px;
}

#channel-messages li.other p.author {
    display: inline-block;
    font-weight: bold;
    margin: 0;
    padding: 0;
    width: calc(100% - 90px);
    position: absolute;
    top: 15px;
    right: -30px;
    text-align: left;
    display: none;
}


#channel-messages li.self p.body {
    margin: 0 0 0 86px;
    padding: 14px;
    width: calc(65%);
    background: #2ecc71;
    border-radius: 5px !important;
    color: white;
    display: inline-block;
}

#channel-messages li.self > img {
    width: 50px;
    height: 50px;
    border-radius: 15px;
    border: 2px solid #333;
    margin-right: 10px;
    float: right;
}

#channel-messages li.self p.author {
    display: inline-block;
    display: none;
    font-weight: bold;
    margin: 0;
    padding: 0;
    width: calc(100% - 90px);
    position: absolute;
    top: 15px;
    right: -30px;
    text-align: left;
}