.avatar {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  font-weight: bold;
  font-size: 10px;
  overflow: hidden;
  color: $white;
  flex-shrink: 0;

  @include rounded($rounded-md);
}

.avatar__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.avatar__icon {
  font-size: 14px;
}

.avatar--small {
  width: 14px;
  height: 14px;
  font-size: 7px;

  @include rounded($rounded);

  .avatar__icon {
    font-size: 8px;
  }
}

.avatar--medium {
  width: 24px;
  height: 24px;
}

.avatar--large {
  width: 32px;
  height: 32px;
  font-size: 11px;

  .avatar__icon {
    font-size: 16px;
  }
}

.avatar--x-large {
  width: 40px;
  height: 40px;
  font-size: 13px;

  .avatar__icon {
    font-size: 18px;
  }
}

.avatar--rounded {
  @include rounded($rounded-3xl);
}

.avatar--blue {
  background: $palette-blue-500;
}

.avatar--cyan {
  background: $palette-cyan-500;
}

.avatar--green {
  background: $palette-green-500;
}

.avatar--yellow {
  background: $palette-yellow-500;
}

.avatar--red {
  background: $palette-red-500;
}

.avatar--magenta {
  background: $palette-magenta-500;
}

.avatar--purple {
  background: $palette-purple-500;
}

.avatar--neutral {
  background: $palette-neutral-500;
}

.avatar--transparent {
  background: transparent;

  .avatar__icon {
    color: $palette-neutral-1100;
  }
}
