@charset "UTF-8";

$chatBg: #34363c;
$chatContBg: #eeeeee;
$chatUiFont: #ffffff;
$offsetBottom: 5px;
$offsetRight: 5px;

.mini-wrap{
  z-index: 123456789;
  height: 100%;
}

.mini-body{
  height: 100%;
  box-sizing: border-box;
  padding: 10px 2px 2px;
  background: rgba($color: $chatBg, $alpha: 0.6);
}

.box{
  height: 100%;
  @include webkitbox(2);
}

.box-hd{
  height: 26px;
  position: relative;
  .btn-menu{
    position: absolute;
    cursor: pointer;
    left: 0;
    top: -2px;
    width: 20px;
    height: 20px;
    background: url("./img/icon-menu.png") center no-repeat;
    &:hover{
      background-color: #2a2b30;
    }
  }
  .btn-close{
    position: absolute;
    cursor: pointer;
    right: 0;
    top: -2px;
    width: 20px;
    height: 20px;
    background: url("./img/icon-close.png") center no-repeat;
    &:hover{
      background-color: #2a2b30;
    }
  }
  .menu-extra{
    position: absolute;
    top: 24px;
    z-index: 10;
    left: 0;
    background: #ffffff;
    .info {
      padding: 8px 0;
      margin: 0 10px;
      border-bottom: 1px solid #dcdddf;
      .avatar {
        float: left;
        width: 32px;
        height: 32px;
        margin-right: 6px;
        margin-top: 6px;
        border-radius: 4px;
      }
      .avatar-bg{
        background-color: #f5882b;
        text-align: center;
        line-height: 32px;
        color: #ffffff;
        font-size: 14px;
      }
      .account-info{
        float: left;
      }
      em {
        font-size: 12px;
        color: #000000;
      }
    }
    .icon-arrow{
      display: inline-block;
      vertical-align: middle;
      margin-left: 10px;
      background: url('../chatMini/img/icon-arrow.png') no-repeat;
      width: 8px;
      height: 12px;
    }
    .login-out{
      display: block;
      line-height: 1.5;
      color: #7194c3;
      font-size: 12px;
      cursor: pointer;
      margin-top: 8px;
    }
    li{
      line-height: 30px;
      font-size: 12px;
      padding: 0 10px;
      display: block;
      &:hover{
        background: #dcdddf;
      }
    }
    a{
      color: #333333;
      display: block;
      text-decoration: none;
    }
  }
  .box-title{
    min-width: 200px;
    text-align: center;
    margin: 0 auto;
    font-size: 14px;
    color: $chatUiFont;
  }
  .user-tips{
    position: absolute;
    top: -2px;
    right: 30px;
    max-width: 50px;
    height: 20px;
    line-height: 20px;
    font-size: 0;
    text-align: right;
    overflow: hidden;
    &:before{
      margin-right: 3px;
    }
    em{
      vertical-align: middle;
      color: $chatUiFont;
      font-size: 12px;
    }
  }
}

.box-bd{
  @include flex(1);
  background: $chatContBg;

}

.box-ft{
  //height: 37px;
  background: $chatContBg;
  border-top: 1px solid #d6d6d6;
  position: relative;
  .input-con{
    //height: 37px;
    position: relative;
    @include webkitbox(1);
  }
  .input-wrap{
    flex: 1;
  }
  .btn-file{
    width: 32px;
    height: 37px;
    background: url("../../assets/icon-file.png") center center no-repeat;
    background-size: 21px 21px;
    position: relative;
    &:hover{
      opacity: 0.7;
    }
    input[type=file] {
      opacity: 0;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      cursor: pointer;
    }
  }
  .btn-emoji{
    width: 32px;
    cursor: pointer;
    height: 37px;
    background: url("../../assets/icon-face.png") center center no-repeat;
    background-size: 21px 21px;
    &:hover{
      opacity: 0.7;
    }
  }
  .icon-packet{
    width: 32px;
    cursor: pointer;
    height: 37px;
    background: url("../../assets/icon-packet.png") center center no-repeat;
    background-size: 21px 21px;
    &:hover{
      opacity: 0.7;
    }
  }
  .btn-send{
    margin: 0 7px;
    font-size: 12px;
    color: #666666;
    padding: 0 10px;
    height: 28px;
    line-height: 28px;
    margin-top: 4px;
    background: #ffffff;
    border: 1px solid #c0c0c0;
    border-radius: 3px;
    cursor: pointer;
    &:hover{
      opacity: 0.6;
    }
  }
  form{
    //height: 35px;
    margin-left: 5px;
    @include flex(1);
  }
  textarea {
    display: block;
    width: 100%;
    height: 35px;
    max-height: 175px;
    padding: 0;
    font-size: 12px;
    color: #666666;
    line-height: 35px;
    margin: 0;
    border: none;
    outline: none;
    background: none;
    box-sizing: border-box;
    resize:  none;
  }
  .emoji-wrap{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 37px;
    background: #ffffff;
    box-shadow: 1px 1px 50px rgba(0,0,0,.3);
    z-index: 10;
  }
  .input-ctrl{
    span{
      width: 120px;
      margin: 2px auto;
      height: 30px;
      line-height: 30px;
      color: #ffffff;
      font-size: 12px;
      text-align: center;
      display: block;
      background-image: -webkit-linear-gradient( 90deg, rgb(25,145,235) 0%, rgb(46,161,248) 100%);
      border-radius: 3px;
      &.enable{
        cursor: pointer;
        &:hover{
          opacity: 0.7;
        }
      }
    }
  }
}

.mini-control{
  position: fixed;
  right: $offsetBottom;
  bottom: $offsetRight;
  user-select: none;
  ul{
    @include webkitbox(1);
    background: $chatBg;
    opacity: .9;
    border-radius: 4px;
    overflow: hidden;
  }
  li{
    width: 60px;
    height: 40px;
    line-height: 40px;
    text-align: center;
    font-size: 0;
    cursor: pointer;
    &:hover{
      background: #42454c;
    }
    em{
      font-size: 12px;
      color: $chatUiFont;
      vertical-align: middle;
      padding-left: 4px;
    }
  }
  .msg-tips{
    &:before{
      content: "";
      background: url("./img/icon-meechat.png") center center no-repeat;
      background-size: 100%;
      width: 22px;
      height: 20px;
      display: inline-block;
      vertical-align: middle;
    }
  }
}

.user-tips{
  &:before{
    content: "";
    background: url("./img/icon-user.png") no-repeat;
    background-size: 100%;
    width: 8px;
    height: 9px;
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
  }
}

.meechat-icon {
  width: 46px;
  height: 40px;
  background: url('./img/meechat-bg.png') center center no-repeat;
  background-size: 100%;
  text-align: center;
  border-radius: 4px;
  cursor: pointer;
  padding-top: 14px;
  box-sizing: border-box;
  &:hover{
    opacity: .8;
  }
  em{
    color: #ffffff;
    font-size: 12px;
  }
}

.msg-wrap{
  margin-bottom: 16px;
}

.msg-top-more{
  margin-top: 10px;
  text-align: center;
  i{
    font-size: 30px;
  }
  em{
    font-size: 12px;
    line-height: 20px;
    color: #999999;
  }
}
.msg-loading-icon{
  display: block;
  background: url('../../assets/loading-icon.png') no-repeat;
  background-size: 100%;
  width: 16px;
  height: 16px;
  margin: 12px auto;
  animation: rotate 2s linear infinite;
}