.TUIChat {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  position: absolute;

  &-header {
    padding: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;

    h1 {
      font-size: 16px;
      line-height: 30px;
    }
  }

  &-safe-tips {
    padding: 12px 20px;
    background-color: rgba(255, 149, 0, 0.1);
    color: #FF8C39;
    line-height: 18px;
    font-family: 'PingFang SC';
    font-style: normal;
    font-weight: 400;
    text-align: justify;
    font-size: 12px;

    a {
      color: #006EFF;
      float: right;
    }
  }

  .TUIChat-setting {
    position: absolute;
    right: 0;
    height: calc(100% - 40px);
    z-index: 2;
    top: 40px;
  }

  &-main {
    min-height: 0px;
    flex: 1;
    position: relative;
    display: flex;
    flex-direction: column;
  }

  &-footer {
    height: 173px;
    display: flex;
    flex-direction: column;

    .input {
      flex: 1;
      position: relative;
      display: flex;
      flex-direction: column;

      textarea {
        width: 100%;
        line-height: 20px;
        margin: 0;
        padding: 2px 20px;
        resize: none;
        box-sizing: border-box;
        border: none;
        background: no-repeat;

        &:focus {
          outline: none;
          border: none;
        }
      }

      p {
        padding: 12px 20px 20px;
      }

      .input-btn {
        position: absolute;
        bottom: 20px;
        right: 20px;
        padding: 8px 20px;
        border-radius: 4px;
        border: none;
        font-size: 14px;
        text-align: center;
        line-height: 20px;

        &:hover {
          .input-btn-hover {
            display: flex;
          }
        }

        &-hover {
          display: none;
          justify-content: center;
          align-items: center;
          position: absolute;
          right: 120%;
          word-break: keep-all;
          height: 30px;
          white-space: nowrap;
          top: 0;
          bottom: 0;
          margin: auto 0;
          padding: 5px 10px;
          border-radius: 3px;

          &::before {
            content: "";
            position: absolute;
            width: 0;
            height: 0;
            right: -20px;
          }
        }
      }
    }
  }

  .disabled {
    position: relative;

    &::before {
      content: '';
      position: absolute;
      width: 100%;
      height: 100%;
    }
  }
}

.TUI-message-list {
  flex: 1;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  position: relative;

  .message-more {
    font-size: 0.9rem;
    padding: 5px;
    text-align: center;
  }

  li:first-child {
    margin-top: 5px;
  }

  li {
    display: flex;
    position: relative;
    padding: 0 20px 30px;
    flex-direction: column;

    .message-label {
      max-width: 50px;
    }
  }

  .right {
    flex-direction: row-reverse;
    justify-content: flex-start;
  }

  .to-bottom-tip {
    position: sticky;
    bottom: 10px;
    left: 100%;
    margin-right: 15px;
    width: 92px;
    height: 28px;
    padding: 0 5px;
    background: #FFFFFF;
    border: 1px solid #E0E0E0;
    box-shadow: 0 4px 12px 0 rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    border-radius: 3px;

    .icon {
      width: 10px;
      height: 10px;
    }

    &-cont {
      font-family: PingFangSC-Regular;
      font-weight: 400;
      font-size: 10px;
      color: #147AFF;
      letter-spacing: 0;
      text-align: center;
      padding-left: 3px;
    }
  }
}

.dialog {
  position: absolute;
  z-index: 5;

  &-item {
    min-width: min-content;
    max-width: 220px;
    width: 72px;
    word-break: keep-all;
    top: 30px;
    border-radius: 8px;
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    white-space: nowrap;

    li:first-child {
      margin-top: 0;
    }

    li {
      padding: 4px 12px;
      font-size: 12px;
      line-height: 17px;
      display: flex;
      flex-direction: row;
      align-items: center;
      flex-direction: row;

      span {
        padding-left: 4px;
      }
    }
  }

  &-conversation {
    .avatar {
      width: 36px;
      height: 36px;
      margin: 0 5px 0 8px;
    }

    .name {
      font-size: 14px;
    }
  }

  &-userInfo {
    box-sizing: border-box;
    padding: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: flex-end;

    .userInfo-main {
      height: 100%;
      box-sizing: border-box;
      padding: 20px;
      width: 240px;

      header {
        display: flex;
        justify-content: space-between;
        align-items: center;
      }

      main {
        display: flex;
        padding: 20px 0;

        ol {
          flex: 1;
          display: flex;
          flex-wrap: wrap;

          dl {
            position: relative;
            flex: 0 0 33%;
            display: flex;
            flex-direction: column;
            align-items: center;

            img {
              width: 40px;
              height: 40px;
            }

            .more {
              padding-top: 10px;
            }

            dd {
              max-width: 60px;
              overflow: hidden;
              text-overflow: ellipsis;
              white-space: nowrap;
            }

            .userInfo-mask {
              position: absolute;
              z-index: 5;
              padding: 20px;
              left: 100%;

              li {
                display: flex;
                align-items: center;

                label {
                  width: 60px;
                }

                span {
                  max-width: 200px;
                  word-break: keep-all;
                }
              }
            }
          }
        }
      }
    }
  }
}

.image-dialog {
  position: fixed;
  z-index: 5;
  width: 100vw;
  height: calc(100vh - 63px);
  top: 63px;
  left: 0;

  header {
    display: flex;
    justify-content: flex-end;
    width: 100%;
    box-sizing: border-box;
    padding: 10px 10px;
  }
}

.memberList-box {
  position: absolute;
  bottom: 128px;
  width: 21.94rem;
  max-height: 10rem;
  overflow-y: auto;
  background: #FFFFFF;
  box-shadow: 0 0.06rem 0.63rem 0 rgba(2, 16, 43, 0.15);
  border-radius: 0.13rem;

  &-header {
    height: 2.5rem;
    padding-top: 5px;
    cursor: pointer;

    &:hover {
      background: rgba(0, 110, 255, 0.10);
    }
  }

  span {
    font-family: PingFangSC-Regular;
    font-weight: 400;
    font-size: 0.88rem;
    color: #000000;
    letter-spacing: 0;
    padding-left: 5px;
  }

  &-body {
    height: 2.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;

    &:hover {
      background: rgba(0, 110, 255, 0.10);
    }
  }

  img {
    width: 1.5rem;
    height: 1.5rem;
    padding-left: 10px;
  }

  .selected {
    background: rgba(0, 110, 255, 0.10);
  }
}

.reply {
  display: flex;
  width: 100%;

  &-box {
    flex: 1;
    align-items: center;
    display: flex;
    padding: 0 18px;

    i {
      height: 3.5rem;
      border: 1px solid #E8E8E9;
    }

    label {
      margin-top: 5px;
    }

    &-show {
      flex: 1;
      display: flex;
      width: 0;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      flex-direction: column;
      justify-content: center;
      padding-left: 6px;

      span {
        height: 1.25rem;
        font-family: PingFangSC-Regular;
        font-weight: 400;
        font-size: 0.88rem;
        color: #BFC1C5;
        letter-spacing: 0;
        text-overflow: ellipsis;
        width: 100%;
        overflow: hidden;
      }
    }
  }
}

.reference {
  width: auto;
  padding-bottom: 0px;
  margin: 0px 100px 10px 10px;
  display: flex;

  &-box {
    padding: 0;
    overflow: hidden;
    width: max-content;
    padding: 10px;
    background-color: #fbfbfb;
    display: flex;
    border-radius: 8px;

    &-show {
      width: max-content;
      padding-right: 10px;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow: hidden;
      flex: 1;

      &-name {
        padding-right: 5px;
      }

      span {
        width: max-content;
        font-family: 'PingFang SC';
        font-style: normal;
        font-weight: 400;
        font-size: 12px;
        line-height: 17px;
        color: #666666;
      }
    }
  }
}

.btn {
  padding: 8px 20px;
  border-radius: 4px;
  border: none;
  font-size: 14px;
  text-align: center;
  line-height: 20px;
}

.toggleMask {
  &::before {
    position: fixed;
    z-index: 1;
    content: "";
    width: 100vw;
    height: 100vh;
    top: 0;
    left: 0;
    opacity: 0;
  }
}

::-webkit-scrollbar {
  width: 6px;
  height: 140px;
  background-color: transparent;
}

::-webkit-scrollbar-track {
  border-radius: 10px;
}

::-webkit-scrollbar-thumb {
  border-radius: 10px;
  background-color: #9A999C;
}