.chat_tool_render {
  margin: 8px 0;
  border: 1px solid var(--design-borderColor);
  border-radius: 6px;
  overflow: hidden;

  .tool_header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4px;
    background-color: var(--design-block-background);
    cursor: pointer;
    user-select: none;

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

  .tool_name {
    font-size: 12px;
    display: flex;
    align-items: center;
    font-weight: 500;
    width: calc(100% - 20px);
    color: var(--design-text-foreground);
  }

  .tool_icon {
    font-size: 12px !important;
  }

  .tool_label {
    margin-left: 5px;
    font-size: 11px;
    color: var(--descriptionForeground);
    width: calc(100% - 36px);
    display: flex;
    align-items: center;
    justify-content: flex-start;

    .tool_prefix {
      color: var(--design-text-placeholderForeground);
      margin-right: 10px;
      flex-shrink: 0;
    }

    .tool_name {
      opacity: 0.8;
      font-size: 9px;
      flex: 1;
      text-overflow: ellipsis;
      direction: rtl;
      unicode-bidi: plaintext;
      overflow: hidden;
      white-space: nowrap;
      display: inline-block;
      margin-right: 10px;
      text-align: left;
    }
  }

  .expand_icon {
    display: inline-block;
    margin-right: 8px;
    transition: transform 0.2s;
    color: var(--design-text-placeholderForeground);

    &.expanded {
      transform: rotate(90deg);
    }
  }

  .tool_state {
    display: flex;
    align-items: center;
    font-size: 12px;
    color: var(--design-text-placeholderForeground);
  }

  .state_icon {
    display: flex;
    align-items: center;
    margin-right: 6px;
  }

  .loading_icon {
    width: 12px;
    height: 12px;
  }

  .state_label {
    margin-left: 4px;
  }

  .tool_content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    background-color: var(--design-container-background);

    &.expanded {
      max-height: 1000px;
    }
  }

  .tool_arguments,
  .tool_result {
    font-size: 11px;
    padding: 5px;
  }

  .section_label {
    font-size: 12px;
    color: var(--design-text-placeholderForeground);
    margin-bottom: 8px;
  }

  .tool_result {
    border-top: 1px solid var(--design-borderColor);
  }
}
