@mixin ellipsisMultiline($lines) {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: $lines;
  overflow: hidden;
}

.textareaDiv {
  position: relative;

  .textarea:global(.ant-input) {
    height: 112px;
  }

  .count {
    position: absolute;
    right: 20px;
    bottom: 10px;
  }
}

.exampleDiv {
  width: 100%;
  overflow: auto;
  display: flex;
  margin-top: 20px;

  >* {
    width: 332px;
    height: 128px;
    object-fit: cover;
    border-radius: 8px;
    position: relative;
    padding: 16px;
    background: #F4F4F4;
    flex: none;

    p {
      font-size: 14px;
      line-height: 24px;
      color: #3D3D3D;
      margin: 0;
      @include ellipsisMultiline(3);
    }

    &:not(:first-child) {
      margin-left: 12px;
    }
  }
}



.main {
  padding: 24px;
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;

  h2 {
    font-size: 20px;
    font-weight: 600;
    line-height: 28px;
    margin: 0 0 26px;
    color: #1F2024;
    flex: none;
  }
}

.mainContent {
  flex: auto;
  display: flex;
  overflow: hidden;
}

.contentLeft {
  width: 50%;
  flex: none;
  background-color: #fff;
  position: relative;
}

.contentRight {
  flex: auto;
  background-color: #fff;
  overflow: auto;
  border-left: 1px solid #e9e9e9;
}

.entryContainer {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.entryDiv {
  flex: auto;
  padding: 24px 20px 0;
  overflow-y: auto;
  overflow-x: hidden;

  textarea:global(.ant-input) {
    padding: 20px;
    background-color: #F7F8F9;
    resize: none;
    border-radius: 8px;
    border: none;

    &:focus {
      box-shadow: none;
    }
  }

  .promptTextarea:global(.ant-input-textarea-show-count) {
    height: 135px;

    textarea:global(.ant-input) {
      background-color: #F7F8F9;
      border-radius: 8px;
      border: none;
    }

    :global {
      .ant-input-data-count {
        bottom: 20px;
        right: 20px;
      }
    }
  }

  h3 {
    font-weight: 600;
    font-size: 16px;
    line-height: 24px;
    color: #181818;
    margin-bottom: 16px;
    margin-top: 0;

    &:not(:first-child) {
      margin-top: 24px;
    }

    span {
      font-size: 14px;
      font-weight: 400;
    }
  }
}

.submitDiv {
  padding: 24px 20px;
  flex: none;
  display: flex;

  button:global(.ant-btn) {
    height: 40px;
    flex: auto;

    &:hover {
      background: #1366ec !important;
    }

    &:disabled {
      background-color: #9DB7FA !important;
      color: #fff;
      border: none;
    }
  }

}

.resetDiv {
  width: 40px;
  height: 40px;
  border: 1px solid #E9E9E9;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 16px;
  border-radius: 4px;
  cursor: pointer;

  i {
    color: #3D3D3D;
    display: flex;
    align-items: center;
  }

  &:hover {
    background-color: #1366ec;
    border-color: #1366ec;

    i {
      color: #fff;
    }
  }
}


.exampleItemBg {
  display: none;
}

.exampleItem {
  overflow: hidden;
  position: relative;
  border-radius: 8px;
  background-color: #F4F4F4;
  border: 1px solid transparent;

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

  .tag {
    padding: 0 8px;
    background-color: #E5E5E5;
    margin: 0 2px;
    border-radius: 4px;
  }

  >span {
    font-size: 10px;
    color: #1366ec;
    display: flex;
    align-items: center;
    height: 16px;
    padding: 0 5px;
    background-color: #D6E2FF;
    position: absolute;
    top: 10px;
    left: 0;
    z-index: 9;
  }

  &.active {
    border-color: #1366ec;
    background-color: rgba(27, 88, 244, 0.08);

    .exampleItemBg {
      >button:global(.ant-btn) {
        display: none;
      }

      >div {
        &:nth-last-child(2) {
          margin-right: 0;
        }
      }
    }
  }

  &:hover,
  &.exampleLoading {
    border-color: transparent;

    .exampleItemBg {
      position: absolute;
      top: 0;
      left: 0;
      right: 0;
      bottom: 0;
      display: flex;
      align-items: center;
      justify-content: center;
      z-index: 10;
      border: 1px solid #1366ec;
      border-radius: 8px;
      background: rgba(255, 255, 255, 0.3);
      backdrop-filter: blur(4px);
      color: #1366ec;

      >button:global(.ant-btn) {
        font-size: 14px;
        height: 24px;
        padding: 0 8px;
        border-radius: 2px;
        font-weight: 400;
      }

      >div {
        width: 24px;
        height: 24px;
        display: flex;
        align-items: center;
        justify-content: center;
        margin-right: 10px;
        background-color: #fff;
        border-radius: 50%;
        font-size: 14px;
        cursor: pointer;
        border: 1px solid #e9e9e9;

        >i {
          color: #808080;
        }

        &:hover {
          background-color: #1366ec;

          i {
            color: #fff;
          }
        }
      }
    }
  }
}


.segmented {
  margin: 24px 0 16px;
  overflow: hidden;
  display: flex;

  >* {
    cursor: pointer;
    height: 36px;
    line-height: 36px;
    min-width: 104px;
    text-align: center;
    padding: 0 12px;
    color: #808080;
    border: 1px solid #e9e9e9;

    &.active {
      border-color: transparent;
      color: #181818;
      background-color: rgba(27, 88, 244, 0.08);
    }

    &:hover {
      color: #181818;
    }

    &:first-child {
      border-radius: 4px 0 0 4px;
      border-right: none;
    }

    &:last-child {
      border-left: none;
      border-radius: 0 4px 4px 0;
    }
  }
}

.emptyFileList {
  width: 100%;
  height: 88px;
  border-radius: 8px;
  background: #F7F8F9;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: #808080;
}

.uploadItemBg {
  display: none;
}

.fileList {
  display: grid;
  grid-template-columns: repeat(auto-fill, 158px);
  gap: 8px;

  >* {
    width: 158px;
    height: 88px;
    background-color: #f4f4f4;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;

    &:hover,
    &.uploadItemLoading {
      border-color: transparent;

      .uploadItemBg {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 10;
        border: 1px solid #1366ec;
        border-radius: 8px;
        background: rgba(255, 255, 255, 0.3);
        backdrop-filter: blur(4px);
        color: #1366ec;

        .loadingContainer {
          display: flex;
          flex-direction: column;
          align-items: center;
          justify-content: center;

          >span {
            margin-top: 6px;
            font-size: 12px;
            color: #808080;
          }
        }

        .icons {
          width: 24px;
          height: 24px;
          display: flex;
          align-items: center;
          justify-content: center;
          background-color: #fff;
          border-radius: 50%;
          font-size: 14px;
          cursor: pointer;
          border: 1px solid #e9e9e9;

          &:not(:first-child) {
            margin-left: 10px;
          }

          >i {
            color: #808080;
          }

          &:hover {
            background-color: #1366ec;

            i {
              color: #fff;
            }
          }
        }
      }
    }
  }
}

.custom-choose {
  width: 95px;
  height: 36px;
  border: 1px solid 1px;
  color: #808080;
  border-radius: 4px;
  line-height: 36px;
  text-align: center;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #F5F6F7;

  span {
    margin-left: 4px;
  }

  &.active {
    border: 1px solid #1B58F4;
    background-color: #EDF2FF;
    color: #1B58F4;
  }
}

.template-container {
  // width: 72px;
  height: 72px;
  border: 1px solid 1px;
  color: #808080;
  border-radius: 4px;
  // line-height: 36px;
  text-align: center;
  cursor: pointer;
  // display: flex;
  // align-items: center;
  justify-content: center;
  background-color: #F5F6F7;

  span {
    margin-left: 4px;
  }

  &.active {
    border: 1px solid #1B58F4;
    background-color: #EDF2FF;
    color: #1B58F4;
  }
}

.imgContainer {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 5px;

  img {
    width: 70px;
    border-radius: 4px;
  }
}

.exampleItem {
  .flex {
    display: flex;

    >span {
      font-size: 10px;
      color: #1366ec;
      display: flex;
      align-items: center;
      height: 16px;
      padding: 0 5px;
      background-color: #D6E2FF;
      position: absolute;
      top: 10px;
      left: 0;
      z-index: 9;
    }
  }

  img {
    height: 96px;
    width: 67px;
    margin-right: 10px;
  }
}

.flex {
  display: flex;
  margin-bottom: 20px;
}

.mb20 {
  margin-bottom: 10px;
  display: flex;
}

.mr300 {
  margin-left: 210px;
}

.slider {
  overflow-x: scroll;
  overflow-y: hidden;
  height: 105px;
}