/*
Copyright (c) 2022 by Emil (https://codepen.io/emilcarlsson/pen/ZOQZaV)

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/


html, body {
  font-family: 'Roboto', 'Helvetica', sans-serif;
  height: 100%;
  padding: 0;
  margin: 0;
}

/* body.iframed #header {
  padding-left: 50px;
} */

#container{
  width: 100%;
  min-width: 280px;
  height: 100%;
  background: #E6EAEA;
}

#side-panel{
  float: right;
  min-width: 280px;
  max-width: 340px;
  width: 40%;
  height: 100%;
  background: #2c3e50;
  color: #f5f5f5;
  overflow: hidden;
  position: relative;
}

/* .full-width{
  width: 100%;
} */
/* 
#main-content:not(.full-width) {
  float: right;
  width: calc(100% - 340px);  
} */

#main-content{
  min-width: 310px;
  height: 100%;
  overflow: hidden;
  position: relative;
}

/* 
grande:
  side panel 340 fixo
  conversa 100%-340
muda a 340*2 (680)
  side panel 280 fixo
  conversa 100%-280
muda a 280*2 (560)
  ambos ocupam tudo em largura
  um em cima do outro
*/

@media screen and (min-width: 681px) {
  #side-panel{
    width: 340px;
  }

  #main-content {    
    width: calc(100% - 340px);
  }

  #chat-collapse-toggle {
    display: none !important;
  }
}

@media screen and (max-width: 680px) {
  #side-panel{
    width: 280px;
  }

  #main-content {    
    width: calc(100% - 280px);
    min-width: 0px;
  }

  #chat-collapse-toggle {
    display: none !important;
  }
}

@media screen and (max-width: 560px) {
  #side-panel{
    height: 40%;
    width: 100%;
    max-width: none;
  }

  #main-content {    
    height: calc(60% - 25px);
    width: 100%;
    max-width: none;
  }

  #chat-collapse-toggle {
    display: inline-block !important;
  }
}

#side-panel #profile {
  width: 80%;
  margin: 8px 25px;
  display: none;
}

#side-panel #profile .wrap {
  height: 44px;
  line-height: 60px;
  overflow: hidden;
  -moz-transition: 0.3s height ease;
  -o-transition: 0.3s height ease;
  -webkit-transition: 0.3s height ease;
  transition: 0.3s height ease;
}

#side-panel #profile .wrap img.online {
    border: 2px solid #2ecc71;
}

#side-panel #profile .wrap img {
    width: 36px;
    border-radius: 50%;
    padding: 2px;
    border: 2px solid #e74c3c;
    height: auto;
    float: left;
    cursor: pointer;
    -moz-transition: 0.3s border ease;
    -o-transition: 0.3s border ease;
    -webkit-transition: 0.3s border ease;
    transition: 0.3s border ease;
}

#side-panel #profile .wrap #user-name {
  float: left;
  margin: -5px 0px 0px 15px;
}

#side-panel .search-bar {
    border-top: 1px solid #32465a;
    border-bottom: 1px solid #32465a;
    font-weight: 300;
    display: flex;
}

#side-panel .search-bar label {
  padding: 10px 0 0 15px;
  background: #32465a;
}

#side-panel .search-bar input {
    font-family: "proxima-nova", "Source Sans Pro", sans-serif;
    padding: 14px 0 10px 15px;
    border: none;
    background: #32465a;
    color: #f5f5f5;
    width: 100%;
}

#side-panel #channel-creation,
#side-panel #dm-creation {
    border-top: 1px solid #32465a;
    border-bottom: 1px solid #32465a;
    font-weight: 300;
    display: none;
    height: 100%;    
    overflow-y: scroll;
    overflow-x: hidden;
}

#side-panel #channel-creation input {
    font-family: "proxima-nova", "Source Sans Pro", sans-serif;
    padding: 10px 0px 10px 15px;
    width: calc(100% - 65px);
    border: none;
    background: #32465a;
    color: #f5f5f5;
}

#side-panel #channel-creation button{
    float: right;
    border: none;
    width: 50px;
    padding: 10px 0;
    cursor: pointer;
    background: #2ecc71;
    color: #f5f5f5;
}

#side-panel #channel-creation .wrap.,
#side-panel #dm-creation .wrap{
    width: 100%;
}
#side-panel #channel-creation span:not(.cancel),
#side-panel #dm-creation span:not(.cancel, .create){
    display: block;
    padding: 10px 14px;
    font-weight: 600;
}
#side-panel #channel-creation .wrap .cancel,
#side-panel #dm-creation-buttons .cancel {    
    display: block;
    text-align: center;
    margin: 5px 0px;
    font-size: 14px;
    color: #ccc;
}
#side-panel #channel-creation .cancel:hover,
#side-panel #dm-creation .cancel:hover{
    cursor: pointer;
    color: #f5f5f5;
}

ol, ul, p {
    list-style: none;
    padding: 0px;
    margin: 0px;
}

#side-panel #rooms {
    height: calc(100% - 35px);
    overflow-y: scroll;
    overflow-x: hidden;
}

#side-panel #workers-container{
    padding: 0px 0px 40px 0px;
}

#side-panel ::-webkit-scrollbar {
    width: 8px;
    background: #2c3e50;
} 

#side-panel ::-webkit-scrollbar-thumb {
    background-color: #243140;
}

#side-panel .shade{
  position: sticky;
  bottom: 0;
  height: 60px;
  /* dont conver scrollbar */
  width: calc(100% - 8px);
  z-index:10;
  pointer-events: none;
  background: -moz-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(44,62,80,1) 100%);  
  background: -webkit-linear-gradient(top, rgba(255,255,255,0) 0%, rgba(44,62,80,1) 100%);  
  background: linear-gradient(to top, rgba(44,62,80), rgba(44,62,80,0));
}

#side-panel #dm-creation .shade{
  bottom: 72px;
}

#side-panel #rooms ul > li.type {
    position: relative;
    padding: 10px 0 10px 0;
    font-size: 0.9em;
    cursor: default;
    opacity: .8;
}
.unreads,
.user-unreads,
.worker-unreads,
.group-unreads {
  color: #2c3e50;
  background-color: white;
  margin-left: 4px;
  padding: 1px 4px;
  border-radius: 36%;
  font-size: 0.9em;
  display: none;
}

#side-panel #rooms ul > li button {
    float: right;
    border: none;
    background: none;
    color: #f5f5f5;
    cursor: pointer;
    padding: 0;
    font-family: "proxima-nova", "Source Sans Pro", sans-serif;
}

#side-panel #rooms ul li {
    position: relative;
    padding: 10px 0 10px 0;
    font-size: 0.9em;
    cursor: pointer;
}

#side-panel #rooms ul li.channel .name::before {
    content: "# ";
}

#side-panel #rooms ul li.dm.group .name::before{
  font-family: "Font Awesome 5 Free";
  font-weight: 900;
  content: "\f0c0";
  margin-right: 10px;
  /*background-color: #4285f4;
  border-radius: 50%;*/
  display: inline-block;
  width: 18px;
  height: 18px;
  padding: 3px 2px 1px 2px;
}

#side-panel #rooms ul li.channel .name i{
    float: right;
    opacity: .2
}

#side-panel #rooms ul li.channel .name i:hover{    
    opacity: .8
}

#side-panel #rooms ul li .wrap {
    width: 88%;
    margin: 0 auto;
    position: relative;
}

#side-panel #rooms ul li:not(.type) .wrap img{
  width: 22px;
  border-radius: 50%;
  float: left;
  margin-right: 10px;
}

#side-panel #rooms ul li:not(.type) .wrap span {
    position: absolute;
    left: 0;
    margin: -2px 0 0 -2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid #2c3e50;
    background: #95a5a6;
}

#side-panel #rooms ul li.active {
    background: #32465a;
    border-left: 5px solid #435f7a;
}

#side-panel #rooms ul li:not(.type):hover {
    background: #32465a;
}

#side-panel #rooms ul li .wrap .meta {
    padding: 5px 0 0 0;
}

#side-panel #rooms ul li .wrap .meta .name:not(.highlight) {
    font-weight: 400;
}

.name.highlight {
    font-weight: 800;
}

#side-panel #rooms ul li .wrap .meta .preview {
  margin: 5px 0 0 0;
  padding: 0 0 1px;
  font-weight: 400;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  -moz-transition: 1s all ease;
  -o-transition: 1s all ease;
  -webkit-transition: 1s all ease;
  transition: 1s all ease;
}

#main-content #header {
  width: 100%;
  height: 60px;
  line-height: 60px;
  font-size: 16px;
  background: #f5f5f5;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
}

#main-content #header #logo {
  margin: 0px 20px;
}

#main-content #messages {
  height: auto;
  min-height: calc(100% - 93px);
  max-height: calc(100% - 93px);
  overflow-y: scroll;
  overflow-x: hidden;
}

#main-content #messages::-webkit-scrollbar {
    width: 8px;
        background: rgba(0, 0, 0, .0);
} 
#main-content #messages::-webkit-scrollbar-thumb {
    background-color: rgba(0, 0, 0, .3);
}

#main-content #messages ul li {
  display: inline-block;
  clear: both;
  float: left;
  margin: 15px 15px 5px 15px;
  width: calc(100% - 25px);
  font-size: 0.9em;
}

#main-content #messages ul li .bubble {
  display: inline-block;
  padding: 10px 15px;
  border-radius: 20px;
  max-width: calc(100% - 138px);
  line-height: 130%;
}

#main-content #messages ul li img {
  width: 22px;
  border-radius: 50%;
  float: left;
}

#main-content #messages ul li.received img {
  margin: 6px 8px 0 0;
}

#main-content #messages ul li.received .bubble {
  background-color: #f5f5f5;
}

#main-content #messages ul li.sent img {
  float: right;
  margin: 6px 0 0 8px;
}

#main-content #messages ul li.sent .bubble {
  background-color: #435f7a;
  color: #f5f5f5;
  float: right;
}

#main-content #messages ul li .name,
#main-content #messages ul li .date{
  color: #999;
  font-weight: 300;
  font-size: 12px;
}
#main-content #messages ul li .date{
  margin-right: 8px;
  margin-left: 8px;
  display: none;
}
#main-content #messages ul li.sent .date{
  float: right;
  margin-right: 10px;
  margin-top: 10px;
}
#main-content #messages ul li:hover .date{
  display: inline-block;
}

#main-content #user-identification {
  position: absolute;
  bottom: 40px;
  width: 100%;
  z-index: 99;
}

#main-content #message-input {
  position: sticky;
  bottom: 0;
  width: 100%;
  z-index: 99;
}

#main-content #message-input .wrap {
  position: relative;
}

#main-content #message-input .wrap input {
  font-family: "proxima-nova", "Source Sans Pro", sans-serif;
  float: left;
  border: none;
  width: calc(100% - 90px);
  padding: 10px 32px 10px 8px;
  font-size: 14px;
  color: #32465a;
}

#main-content #message-input .wrap button {
  float: right;
  border: none;
  width: 50px;
  padding: 10.5px 0;
  cursor: pointer;
  background: #32465a;
  color: #f5f5f5;
}
#main-content #message-input .wrap button:hover {
    background: #435f7a;
}

#main-content #message-input .wrap .attachment {
  position: absolute;
  right: 60px;
  z-index: 4;
  margin-top: 10px;
  color: #435f7a;
  opacity: .5;
  cursor: pointer;
}

#side-panel #dm-creation button {
    float: right;
    border: none;
    width: 100%;
    padding: 10px 0;
    cursor: pointer;
    background: #2ecc71;
    color: #f5f5f5;
    margin-bottom: 10px;
    font-size: 14px
}

#dm-creation-users li,
#dm-creation-workers li {
  position: relative;
  padding: 10px 0 10px 0;
  font-size: 0.9em;
  cursor: pointer;
}

#dm-creation-users li.selected,
#dm-creation-workers li.selected {
  font-weight: 600;
}

#dm-creation-users li.selected i, 
#dm-creation-workers li.selected i{
  font-size: 22px;
  float: left;
  margin-right: 10px;
  color: #2ecc71;
}
#dm-creation-users .wrap,
#dm-creation-workers .wrap {
  width: 88%;
  margin: 0 auto;
  position: relative;
}

#dm-creation-users .wrap img, 
#dm-creation-workers .wrap img {
  width: 22px;
  border-radius: 50%;
  float: left;
  margin-right: 10px;
}

#dm-creation-users .wrap p,
#dm-creation-workers .wrap p {  
  line-height: 18px;
  padding: 4px 0 0 0;
}

#dm-creation-users li:hover, 
#dm-creation-workers li:hover{
  background-color: #32465a;
}

#workers-separator,
#users-separator,
#groups-separator {
  padding-top: 5px;
  padding-bottom: 5px;
}

#dm-creation-workers {
  margin-bottom: 40px !important;
}

#dm-creation-buttons {
  position: sticky;
  bottom: 0px;
  background-color: #2c3e50;
  padding-bottom: 6px;
}

.chevron-toggle {
 float: right;
}

.separator-bar {
  height: 1px;
  width: 95%;
  margin-left: 2.5%;
  opacity: 0.5;
  margin-top: 10px;
  margin-bottom: 10px;
}

.dm-creation-group-title {
  font-size: 1em;
  cursor: pointer;
  opacity: .8;
}

#dm-create-count-container > i {
  margin-left: 3px;
}

#dm-creation-search {
  display: flex;
}

#create-dm:disabled {
  opacity: 0.5;
}

#messages ul li:last-child {
  padding-bottom: 20px !important;
}

#chat-collapse-toggle {
  text-align: center;
  background-color: #f5f5f5;
  width: 100%;
  height: 25px;
  display: inline-block;
}

#chat-collapse-toggle > i {
  vertical-align: middle;
}

.collapsed-side-panel {
  height: calc(100% - 25px) !important;
}

.collapsed-main-content {
  height: 0px !important;
}

.collapse-transitions {
  -webkit-transition: all 1s ease;
  -moz-transition: all 1s ease;
  -o-transition: all 1s ease;
  -ms-transition: all 1s ease;
  transition: all 1s ease;
}