.tag {
  background-color: $dark;
  color: white;
  font-size: 0.9rem;
  padding: 0.15rem 0.4rem;
  border-radius: 0.25rem;
  //font-weight: 600;
  transition: filter 0.5s, background-color 0.5s;
  display: inline-block;
  text-align: center;

  &-bg-50{
    background-color: rgb(233, 48, 48);
  }
  &-bg-60{
    background-color: rgb(241, 131, 40);
  }
  &-bg-70{
    background-color: rgb(228, 215, 32);
  }
  &-bg-80{
    background-color: rgb(50, 211, 77);
  }
  &-bg-90{
    background-color: rgb(16, 129, 54);
  }
  &-bg-100{
    background-color: rgb(27, 121, 184);
  }
}

.tag-group {
  margin-right: 0.5rem;
  @include xmargin(".tag", 0.2rem);
}

.tag-primary {
  @extend .tag;
  background-color: $primary-color;
}

.tag-dark {
  @extend .tag;
  background-color: rgb(63, 63, 63)
}

.tag-userstate {
  @extend .tag;
  background-color: rgb(255, 196, 35);
  color: rgb(0, 0, 0);
  //border: 1px solid rgba(grey, 0.2);
}

.tag-muted {
  @extend .tag;
  background-color: rgb(206, 206, 206);
  color: rgb(66, 66, 66);
  border: 1px solid rgba(grey, 0.2);
}

a.tag:hover {
  color: white;
  filter: brightness(125%);
}

.tag-id {
  @extend .tag;
  letter-spacing: 1px;
  background-color: rgb(73, 73, 73);
  font-size: 0.9rem;
}

.tag-file {
  @extend .tag;
  color: black;
  text-align: left;
  //font-weight: 600;
  font-size: 0.8rem;
  background-color: rgb(255, 255, 244);
  border: 1px solid rgba(rgb(207, 207, 207), 0.1);
  //padding: 0.1rem 0.5rem;
}

.tag-online {
  @extend .tag;
  background-color: rgb(66, 192, 34);
  color: rgb(255, 255, 255);
  font-size: 0.9rem;
}

.tag-priority{
  @extend .tag;
  background-color: rgb(255, 0, 0);
  color: rgb(255, 255, 255);
  font-size: 0.9rem;
  letter-spacing: 1px;
}

.tag-role {

  &-admin {
    background-color: rgb(65, 60, 60);
  }

  &-postmaster {
    background-color: rgb(94, 38, 38);
  }

  &-spectator {
    background-color: rgb(139, 35, 96);
  }

  &-subject {
    background-color: rgb(52, 81, 100);
  }
}

.tag-delayed{
  @extend .tag;
  background-color: red;
  color: white;
  font-size: 1rem;
  font-weight: 600;
}

.tag-role{
  @extend .tag;
  background-color: rgb(97, 64, 141);
  color: white;
  font-size: 0.8rem;
}

.tag-shortname{
  @extend .tag;
  background-color: rgb(231, 231, 231);
  font-weight: 600;
  color: $primary-color;
}


@mixin forwarded-tag($color) {
  @extend .tag;
  border: 1px solid rgba(gray, 0.1);
  background-color: rgba($color, 0.6);
  color: rgb(31, 31, 31);
  font-size: 0.8rem;
  font-weight: 600;
}

@each $name, $color in $institutions {
  .tag-#{$name} {
    @include forwarded-tag($color)
  }
}

