.c-avatar--no_image {
  background-color: $bg2;
}

.c-avatar__additional_overlay {
  color: $bg;
}

.c-avatar {
  .c-avatar__team_icon {
    box-shadow: 0 0 0 2px $borderLight;
  }

  .c-avatar__nonteam_icon {
    box-shadow: -1px 0 0 1px $selectFg;
  }
}

.c-avatar__badge--restricted {
  background: $bg;

  .c-avatar__badge_inner {
    background: $disabled;
  }
}

.c-avatar__badge--ultra_restricted {
  &:before {
    border-bottom: 16px solid $borderLight;
  }

  .c-avatar__badge_inner {
    border-bottom: 11px solid $disabled;

    &:before {
      box-shadow: inset -1px 2px $borderLight;
    }

    &:after {
      box-shadow: inset 2px -1px $borderLight;
    }
  }
}

.c-avatar__tooltip_detail {
  color: $hl;
}

.p-avatar_stack__count {
  background: $bg;
  color: $fg;

  &.p-avatar_stack__count--in_banner {
    box-shadow: 0 0 0 2px $primary;
  }
}

.p-avatar_stack__stack {
  &:hover {
    .p-avatar_stack__count {
      background-color: $bg;
      color: $fg;

      &.p-avatar_stack__count--in_banner {
        background-color: $bg2;
      }
    }

    .p-avatar_stack__avatar--in_banner,
    .p-avatar_stack__count.p-avatar_stack__count--in_banner {
      box-shadow: 0 0 0 2px $bg2;
    }
  }

  &:active {
    .p-avatar_stack__count {
      background: $selectBg;

      &.p-avatar_stack__count--in_banner {
        background: $selectBg;
      }
    }

    .p-avatar_stack__avatar--in_banner,
    .p-avatar_stack__count.p-avatar_stack__count--in_banner {
      box-shadow: 0 0 0 2px $bg2;
    }
  }
}

.p-avatar_stack__add_button--highlight {
  background-color: $button;

  &:hover {
    background: $accent;
  }

  &:active {
    background: $accent;
  }
}

.p-avatar_stack__tip_subtitle {
  color: $text;
}

.p-avatar_stack--details {
  box-shadow: 0 0 0 1px $bg;
  color: $text;

  &:hover {
    box-shadow: 0 0 0 1px $button 0 1px 3px 0 $button;
    background-color: $button;

    .p-avatar_stack__avatar {
      box-shadow: 0 0 0 2px $button;
    }
  }

  &:active {
    background-color: $hl;

    .p-avatar_stack__avatar {
      box-shadow: 0 0 0 2px $hl;
    }
  }
}

.p-avatar_stack--channel-details {
  border: 1px solid $button;

  &.p-avatar_stack--no-outline {
    border: none;
  }

  &:not(.p-avatar_stack--no-outline) .p-avatar_stack__stack:hover {
    background-color: $hl;
    color: $selectFg;
  }

  .p-avatar_stack__stack:hover .p-avatar_stack__count {
    background-color: $active;
  }

  .p-avatar_stack__stack_divider {
    background-color: $borderLight;
  }

  .p-avatar_stack__count {
    background: $button;
    color: $fg;
  }

  .p-avatar_stack__stack:hover .p-avatar_stack__count {
    background-color: $hl;
    color: $primary;
  }
}

.p-avatar_stack__avatar {
  background: $button;
  box-shadow: 0 0 0 2px $contrast;

  &.p-avatar_stack__avatar--placeholder {
    background-color: $button;
  }
}

.p-avatar_stack {
  color: $text;
}

.p-ia__view_header__avatar__presence--stroke {
  color: $bg;
  -webkit-text-stroke: 6px $bg;
}

.p-story_root_threads_message.p-threads_view_root {
  border: 1px solid $bg2;
}

.c-hidden_user_avatar,
.c-hidden_user_icon_and_name {
  background: transparent;
  color: $text;
}

.p-ia4_client .p-avatar_stack--details,
.p-window_layout_wrapper--ia4 .p-avatar_stack--details {
  border: 1px solid $borderLight;
}

.p-avatar_stack__presence_bg {
  background-color: $bg;
}
