.chat-container {
  width: 100%;
  height: calc(100vh - 80px);
  overflow: hidden;
  box-sizing: border-box;
  display: flex;
  padding: 0 20px 20px;
  // box-shadow: 0 2px 30px rgba(0, 0, 0, 0.03);
  // background: linear-gradient(318deg, #eaf4fd 0%, #f0f2f5 58%, #edf2ff 100%);

  .chat-left {
    width: 260px;
    height: 100%;
    display: flex;
    flex-direction: column;
    transition: all 0.5s;
    padding: 16px;
    box-sizing: border-box;
    border-radius: 12px;

    &-title {
      font-weight: 600;
      font-size: 18px;
      color: #333333;
      margin-bottom: 10px;
      white-space: nowrap;
    }

    &-top {
      width: 100%;
      margin-bottom: 22px;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      flex-shrink: 0;

      .chat-select {
        width: 100%;
        height: 40px;
        display: flex;
        justify-content: center;
        align-items: center;
        margin-bottom: 15px;
        background-color: var(--sznb-hover-background);
        border-radius: 40px;
        cursor: pointer;

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

        span {
          font-weight: bolder;
          margin: 0 5px;
          max-width: calc(100% - 70px);
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }
      }

      &-all {
        width: 100%;
        height: 46px;
        background-color: #1d80fb;
        border-radius: 8px;
        margin-bottom: 12px;
        padding: 0 14px;
        box-sizing: border-box;
        display: flex;
        align-items: center;
        cursor: pointer;

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

        div {
          flex: 1;
          display: flex;
          align-items: center;
          justify-content: space-between;
          font-weight: 600;
          font-size: 16px;
          color: #ffffff;
          margin-left: 10px;
        }
      }

      &-chat {
        display: flex;
        width: 100%;

        .new-chat {
          display: flex;
          align-items: center;
          justify-content: center;
          background-color: var(--sznb-main-button-background);
          font-size: 14px;
          color: #ffffff;
          height: 40px;
          border-radius: 13px;
          transition: all 0.3s;
          cursor: pointer;

          &:hover {
            opacity: 0.7;
          }

          img {
            width: 20px;
            height: auto;
          }

          span {
            margin-left: 5px;
            flex-shrink: 0;
          }
        }

        .search-box {
          display: flex;
          align-items: center;
          justify-content: center;
          height: 40px;
          border-radius: 40px;
          background-color: var(--sznb-chat-search-background);
          padding: 8px;
          box-sizing: border-box;
          transition: all 0.3s;
          cursor: pointer;

          &:hover {
            opacity: 0.7;
          }

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

          .el-input__wrapper {
            box-shadow: unset;
            border: unset;
            background-color: transparent;
          }
        }
      }
    }

    &-list {
      height: 0;
      flex: 1;
      width: 100%;
      display: flex;
      flex-direction: column;
      overflow: hidden auto;
      scrollbar-width: none;

      &::-webkit-scrollbar {
        width: 0;
      }

      &-inner {
        width: 100%;
        box-sizing: border-box;
      }

      &-item {
        width: 100%;
        height: 40px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        position: relative;
        box-sizing: border-box;
        padding: 0 8px;
        margin-bottom: 4px;
        cursor: pointer;

        &-top_icon {
          position: absolute;
          top: 0;
          right: 0;
          width: 11px;
          height: 11px;
        }

        &-left {
          width: 190px;
          display: flex;
          flex-direction: column;
          justify-content: space-between;
          font-weight: 400;
          font-size: 14px;
          color: #999999;
        }

        p {
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
          font-weight: 500;
          font-size: 14px;
          color: #333333;
          margin: 0;
        }

        .el-dropdown-link {
          display: flex;
          align-items: center;
          justify-content: center;
          cursor: pointer;
        }

        .list-dropdown {
          visibility: hidden;
        }

        &-active,
        &:hover {
          background-color: var(--sznb-hover-background);
          color: var(--sznb-hover-color);
          border-radius: 10px;

          p {
            color: var(--sznb-hover-color);
          }

          .list-dropdown {
            visibility: visible;
          }
        }
      }
    }
  }

  .chat-right {
    position: relative;
    width: 0;
    height: 100%;
    flex: 1 0 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0 80px 0;
    box-sizing: border-box;
    transition: width 0.3s;

    &-input {
      width: 100%;
      max-width: 800px;
      min-width: 320px;
      margin: 0 auto;
      border-radius: 12px;
      padding: 12px 16px;
      background-color: #ffffff;
      box-sizing: border-box;
      border: 1px solid #d0d0d0;
      z-index: 100;
      display: flex;
      align-items: flex-end;

      &:focus-within,
      &:hover {
        border: 1px solid transparent;
        background-clip: padding-box, border-box;
        background-origin: padding-box, border-box;
        background-image: linear-gradient(to right, #ffffff, #ffffff), linear-gradient(274deg, #0050FE 0%, #9AE4FF 30%, #DC60FF 57%, #FF9B52 100%);
      }

      .el-textarea__inner {
        box-shadow: unset;
      }

      .send-svg-btn {
        color: var(--sznb-chat-AI-color);
        cursor: pointer;
        font-size: 24px;

        &:active {
          border: none;
        }

        &:hover {
          color: var(--sznb-hover-color);
        }
      }

      .send-box {
        width: 36px;
        height: 36px;
        border-radius: 36px;
        background: var(--sznb-chat-send-default);
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: not-allowed;
        color: #ffffff;
        flex-shrink: 0;

        &-active {
          cursor: pointer;
          background: var(--sznb-chat-send-active);
        }
      }

      .stop-img {
        width: 36px;
        height: 36px;
        cursor: pointer;
      }
    }

    &-box {
      width: 100%;
      max-width: 800px;
      flex: 1;
      height: 0;
      overflow-y: scroll;
      scrollbar-width: none;
      margin: 0 auto;

      &::-webkit-scrollbar {
        width: 0;
      }
    }

    &-scrollWrapper {
      position: relative;
      height: 0;
      width: 100%;

      .to-bottom-btn {
        position: absolute;
        left: 50%;
        bottom: 6px;
        transform: translateX(-50%);
        transition: all 0.2s ease;
        z-index: 2000;
      }
    }

    &-tool {
      width: 100%;
      max-width: 800px;
      min-width: 300px;
      margin: 10px auto;
      display: flex;
      align-items: center;
      justify-content: space-between;
    }

    &-title {
      font-size: 28px;
      color: #333b57;
      text-align: center;
      font-weight: 500;
      margin-bottom: 50px;
      flex: 1;
      height: 0;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      overflow-y: auto;
    }

    &-default {
      width: 800px;
      flex: 1;
      height: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
      overflow-y: auto;
      margin: 0 auto;
    }

    &-welcome {
      font-size: 16px;
      background: #ffffff;
      width: 600px;
      display: flex;
      align-items: center;
      padding: 16px;
      cursor: pointer;
      border-radius: 8px;
      color: var(--sznb-chat-AI-color);
      transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);

      &:hover {
        color: var(--sznb-hover-color);
        background: var(--sznb-hover-background);
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05),
        0 8px 10px -6px rgba(0, 0, 0, 0.05);
      }

      p {
        flex: 1;
        margin: 0 20px 0 0;
        text-align: left;
      }

      & + {
        margin-top: 8px;
      }
    }

    &-message {
      padding-bottom: 20px;

      &-item {
        display: flex;
        width: 100%;
        margin-bottom: 10px;

        .avatar {
          width: 50px;
          height: 50px;
          margin-right: 10px;
          border-radius: 50%;
        }

        &-inner {
          width: 100%;
          display: flex;
          flex-direction: column;

          .my-content {
            width: fit-content;
            max-width: 80%;
            background: var(--sznb-chat-mine-background);
            border-radius: 8px;
            font-size: 16px;
            font-weight: 400;
            line-height: 26px;
            padding: 12px 16px;

            &-inner {
              font-size: 14px;
              color: var(--sznb-chat-mine-color);
              white-space: pre-wrap;
            }
          }

          .ai-content {
            min-height: 50px;
            width: 100%;
            background: var(--sznb-chat-AI-background);
            border-radius: 8px;
            font-weight: 400;
            line-height: 20px;
            color: var(--sznb-chat-AI-color);
            padding: 12px 16px;
            position: relative;
            box-sizing: border-box;
            overflow: hidden;

            &-inner {
              position: relative;
            }

            > div {
              width: 100%;
            }

            .chat-references {
              margin-top: 16px;

              &-title {
                font-size: 16px;
                font-weight: bold;
              }

              &-item {
                font-size: 14px;
                cursor: pointer;
                text-indent: 20px;
                position: relative;
                line-height: 28px;

                &:before {
                  content: '';
                  width: 4px;
                  height: 4px;
                  background: var(--sznb-chat-AI-color);
                  border-radius: 50%;
                  position: absolute;
                  left: 6px;
                  top: 11px;
                }

                &:hover {
                  color: var(--sznb-main-color);
                }
              }
            }
          }

          .loadTxt {
            background: -webkit-linear-gradient(to right, #9967f1, #0165f8);
            background: linear-gradient(to right, #9967f1, #0165f8);
            -webkit-background-clip: text;
            background-clip: text;
            -webkit-text-fill-color: transparent;
            color: transparent;
            font-size: 16px;
          }

          .source-box {
            margin-top: 16px;
          }

          .source-item {
            padding: 8px 0;
            font-size: 18px;
            color: #333333;
            cursor: pointer;

            &:hover {
              text-decoration: underline;
            }
          }

          .suggest-item {
            width: fit-content;
            background: var(--sznb-chat-AI-background);
            border-radius: 8px;
            color: #666666;
            cursor: pointer;
            line-height: 24px;
            margin-top: 12px;
            padding: 8px 16px;
            transition: 0.2s ease;
            font-size: 12px;

            &:hover {
              color: var(--sznb-main-color);
            }
          }
        }

        &-btn {
          width: 100%;
          display: flex;
          justify-content: space-between;
          align-items: center;
          margin-top: 8px;

          .svg-btn {
            cursor: pointer;
            font-size: 14px;

            &:active {
              border: none;
            }

            + .svg-btn {
              // margin-left: 10px;
            }

            &:hover {
              color: var(--sznb-hover-color);
            }
          }

          .svg-btn-active {
            color: var(--sznb-hover-color);
          }
        }
      }

      .rtl {
        flex-direction: row-reverse;
        justify-content: flex-start;
        margin-bottom: 15px;

        .avatar {
          margin-right: 0;
          margin-left: 10px;
          border: 1px solid #ececec;
        }
      }
    }

    &-add {
      position: absolute;
      top: 20px;
      left: -20px;
      width: 32px;
      height: 32px;
      display: flex;
      align-items: center;
      justify-content: center;
      color: #ffffff;
      background-color: #2e98ff;
      border-radius: 50%;
      cursor: pointer;
    }

    .layout-change {
      position: absolute;
      bottom: 10px;
      left: -20px;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: 0 4px 8px #dddddd;
      cursor: pointer;

      &:hover {
        opacity: 0.7;
      }

      img {
        width: 100%;
        height: 100%;
      }

      &:hover {
        background-color: #f5f5f5;
      }
    }
  }
}

.file-list {
  width: 100%;
  display: flex;
  flex-wrap: wrap;

  .file-item {
    width: 24%;
    height: 48px;
    display: flex;
    align-items: center;
    margin-right: 10px;
    margin-bottom: 10px;
    padding: 9px 6px;
    box-sizing: border-box;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    position: relative;
    cursor: pointer;
    background: #ffffff;

    img {
      width: 28px;
      height: 28px;
      margin-right: 10px;
      flex-shrink: 0;
    }

    &-info {
      width: 65%;
      font-size: 12px;
      color: #333333;
      display: flex;
      flex-direction: column;

      span {
        width: 100%;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }

      span:last-child {
        font-size: 10px;
        color: #999999;
        margin-top: 4px;
      }
    }

    .file-del {
      position: absolute;
      font-size: 14px;
      right: 6px;
      top: 6px;
      cursor: pointer;
      display: none;
    }

    &:hover {
      .file-del {
        display: block;
      }
    }
  }
}

.file-list-chat {
  justify-content: flex-end;

  .file-item {
    margin: 10px 0 0 10px;
  }
}

.rotating-anm {
  animation: rotating 1s linear infinite;
}

@keyframes rotating {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}

.chat-workflow-status {
  background: var(--sznb-chat-AI-think-toggle-background);
  user-select: none;
  border-radius: 8px;
  display: flex;
  justify-content: center;
  align-items: center;
  width: fit-content;
  padding: 7px 14px;
  font-size: 12px;
  color: var(--sznb-chat-AI-think-toggle-color);
  margin-bottom: 8px;
}
