#mainContent {
  width: 100%;
  height: 100%;

  .top-panel {
    width: 100%;
    height: 30px;
    display: flex;
    align-items: center;
    padding: 4px;
    box-sizing: border-box;

    .title-panel {
      width: 70%;
      height: 25px;
      display: flex;
      align-items: center;
      padding: 6px 0 0 6px;

      .equipmentType {
        width: 18px;
        height: 18px;
        margin-left: 5px;

        img {
          width: 100%;
          height: 100%;
          user-select: none;
        }
      }
    }

    /*操作栏样式:单聊*/
    .operate-panel {
      width: 29%;
      height: 25px;

      .ico-panel {
        width: 100%;
        height: 100%;
        display: flex;
        justify-content: flex-end;
        align-items: center;

        .item-panel {
          width: 20px;
          height: 20px;
          padding-right: 10px;

          img {
            width: 100%;
            height: 100%;
            user-select: none;
          }
        }
      }
    }

    /*操作栏样式:群聊*/
    .operate-group-panel {}
  }

  .messages-panel {
    width: 100%;
    min-height: 260px;
    overflow-y: auto;
    padding: 10px;
    box-sizing: border-box;

    .loading-msg-panel {
      width: 100%;
      height: 24px;
      display: flex;
      align-items: center;
      justify-content: center;

      img {
        height: 100%;
        user-select: none;
        animation: loading-msg 1s linear;
        // 动画无限循环
        animation-iteration-count: infinite;
      }
    }

    // 加载消息动画
    @keyframes loading-msg {
      0% {
        transform: rotate(0deg);
      }

      50% {
        transform: rotate(180deg);
      }

      100% {
        transform: rotate(360deg);
      }
    }

    .row-panel {
      width: 100%;
      min-height: 50px;

      /*对方消息样式*/
      .otherSide-panel {
        width: 96%;
        min-height: 50px;
        display: flex;
        margin-bottom: 15px;
        position: relative;

        .avatar-panel {
          width: 30px;
          min-width: 30px;
          height: 30px;
          border-radius: 50%;
          user-select: none;
          overflow: hidden;

          img {
            width: 100%;
            height: 100%;
            user-select: none;
          }
        }

        .user-name-panel {
          width: 240px;
          height: auto;
          position: absolute;
          left: 42px;
          top: 2px;
          display: flex;
          justify-content: flex-start;
          align-items: center;

          p {
            color: #9da9c6;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }

        .msg-body {
          max-width: 95%;
          min-height: 40px;
          overflow: hidden;
          background: #f4f3f3;
          border-radius: 5px;
          padding: 10px;
          box-sizing: border-box;
          margin-top: 28px;
          margin-left: 16px;
          position: relative;

          /*消息尾巴*/
          .tail-panel {
            width: 20px;
            height: 100%;
            position: absolute;
            left: -14px;

            svg {
              margin-top: 8px;
              color: #f3f3f3;
            }
          }

          p {
            font-size: 15px;
            /*自动换行*/
            word-wrap: break-word;
            overflow: hidden;

            img {
              width: 100%;
              height: 100%;
              user-select: none;
            }
          }
        }
      }

      .sender-time-panel {
        width: 100%;
        height: 30px;
        display: flex;
        justify-content: center;
        align-items: center;

        span {
          color: #CDCCCD;
        }
      }

      /*发送者消息样式*/
      .sender-panel {
        width: 96%;
        min-height: 50px;
        float: right;
        margin-right: 12px;
        display: flex;
        justify-content: flex-end;
        margin-bottom: 15px;
        position: relative;

        .avatar-panel {
          width: 30px;
          min-width: 30px;
          height: 30px;
          user-select: none;
          border-radius: 50%;
          overflow: hidden;

          img {
            width: 100%;
            height: 100%;
            user-select: none;
          }
        }

        .user-name-panel {
          width: 240px;
          height: auto;
          position: absolute;
          right: 42px;
          top: 2px;
          overflow: hidden;
          text-overflow: ellipsis;
          display: flex;
          justify-content: flex-end;
          align-items: center;

          p {
            color: #9da9c6;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
          }
        }

        .msg-body {
          max-width: 95%;
          min-height: 40px;
          background: #d8e8dc;
          overflow: hidden;
          border-radius: 5px;
          display: flex;
          align-items: center;
          padding: 10px;
          box-sizing: border-box;
          margin-top: 28px;
          margin-right: 16px;
          position: relative;

          /*消息尾巴*/
          .tail-panel {
            width: 20px;
            height: 100%;
            position: absolute;
            right: -18px;

            svg {
              margin-top: 8px;
              color: #f3f3f3;
            }
          }

          p {
            font-size: 15px;
            line-height: 23px;
            // 强制换行
            word-break: break-all;

            img {
              width: 100%;
              height: 100%;
              display: block;
              user-select: none;
            }
          }
        }
      }
    }
  }

  .user-input-panel {
    width: 100%;
    height: 160px;
    position: relative;

    .toolbar-panel {
      width: 100%;
      height: 40px;
      display: flex;
      align-items: center;
      padding-left: 10px;

      .item-panel {
        width: 24px;
        height: 24px;
        margin-right: 20px;
        display: flex;
        justify-content: center;
        align-items: center;

        .file-panel {
          width: 24px;
          height: 24px;
          position: relative;

          input[type="file"] {
            width: 24px;
            height: 24px;
            opacity: 0;
            position: absolute;
            left: 0;
            top: 0;
          }
        }

        img {
          width: 100%;
          height: 100%;
          user-select: none;
        }
      }

      .send-panel {
        width: 70px;
        height: 30px;
        background-image: linear-gradient(-90deg, #29bdd9 0%, #276ace 100%);
        text-align: center;
        color: white;
        border-radius: 5px;
        line-height: 30px;
        display: none;
      }
    }

    .input-panel {
      width: 100%;
      min-height: 30px;
      max-height: 120px;
      overflow-y: auto;
      outline: none;
      display: flex;
      align-items: center;
      flex-flow: row wrap;
      padding: 10px;
      box-sizing: border-box;
      // 强制换行
      word-break: break-all;
    }

    /*表情面板*/
    .emoticon-panel {
      width: 416px;
      height: 270px;
      border-radius: 5px;
      background: white;
      border: solid 1px #dfe0e0;
      padding: 20px;
      box-sizing: border-box;
      position: absolute;
      top: -268px;
      left: -186px;
      display: flex;
      justify-content: center;

      .container {
        overflow-y: auto;

        .row-panel {
          width: 100%;
          min-height: 30px;
          display: flex;
          align-items: center;
          flex-flow: row wrap;

          .item-panel {
            width: 25px;
            height: 25px;
            margin-right: 6px;
            margin-bottom: 7px;
            position: relative;

            // 取消12的倍数的元素的右外边距
            &:nth-child(12n) {
              margin-right: 0;
            }

            img {
              width: 100%;
              height: 100%;
              user-select: none;

              &:hover {
                width: 26px;
                height: 26px;
              }
            }
          }
        }
      }

      .ico-panel {
        width: 0;
        height: 0;
        border-right: 6px solid transparent;
        border-left: 6px solid transparent;
        border-top: 6px solid #dfe0e0;
        position: absolute;
        bottom: -6px;

        img {
          width: 100%;
          height: 100%;
          user-select: none;
        }
      }
    }
  }
}