.jsxc-window-item {
  &.jsxc-groupchat.jsxc-normal {
    &.jsxc-disabled {
      .jsxc-window-fade::before {
        background-color: rgba(167, 167, 167, 0.5);
        bottom: 0;
        content: "";
        left: 0;
        position: absolute;
        right: 0;
        top: 0;
        z-index: 50;
      }

      .jsxc-destroy,
      .jsxc-leave,
      .jsxc-configure,
      .jsxc-managememberlist {
        display: none;
      }
    }

    .jsxc-fingerprints,
    .jsxc-verification,
    .jsxc-transfer,
    .jsxc-video,
    .jsxc-audio,
    .jsxc-share-screen,
    .jsxc-destroy,
    .jsxc-configure,
    .jsxc-managememberlist {
      display: none;
    }

    &[data-affiliation="owner"] {
      .jsxc-destroy,
      .jsxc-configure,
      .jsxc-managememberlist {
        display: inherit;
      }
    }

    &[data-affiliation="admin"] {
      .jsxc-managememberlist {
        display: inherit;
      }
    }

    .jsxc-members {
      position: relative;

      &::after {
        background-color: #fff;
        border-radius: 6px;
        color: #000;
        content: attr(data-number-of-members);
        font-size: 12px;
        line-height: 1;
        margin-right: -1.3em;
        margin-top: -1.6em;
        padding: 0.1em;
        position: absolute;
        right: 50%;
        top: 50%;
      }

      &:hover {
        opacity: 1;
      }
    }

    .jsxc-chatmessage.jsxc-in,
    .jsxc-chatmessage.jsxc-probably_in {
      margin-left: 50px;

      .jsxc-avatar {
        background-color: #777;
        display: block;
        left: -50px;
        position: absolute;
        top: 0;

        &::before {
          display: none;
        }
      }
    }

    .jsxc-chatmessage.jsxc-probably_in {
      .jsxc-avatar {
        filter: grayscale(1);
      }
    }
  }

  .jsxc-memberlist {

    @extend %scrollbar;
    background-color: $window-bar-bg;
    max-height: 0;
    overflow: auto;
    position: absolute;
    top: 0;
    transition: max-height 400ms;
    width: 100%;
    z-index: 200;

    &.jsxc-expand {
      max-height: 120px;
    }

    ul {
      color: $window-bar-color;
      padding: 0 2px;

      > li {
        display: block;
        height: 40px;
        line-height: 40px;
        width: 100%;

        .jsxc-name {
          cursor: default;
          display: block;
          overflow: hidden;
          padding-right: 0.5em;
          text-overflow: ellipsis;
          white-space: nowrap;

          &:hover {
            color: inherit;
          }
        }

        .jsxc-avatar {
          margin-right: 4px;
        }
      }
    }
  }
}

li[data-type="groupchat"] {
  .jsxc-bar .jsxc-avatar:empty::after {
    content: map-get($jsxc-icons-map, "group");
    font-family: jsxc-icons !important;
    font-weight: normal;
    text-indent: 0;
  }

  &[data-membersonly="false"] {
    .jsxc-bar .jsxc-avatar:empty::after {
      content: map-get($jsxc-icons-map, "channel");
    }
  }

  // &[data-membersonly="true"][data-nonanonymous="true"] {
  //   .jsxc-avatar::after {
  //     content: map-get($jsxc-icons-map, "nonanonymous-group");
  //   }
  // }

  .jsxc-video {
    display: none;
  }
}
