
:root {
  --arg-list-avatar-bg: #{$arg-list-avatar-bg};
  --argue-list-item-secondary-text-color: #{$argue-list-item-secondary-text-color}
}

.argue-list {
  margin: 6px 0;
  padding: 0;
  list-style-type: none;

  &--title {
    @extend %field__label_above;

    a {
      @extend %link-next;

      &,
      &:hover,
      &:focus,
      &:active {
        cursor: pointer;
        color: inherit;
        text-decoration: none;
      }
    }

    &:last-child {
      // In argue section tree empty lists may occur.
      margin-bottom: 1.5rem;
    }
  }

  &--items {
    padding: 6px 0;

    span.empty {
      display: block;
      text-align: center;
      font-size: .85em;
      padding: .5rem 1.5rem;
    }
  }

  &.card__content-item {
    .argue-list {
      &--items {
        margin-left: -1.5rem;
        margin-right: -1.5rem;
      }

      &-item {
        padding-left: 1.5rem;
      }
    }
  }

}

.argue-list-item {
  display: flex;
  flex-direction: row;
  position: relative;
  align-items: center;
  justify-content: flex-start;
  box-sizing: border-box;
  height: 72px;
  padding: 3px 16px;
  margin: 0;
  overflow: hidden;

  &__graphic {
    margin-left: 0;
    margin-right: 16px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--arg-list-avatar-bg, $arg-list-avatar-bg);
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    fill: currentColor;
  }

  &.two-line {
    .argue-list-item {

      &__text {
        align-self: flex-start;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
      }

      &__primary-text {
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        display: block;
        margin-top: 0;
        line-height: normal;
        margin-bottom: -20px;

        &:before {
          content: "";
          display: inline-block;
          width: 0;
          height: 32px;
          vertical-align: 0;
        }
        &:after {
          content: "";
          display: inline-block;
          width: 0;
          height: 20px;
          vertical-align: -20px;
        }
      }
      &__secondary-text {
        @extend %arg-typo--subtitle2;
        color: var(--argue-list-item-secondary-text-color, $argue-list-item-secondary-text-color);
        text-decoration: inherit;
        text-transform: inherit;
        text-overflow: ellipsis;
        white-space: nowrap;
        overflow: hidden;
        display: block;
        margin-top: 0;

        &:before {
          content: "";
          display: inline-block;
          width: 0;
          height: 20px;
          vertical-align: 0;
        }
      }
    }
  }


  &__meta {
    margin-left: auto;
    margin-right: 0;
  }

  .argue-chip-set {
    flex-wrap: nowrap;
  }
}

a.argue-list-item {
  color: inherit;
  text-decoration: none;
  background-color: rgba(0,0,0,0);
  transition: all .5s ease;

  &:hover {
    background-color: rgba(0,0,0,.125);
  }
  &:focus {
    background-color: rgba(0,0,0,.25);
    box-shadow: none;
  }
}

.card-header + .argue-list {
  // Argue section tree may start with a list instead of title.
  // margin-top: -1rem;
}
