.md-space-row-content-text-wrapper {
  display: flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  flex-grow: 1;

  &.text-row {
    overflow: hidden;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;

    mdc-text[data-test='list-item-second-line']::part(text) {
      margin-top: 0;
      width: unset;
    }
  }

  &.text-column {
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-start;

    mdc-text[data-test='list-item-second-line'] {
      margin: 0;
      margin-top: -4px;
    }
  }

  mdc-text {
    max-width: 100%;
  }

  mdc-text[data-test='list-item-first-line'] {
    color: var(--mds-color-theme-text-secondary-normal);
  }

  mdc-text[data-test='list-item-first-line']::part(text) {
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
    max-width: 100%;
  }

  mdc-text[data-test='list-item-second-line'] {
    margin: 0;
  }

  mdc-text[data-test='list-item-second-line']::part(text) {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
  }

  svg {
    margin-right: 0.5rem;
  }
}

.md-space-row-content-is-new-activity {
  mdc-text[data-test='list-item-first-line']::part(text) {
    font-weight: 750 !important;
    color: var(--mds-color-theme-text-primary-normal) !important;
  }

  mdc-text[data-test='list-item-first-line'][data-disabled='true'] {
    color: var(--mds-color-theme-text-primary-disabled) !important;
  }
}

.md-list-item-base-wrapper,
.md-tree-node-base-wrapper {
  .md-space-row-content-menu-trigger-wrapper {
    opacity: 0;
    position: absolute;
  }
}

.md-list-item-base-wrapper:hover,
.md-list-item-base-wrapper:focus-within,
.md-tree-node-base-wrapper:hover,
.md-tree-node-base-wrapper:focus-within {
  .md-space-row-content-menu-trigger-wrapper {
    opacity: 1;
    position: initial;
  }
}
