/* menu admin */
.menu-tree-outer {
  border-radius: .35rem;
  padding: 15px;
}

.menu-tree {
  margin: 10px 0;
  padding: 0;
  ul {
    padding-left: 20px;
  }
  &, ul {
    li {
      list-style: none;
    }
  }

  li {
    position: relative;
    border: 1px solid #cecece;
    border-radius: .35rem;
    padding: 10px;
    background: #fff;
    .item-container {
      position: relative;
      height: 25px;

      > .caret {
        visibility: hidden;

        i {
          width: 25px;
          text-align: center;

          &:before {
            content: '\f0da';
          }
        }
      }

      .drag-handle {
        display: inline-block;
        width: 15px;
        height: 15px;
        line-height: 14px;
        overflow: hidden;
        cursor: move;

        svg {
          &, path {
            fill: #4e73df;
          }
        }
      }

      > .actions {
        float: right;
        opacity: .5;
        display: inline-block;

        .btn-sm {
          padding: .1rem .2rem;
          font-size: 14px;
        }
      }

      &:hover {
        > .label {

        }
        > .actions {
          opacity: 1;
        }
      }
    }

    & + li {
      margin-top: 10px;
    }

    &.has-children {
      > .item-container {
        cursor: pointer;
        * {
          user-select: none;
        }
        > .caret {
          visibility: visible;
        }
        > .label {
          user-select: auto;
        }
      }
    }

    &.opened {
      padding-bottom: 0;
      > .item-container > .caret {
        i:before {
          content: '\f0d7';
        }
      }
      > .children {
        display: block;
        min-height: 15px;
      }
    }

    .children {
      display: none;
      padding-bottom: 10px;
      padding-top: 10px;
      position: relative;
      margin-bottom: 10px;
    }

    &.created-element,
    &.sorted-element {
      animation: sorted-element-flash linear .5s forwards;
      @keyframes sorted-element-flash {
        0% { opacity: 1; }
        50% { opacity: .1; }
        100% { opacity: 1; }
      }
    }
    &.update-form-displayed > .item-container {
      &::before,
      &::after {
        content: "";
        display: block;
        position: absolute;
        pointer-events: none;
        touch-action: none;
      }
      &::before {
        $size: 22px;
        top: 50%;
        right: -$size;
        width: 0;
        height: 0;
        border-top: $size solid transparent;
        border-bottom: $size solid transparent;
        border-left: $size solid #4e73df;
        transform: translate(10px, -50%);
      }
      &::after {
        top: 0;
        left: 0;
        border: 2px solid #4e73df;
        width: calc(100% + 24px);
        margin-left: -12px;
        height: calc(100% + 24px);
        margin-top: -12px;
        border-radius: .35rem;
        z-index: 10;
      }
    }

    &:first-child > .item-container .actions .btn[data-action="move-up"],
    &:last-child > .item-container .actions .btn[data-action="move-down"] {
      opacity: .3;
      filter: grayscale(100%);
      pointer-events: none;
      touch-action: none;
    }
  }

  &.dragging {
    li {
      > .item-container {
        > .caret {
          visibility: visible;

          i:before {
            content: '\f0d7';
          }
        }
      }
      > .children {
        display: block;
      }
    }
  }

  li.opened.sortable-ghost,
  li.sortable-ghost {
    border-top: 2px solid #4e73df;
    height: 0;
    margin-top: 10px;
    margin-bottom: 5px;
    position: relative;
    padding-top: 0;
    padding-bottom: 0;
    &::before {
      content: "";
      width: 10px;
      height: 10px;
      position: absolute;
      left: 0;
      top: 0;
      border-radius: 50%;
      background: #4e73df;
      transform: translate(calc(-50% - 1px),calc(-50% - 1px));
    }
    .item-container,
    .children {
      display: none
    }
  }
}

.menu-tree-wrap {
  position: relative;
  .main-loader {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255,255,255, .7);
    display: flex;
    flex-direction: row;
    > div {
      width: 100%;
      text-align: center;
      font-size: 30px;
    }
  }
}

.h-35{
  height: 35px !important;
  width: 110px !important;
}