.Demio-Avatar {
  position: relative;
  z-index: 0;
  border-radius: 50%;
  width: 100%;
  height: 100%;
  display: inline-flex;
  align-content: center;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
  user-select: none;
  text-align: center;
  background: #EFF3F6;
  border: 2px solid #2C3336;
  flex-shrink: 0;
  // overflow auto is necessary for safari for the audio levels
  overflow: auto;

  &:not(.--error) {
    border: none !important;

    .Demio-Avatar__image {
      display: block;
    }
    .Demio-Avatar__initials {
      display: none;
    }
  }
}

.Demio-Avatar__image {
  display: none;
  border-radius: 50%;
  box-sizing: border-box;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
}

.Demio-Avatar__initials {
  color: #2C3336;
  width: 100%;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 12px;
  line-height: 1;
}

.Demio-Avatar__audio-level-container {
  position: absolute;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 50%;
}

.Demio-Avatar__audio-level {
  background: rgba(0, 0, 0, .15);
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  bottom: 0;
  z-index: 1;
  transform-origin: bottom;
  transition: transform .2s ease-out;
  transform: scaleY(0);
}

.Demio-Avatar__status {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 12px;
  height: 12px;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 50%;

  span {
    width: 8px;
    height: 8px;
    background: #02BF6F;
    border-radius: 50%;
  }
  &.Offline span {
    background: #DEE4E8;
  }
  &.Reconnecting span,
  &.Waiting span,
  &.Joining span {
    background: #fcdc5e;
  }
}
