#device{
  height:100%;
}

.fill_message {
  height:50px;
}

.chat {
  display: block;
  margin-top:20px;
  margin-bottom:20px;
  padding-top:5px;
  padding-bottom:10px;
  height: calc(100% - 20px);
  background: transparent;
  //border:1px solid grey;
}

.live .chat {
  height: calc(100% - 100px);
}

.chat .time {
  font-size:11px;
}
.chat .message_chat {
  display: flex;
  margin: 0;
  min-height: 25px;
  height: auto;
  text-align: left;
  max-width:95%;
  align-items: flex-start;
}
.chat .message_chat.me img {
  order: 2;
  margin: 0 0 0 3px;
}
.chat .message_chat.me div {
  order: 1;
  padding: 0 8px 0 0;
}
.chat .message_chat.me div p {
  float: right;
}
.chat .message_chat.me div:before {
  position: relative;
  float: right;
  content: '';
  margin: 7px -8px 0 0;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 0 8px 8px;
  border-color: transparent transparent transparent #fff;
}
.chat .message_chat img {
  display: block;
  order: 1;
  margin: 0 10px 0 0;
  height: 25px;
  width: 25px;
  border-radius: 50%;
  box-sizing: border-box;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}
.chat .message_chat div {
  display: block;
  order: 2;
}
.chat .message_chat div p {
  display: inline-block;
  margin: 0;
  padding:3px;
}
.chat .message_chat div:before {
  position: relative;
  float: left;
  content: '';
  margin: 7px 0 0 -8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 8px 8px 8px 0;
  border-color: transparent #fff transparent transparent;
}

.chat .message_chat .username{
  line-height:16px;
  font-size:13px;
  width:calc(40% - 35px);
}

.chat .message_chat .msg {
  background-color:#f2f3f5;
  border-radius:15px;
  line-height:20px;
  height:auto;
  font-size:13px;
  width:60%;
  word-break: break-all;
}

.chat .message_chat .username p{
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat .message_chat p {
    width:calc(100% - 10px);
}

.button.send-msg{
  margin:0;
}
/*
* The styles to setup this scene
*/

.chat {
  border-radius: 5px;
}
#device #size {
  -webkit-appearance: none;
  margin: 15px 0 0 0;
  width: 100%;
  height: 10px;
  vertical-align: middle;
  border-radius: 5px;
  background-color: #46627f;
  outline: none;
}
#device #size::-moz-range-track {
  margin: 15px 0 0 0;
  width: 100%;
  height: 10px;
  vertical-align: middle;
  border-radius: 5px;
  background-color: #46627f;
  outline: none;
}
#device #size::-webkit-slider-thumb {
  -webkit-appearance: none !important;
  height: 20px;
  width: 20px;
  background-color: #4f6f8f;
  border-radius: 50%;
}
#device #size::-moz-range-thumb {
  -moz-appearance: none;
  height: 20px;
  width: 20px;
  background-color: #4f6f8f;
  border-radius: 50%;
}
.track {
  margin: 15px 0 0 0;
  width: 100%;
  height: 10px;
  vertical-align: middle;
  border-radius: 5px;
  background-color: #46627f;
  outline: none;
}
.thumb {
  height: 20px;
  width: 20px;
  background-color: #4f6f8f;
  border-radius: 50%;
}
#drag {
  position: absolute;
  margin: 50px 0 0 -10px;
  padding: 5px 10px;
  line-height: 20px;
  text-align: center;
  font-size: 14px;
  font-family: arial, sans-serif;
  color: #fff;
  border-radius: 5px;
  border-bottom: 2px solid #217dbb;
  background: #3498db;
  -webkit-touch-callout: none;
  -webkit-user-select: none;
}
#drag:after {
  content: '';
  position: absolute;
  top: -20px;
  left: 10px;
  width: 0;
  height: 0;
  border-width: 10px;
  border-style: solid;
  border-color: transparent transparent #3498db transparent;
}

#device textarea {
  height: 50px;
  margin: 0;
  border: 1px solid grey;
  border-radius: 5px;
  padding: 5px;
  line-height: 20px;
  font-size: 14px;
}

@media (max-height: 400px) {
  #preview {
    display: block;
  }
}