.jsxc-menu {
  height: 100%;
  position: relative;

  &__button {
    align-items: flex-start;
    color: "inherit";
    cursor: pointer;
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: center;
    text-decoration: none;
    user-select: none;
    white-space: nowrap;

    &--light {
      opacity: 0.4;
    }
  }

  &__content {
    box-sizing: border-box;
    max-height: 0;
    position: absolute;
    transition: max-height 0.5s;
    visibility: hidden;

    .jsxc-menu--opened & {
      display: inline-block;
      max-height: 9999px;
      visibility: visible;
      z-index: 9999;
    }
  }

  ul {
    list-style: none;
    margin: 0;
    overflow: hidden;
    padding: 0;
  }

  li {
    border: 0;
    cursor: pointer;
    overflow: hidden;
    text-overflow: ellipsis;
    user-select: none;
    white-space: nowrap;
  }

  &__item--danger {
    background-color: #ce7357;

    &:hover {
      background-color: #ee5f4c !important;
    }
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  &--drop-top-right,
  &--drop-bottom-left,
  &--drop-bottom-right,
  &--drop-right-top,
  &--vertical-left
  &--vertical-right {
    .jsxc-menu__content {
      border-radius: 3px;
      max-height: 9999px;
      padding: 3px;
      z-index: 200;

      &::after {
        border: 8px solid;
        border-bottom-color: transparent;
        border-left-color: transparent;
        border-right-color: transparent;
        content: " ";
        height: 0;
        pointer-events: none;
        position: absolute;
        width: 0;
      }
    }

    li {
      border-radius: 3px;
      text-align: center;

      &.jsxc-disabled {
        cursor: default;
        opacity: 0.3;
        // text-decoration: line-through;

        &:hover {
          opacity: 0.3;
        }
      }
    }

    // .jsxc-icon {
    // background-position: center;
    // background-repeat: no-repeat;
    // background-size: 16px 16px;
    // display: inline-block;
    // height: 40px;
    // vertical-align: sub;
    // width: 40px;
    // }
  }

  &--vertical-left {
    .jsxc-menu__content {
      right: 100%;
      top: 0;

      &::after {
        left: 100%;
        top: 14px;
        transform: rotate(-90deg);
      }
    }

    ul {
      display: flex;
      padding: 0;
    }

    li {
      height: 42px;
    }
  }

  &--vertical-right {
    .jsxc-menu__content {
      left: 100%;
      top: 0;

      &::after {
        right: 100%;
        top: 14px;
        transform: rotate(90deg);
      }
    }

    ul {
      display: flex;
      padding: 0;
    }

    li {
      height: 42px;
    }
  }

  &--drop-bottom-left {
    .jsxc-menu__content {
      bottom: 100%;
      left: 50%;
      margin-bottom: 8px;
      margin-left: -14px;

      &::after {
        left: 7px;
        top: 100%;
      }
    }
  }

  &--drop-bottom-right {
    .jsxc-menu__content {
      bottom: 100%;
      margin-bottom: 8px;
      margin-right: -14px;
      right: 50%;

      &::after {
        right: 7px;
        top: 100%;
      }
    }
  }

  &--drop-top-right {
    .jsxc-menu__content {
      margin-right: -14px;
      margin-top: 8px;
      right: 50%;
      top: 100%;

      &::after {
        bottom: 100%;
        right: 7px;
        transform: rotate(180deg);
      }
    }
  }

  &--drop-right-top {
    .jsxc-menu__content {
      margin-right: 8px;
      right: 100%;
      top: 5px;

      &::after {
        left: 100%;
        top: 7px;
        transform: rotate(270deg);
      }
    }
  }

  &--dark {
    .jsxc-menu__content {
      background-color: $emoticon-selection-bg;
      color: $emoticon-selection-bg;

      &::after {
        color: $emoticon-selection-bg;
      }
    }

    li {
      color: #fff;
      padding: 3px 7px;

      &:hover {
        background-color: $emoticon-selection-hover;
        color: var(--jsxc-color-main-text);
      }
    }
  }

  &--light {
    .jsxc-menu__content {
      background-color: var(--jsxc-color-main-background);
      filter: drop-shadow(0 0 5px var(--jsxc-color-box-shadow));

      &::after {
        color: var(--jsxc-color-main-background);
      }
    }

    li {
      color: var(--jsxc-color-main-text);
      opacity: 0.5;

      &:hover {
        opacity: 1;
      }
    }
  }

  &--pushup {
    @include presence-indicator("");

    position: static;

    li {
      position: relative;

      &::before {
        left: 10px;
        margin-top: -8px;
        //  Presence indicator
        position: absolute;
        top: 50%;
      }
    }

    .jsxc-menu__content {
      background-color: var(--jsxc-color-background-dark);
      bottom: 100%;
      box-shadow: 0 -5px 5px -5px var(--jsxc-color-box-shadow);
      left: 0;
      overflow: hidden;
      right: 0;
    }

    ul {
      margin: 0;
      padding: 0;
      width: 100%;
    }

    li {
      background-position: 15px center;
      background-repeat: no-repeat;
      background-size: 16px 16px;
      color: $roster-bottom-color;
      height: 44px;
      line-height: 44px;
      opacity: 0.8;
      overflow: hidden;
      padding-left: 44px;
      text-align: left;
      text-overflow: ellipsis;
      white-space: nowrap;
      width: 100%;

      &.jsxc-disabled {
        color: $roster-bottom-disabled;
        cursor: default;
      }

      &:hover:not(.jsxc-disabled) {
        background-color: $roster-bottom-bg-hover;
        color: $roster-bottom-color-hover;
      }

      &.jsxc-warning {
        background-color: $warning-bg;
      }
    }
  }

  &--emoticons {
    font-size: 23px;
    height: 40px;

    .jsxc-menu__button {
      width: 42px;
    }

    .jsxc-menu__content {
      width: 217px;
    }

    li {
      display: inline-block;
      height: 30px;
      padding: 0;
      width: 30px;

      .jsxc-emoticon {
        background-size: contain;
        cursor: pointer;
        float: left;
        height: 100%;
        margin: 0;
        width: 100%;
      }
    }

    &:hover::after {
      opacity: 0.5;
    }
  }
}
