@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.9);
}

.box{
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.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{
  height: 0;
  flex: 1;
  position: relative;
  background: $chatContBg;
  .msg-unread{
    position: absolute;
    width: 120px;
    left: 50%;
    bottom: 10px;
    border-radius: 20px;
    background: rgba(#000000, 0.5);
    padding: 0 5px;
    text-align: center;
    line-height: 32px;
    margin-left: -65px;
    cursor: pointer;
    &:hover{
      background: rgba(#000000, 0.3);
    }
    em{
      color: #ffffff;
      font-size: 14px;
    }
    i{
      transform: rotate(90deg);
      margin-right: 5px;
    }
  }
}
.scroller{
  height: 100%;
  overflow-y: scroll;
  &::-webkit-scrollbar {
    width: 8px;
    height: 6px;
  }
  &::-webkit-scrollbar-thumb {
    border-radius: 3px;
    -moz-border-radius: 3px;
    -webkit-border-radius: 3px;
    background-color: rgba($color: #8d8a8a, $alpha: 0.2);
  }
  &::-webkit-scrollbar-track {
    background-color: transparent;
  }
}

.box-ft{
  position: relative;
  background: $chatContBg;
  border-top: 1px solid #d6d6d6;
  .input-con{
    position: relative;
    display: flex;
    align-items: flex-end;
    background-color: #fafafa;
    padding: 6px 0;
  }
  .input-wrap{
    flex: 1;
    padding: 10px 0;
    background-color: #ffffff;
    border-radius: 4px;
  }
  .more-icon{
    width: 38px;
    height: 38px;
    background: url('../../assets/more-icon.png') center center no-repeat;
    background-size: 22px 22px;
    cursor: pointer;
    &:hover{
      opacity: .6;
    }
  }
  .emoji-icon{
    width: 38px;
    height: 38px;
    background: url('../../assets/m-face-icon.png') center center no-repeat;
    background-size: 22px 22px;
    cursor: pointer;
    &:hover{
      opacity: .6;
    }
  }
  // .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-right: 4px;
    font-size: 12px;
    color: #ffffff;
    padding: 0 10px;
    height: 28px;
    line-height: 28px;
    margin-bottom: 3px;
    background: #2b9ff6;
    border-radius: 3px;
    cursor: pointer;
    &:hover{
      opacity: 0.8;
    }
  }
  form{
    @include flex(1);
  }
  textarea {
    display: block;
    width: 100%;
    height: 18px;
    max-height: 175px;
    font-size: 14px;
    color: #000000;
    line-height: 16px;
    padding: 1px;
    padding-left: 8px;
    margin: 0;
    border: none;
    outline: none;
    background: none;
    box-sizing: border-box;
    resize:  none;
  }
  .emoji-wrap{
    position: absolute;
    left: 0;
    right: 0;
    bottom: 52px;
    background: #ffffff;
    box-shadow: 1px 1px 50px rgba(0,0,0,.3);
    z-index: 10;
  }
  .input-ctrl{
    span{
      width: 120px;
      margin: 4px 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;
  .at-tip{
    position: absolute;
    left: -9px;
    top: -9px;
    width: 18px;
    height: 18px;
    background: #e0273a;
    border-radius: 50%;
    overflow: hidden;
    font-size: 12px;
    line-height: 18px;
    color: #fff;
    text-align: center;
  }
  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;
}

.tool-wrap{
  background-color: #f6f6f6;
  display: flex;
  padding: 16px 0;
  .tool-item{
    flex: 1;
    text-align: center;
  }
  .type{
    font-size: 14px;
    color: #666666;
  }
  .icon-box{
    width: 58px;
    height: 58px;
    margin: 0 auto;
    cursor: pointer;
    background-color: #ffffff;
    border-radius: 6px;
    border: 1px solid #efefef;
    box-sizing: border-box;
    margin-bottom: 6px;
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    &:hover{
      opacity: .8;
    }
    input[type=file] {
      opacity: 0;
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      cursor: pointer;
      z-index: 4;
    }
    i{
      display: inline-block;
    }
    .packet-icon{
      background: url('../../assets/packet-icon.png') no-repeat;
      background-size: 100%;
      width: 21px;
      height: 26px;
    }
    .picture-icon{
      background: url('../../assets/pic-icon.png') no-repeat;
      background-size: 100%;
      width: 27px;
      height: 21px;
    }
    .audio-icon{
      background: url('../../assets/audio-icon.png') no-repeat;
      background-size: 100%;
      width: 18px;
      height: 26px;
    }
    .video-icon{
      background: url('../../assets/video-icon.png') no-repeat;
      background-size: 100%;
      width: 30px;
      height: 18px;
    }
  }
}

// 手机端适配
.moblie-wrap{
  padding-top: 14px;
  .box-hd{
    height: 30px;
  }
  .box-ft{
    .emoji-wrap{
      bottom: 54px;
    }
    .btn-send{
      height: 36px;
      line-height: 36px;
      padding: 0 10px;
      font-size: 16px;
      margin-bottom: 0;
    }
    .input-ctrl span {
      height: 40px;
      line-height: 40px;
      font-size: 16px;
    }
    .input-con{
      padding: 8px 0;
      align-items: center;
    }
    .input-wrap{
      padding: 10px 0;
      margin: 0 6px;
      .textarea{
        height: 26px;
        line-height: 20px;
      }
    }
    .more-icon{
      background-size: 30px 30px;
    }
    .emoji-icon{
      background-size: 30px 30px;
      margin-right: 4px;
    }
  }
}