@import "variables";

:host {
  display: flex;
  position: relative;
  height: 18px;
  line-height: 18px;
  overflow: hidden;
  padding-right: 20px;

  &:hover {
    max-width: var(--max-hover-width);
  }

  .content {
    border-radius: 3px 0 0 3px;
    display: inline-block;
    position: relative;
    z-index: 2;
    height: 18px;
    flex: 1;
    padding-left: 8px;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 12px;
    white-space: nowrap;

    &.add-button {
      border-left: solid 1px $blue-280;
      border-top: solid 1px $blue-280;
      border-bottom: solid 1px $blue-280;
      cursor: pointer;
      font-size: 10px;
      font-weight: 500;
      padding-left: 4px;
    }
  }

  .remove {
    visibility: hidden;
    position: absolute;
    right: 5px;
    top: 0;
    z-index: 100;
    line-height: inherit;
    cursor: pointer;
    transform: scale(0.4);
    transform-origin: center;
    transition: transform 0.25s;
  }

  .arrow {
    transform: rotate(45deg);
    content: '';
    position: absolute;
    right: 6px;
    top: -6px;
    width: 30px;
    height: 30px;
    background-color: inherit;

    &.add-button {
      border-right: solid 1px $blue-280;
      border-top: solid 1px $blue-280;
      right: 17px;
    }
  }

  .mat-mdc-progress-spinner {
    position: absolute;
    z-index: 1;
    top: 2.3px;
    right: 4px;
  }

  &:hover {
    .remove {
      visibility: visible;
      transform: scale(0.8);
    }
  }
}
