.chat_context {
  position: relative;
  margin-bottom: 10px;
  background-color: var(--design-chatInput-background);
  padding: 10px;
  border-radius: 4px;
  border: 1px solid var(--design-borderColor);
  user-select: none;

  :global(.rc-collapse) {
    background-color: transparent !important;
    border-radius: none !important;
    border: none !important;
  }

  :global(.rc-collapse-title) {
    flex: 1 !important;
    line-height: 22px;
  }

  :global(.rc-collapse-expand-icon) {
    line-height: 1;

    :global(.kt-icon) {
      display: flex;
      justify-content: center;
      align-items: center;
    }
  }

  .collapse_hide {
    display: none;
  }

  :global(.rc-collapse-header) {
    padding: 0px !important;
    line-height: 1 !important;
  }

  :global(.rc-collapse-content) {
    padding: 0px !important;
    background-color: transparent !important;
  }

  .context_header {
    display: flex;
    align-items: center;
    justify-content: space-between;

    .chat_context_title {
      font-weight: 600;
      font-size: 11px;
      margin-bottom: 0px;
      color: var(--descriptionForeground);
    }
  }

  .context_selector {
    position: absolute;
    left: 0px;
    bottom: 40px;
    background-color: var(--design-container-background);
    padding: 10px;
    width: 100%;
    padding: 0px;
    border-radius: 4px;
    height: 350px;
    display: flex;
    flex-direction: column;
    user-select: none;
    box-shadow: 0px 9px 28px 8px var(--design-boxShadow-primary), 0px 3px 6px -4px var(--design-boxShadow-secondary),
      0px 6px 16px 0px var(--design-boxShadow-tertiary) !important;

    .context_list {
      font-size: 12px;
      overflow-y: auto;
      user-select: none;

      .list_desc {
        margin: 0px 10px;
        height: 30px;
        display: flex;
        align-items: center;
        font-weight: bold;
        color: var(--descriptionForeground);
      }

      .candidate_file {
        padding: 0px 10px;
        display: flex;
        align-items: center;
        height: 24px;
        cursor: pointer;

        &:hover {
          background-color: var(--button-hoverBackground);
        }

        .basename {
          color: var(--foreground);
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
          margin-left: 5px;
        }

        .dir {
          color: var(--descriptionForeground);
          margin-left: 15px;
          text-overflow: ellipsis;
          overflow: hidden;
          white-space: nowrap;
        }
      }

      .active {
        background-color: var(--editor-background);
        color: var(--foreground);
      }
    }

    .context_search_layer {
      position: absolute;
      width: 100%;
      height: 100%;
      background-color: var(--inputOption-hoverBackground);
    }
  }

  .file_list {
    margin-top: 5px;
    max-height: 300px;
    overflow-x: hidden;
    overflow-y: auto;

    .selected_item {
      display: flex;
      align-items: center;
      font-size: 11px;
      margin-right: 5px;
      width: 100%;
      overflow: hidden;
      text-overflow: ellipsis;
      padding: 0px 4px;
      margin-bottom: 4px;
      cursor: pointer;
      transition: all 0.2s;

      .close_icon {
        font-size: 12px !important;
        margin-left: auto;
      }

      :global(.kt-icon) {
        display: flex;
        font-size: 11px;
      }

      .basename {
        margin-left: 4px;
        color: var(--editor-foreground);
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
        width: 75%;

        &:hover {
          color: var(--badge-foreground);
        }
      }

      .dir {
        color: var(--descriptionForeground);
        margin-left: 15px;
        text-overflow: ellipsis;
        overflow: hidden;
        white-space: nowrap;
      }
    }
  }

  .add_context {
    display: inline-flex;
    justify-content: center;
    cursor: pointer;
    border-radius: 4px;
    font-size: 11px;
    margin-right: 5px;
    height: 24px;
    margin-top: 10px;
    align-items: center;
    user-select: none;
    transition: all 0.2s;
    color: var(--design-text-foreground);
    padding: 0px 5px;

    &:hover {
      border-color: var(--kt-selectOption-activeBorder);
    }
  }
}
