@use "common/var" as *;

.m-editor-nav-menu {
  display: flex;
  z-index: 5;
  -webkit-box-pack: justify;
  justify-content: space-between;
  -webkit-box-align: center;
  align-items: center;
  background-color: $nav--background-color;
  font-size: 19.2px;
  color: $nav-color;
  font-weight: 400;
  box-sizing: border-box;
  margin: 0px;
  flex: 0 0 $nav-height;
  border-bottom: 1px solid #d8dee8;

  > div {
    display: flex;
    gap: 3px;
    height: 100%;
    z-index: 1;
    align-items: center;
    flex-wrap: nowrap;
    overflow: hidden;
    position: relative;
    min-width: 0;
  }

  .menu-center {
    justify-content: center;
  }

  .menu-right {
    justify-content: flex-end;
  }

  .m-editor-nav-menu-slot-hidden {
    position: absolute;
    left: -99999px;
    top: 0;
    visibility: hidden;
    pointer-events: none;
  }

  .m-editor-nav-menu-more-wrapper {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    height: 100%;

    &.m-editor-nav-menu-more-wrapper-hidden {
      visibility: hidden;
      pointer-events: none;
    }
  }

  .m-editor-nav-menu-more {
    flex: 0 0 auto;
  }

  .menu-item {
    flex-direction: row;
    flex: 0 0 auto;
    -webkit-box-align: center;
    align-items: center;
    vertical-align: middle;
    font-size: 14px;
    line-height: 1;
    height: 100%;
    color: rgba(255, 255, 255, 0.7);
    box-sizing: inherit;
    z-index: 1;
    display: flex !important;
    transition: all 0.3s ease 0s;
    border-bottom: 2px solid transparent;
    margin: 0;
    white-space: nowrap;

    .is-disabled {
      opacity: 0.5;
    }

    .is-text {
      padding: 5px;
    }

    .is-text > i {
      color: $font-color;
    }

    .icon {
      display: flex;
      -webkit-box-align: center;
      align-items: center;
      height: 100%;
      padding: 0px 8px;
    }

    .menu-item-text {
      color: $nav-color;
      white-space: nowrap;
    }

    &.rule {
      .el-icon {
        transform: rotate(-90deg);
      }
    }

    .t-button {
      padding-left: 1px;
      padding-right: 1px;
    }
  }
}

.m-editor-nav-menu-popover {
  .m-editor-nav-menu-overflow-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 4px 0;

    .menu-item {
      display: flex;
      align-items: center;
      padding: 4px 8px;
      cursor: pointer;
      border-radius: 4px;

      &:hover {
        background-color: rgba(0, 0, 0, 0.05);
      }

      &.divider {
        padding: 0;
        cursor: default;

        &:hover {
          background-color: transparent;
        }
      }
    }
  }
}
