.tag-list-item {
  display: flex;
  font-size: 16px;
  flex-direction: row;
  justify-content: flex-start;
  align-items: center;

  &:hover {
    background-color: var(--secondary-highlight-color);
  }

  &.is-selected {
    background-color: var(--highlight-color);
  }

  .icon-button {
    &.button-trash {
      color: var(--accent-color);
    }

    &.button-reorder {
      color: var(--secondary-accent-color);
    }
  }

  .icon-button:last-child {
    margin-right: 10px;
  }
}

.tag-list-item:not(:last-child) {
  border-bottom: 1px solid var(--secondary-color);
}

body .tag-list-item {
  z-index: 2;
}

.tag-list {
  display: flex;
  flex-direction: column;
  flex: 0 1 auto;
  overflow: hidden;

  .tag-list-title {
    display: flex;
    flex: none;
    justify-content: space-between;
    align-items: center;
    padding: 0 17px 13px;
    border-bottom: 1px solid var(--secondary-color);

    h2 {
      color: var(--primary-color);
      font-size: 16px;
      font-weight: 400;
      margin: 0;
    }

    button {
      color: var(--accent-color);
      font-size: 14px;
      font-weight: 400;
      padding: 0 2px;
    }

    button:active {
      background: none;
    }

    .tag-list-edit-toggle {
      &:active {
        color: var(--background-color);
      }
    }
  }
}

.tag-list-items {
  flex: 1 1 auto;
  list-style: none;
  overflow-y: auto;
  padding-inline: 18px 0;
  padding-top: 0;
  padding-bottom: 0;
  margin: 0;

  svg {
    cursor: pointer;
  }
}

.tag-list-input {
  color: var(--primary-color);
  flex: 1 1 auto;
  display: block;
  width: 50px;
  line-height: 2em;
  padding: 6px 0 5px 13px;
  border: none;
  text-overflow: ellipsis;
  font-size: 100%;
  background: none;
  appearance: none;

  &.is-selected {
    color: var(--accent-color);
  }
}

button.tag-list-input {
  overflow-x: hidden;
  text-align: left;
}

input.tag-list-input {
  cursor: text;
}

.tag-list-editing {
  .tag-list-input {
    cursor: text;
    margin-right: 13px;

    &:focus {
      outline: none;
    }
  }
}

.is-electron .tag-list-items {
  padding-bottom: 2px;
  padding-top: 2px;
}
