.nut-fixednav {
  position: fixed;
  z-index: $fixednav-index;
  display: inline-block;
  height: scale-px(50px);

  &.active {
    .nut-fixednav-btn {
      .nut-icon {
        transform: rotate(180deg);
      }
    }

    .nut-fixednav-list {
      transform: translateX(0%) !important;
    }

    &.nut-fixednav-left {
      .nut-icon {
        transform: rotate(0deg);
      }
    }
  }

  &-btn {
    box-sizing: border-box;
    position: absolute;
    z-index: $fixednav-index;
    width: scale-px(70px);
    height: 100%;
    background: $fixednav-button-background;
    box-shadow: 0 scale-px(2px) scale-px(4px) 0 rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;

    .text {
      width: scale-px(24px);
      line-height: scale-px(13px);
      font-size: $font-size-s;
      color: #fff;
      flex-shrink: 0;
    }

    .nut-icon {
      transition: all 0.3s;
    }
  }

  &-list {
    position: absolute;
    transition: all 0.5s;
    z-index: $fixednav-index;
    flex-shrink: 0;
    height: 100%;
    background: $fixednav-background-color;
    display: flex;
    justify-content: space-between;
    box-shadow: scale-px(2px) scale-px(2px) scale-px(8px) 0 rgba(0, 0, 0, 0.2);

    &-item {
      position: relative;
      flex: 1;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      min-width: scale-px(50px);
      flex-shrink: 0;
      color: $fixednav-color;

      .nut-fixednav-list-text {
        font-size: $font-size-xxs;
      }
    }

    &-image {
      width: scale-px(20px);
      height: scale-px(20px);
      margin-bottom: scale-px(2px);
    }
  }

  &-right {
    right: 0;
    .nut-fixednav-btn {
      right: 0;
      border-radius: scale-px(45px) 0 0 scale-px(45px);
      .nut-icon {
        margin-right: scale-px(5px);
        transform: rotate(0deg);
      }
    }
    .nut-fixednav-list {
      right: 0;
      transform: translateX(100%);
      border-radius: scale-px(25px) 0 0 scale-px(25px);
      padding: {
        left: scale-px(20px);
        right: scale-px(80px);
      }
    }
  }

  &-left {
    left: 0;
    .nut-fixednav-btn {
      flex-direction: row-reverse;
      left: 0;
      border-radius: 0 scale-px(45px) scale-px(45px) 0;
      .nut-icon {
        margin-left: scale-px(5px);
        transform: rotate(180deg);
      }
    }

    .nut-fixednav-list {
      transform: translateX(-100%);
      left: 0;
      border-radius: 0 scale-px(25px) scale-px(25px) 0;
      padding: {
        left: scale-px(80px);
        right: scale-px(20px);
      }
    }
  }
}

[dir='rtl'] .nut-fixednav,
.nut-rtl .nut-fixednav {
  &-right {
    right: auto;
    left: 0;
  }
  &.active {
    .nut-icon {
      transform: rotate(0deg);
    }
    &.nut-fixednav-left {
      .nut-icon {
        transform: rotate(-180deg);
      }
    }
  }

  &-btn {
    right: auto;
    left: 0;
    border-radius: 0 scale-px(45px) scale-px(45px) 0;
    .nut-icon {
      margin-right: 0;
      margin-left: scale-px(5px);
      transform: rotate(180deg);
    }
  }

  &-list {
    right: auto;
    left: 0;
    transform: translateX(-100%);
    border-radius: 0 scale-px(25px) scale-px(25px) 0;
    box-shadow: scale-px(-2px) scale-px(2px) scale-px(8px) 0 rgba(0, 0, 0, 0.2);

    padding: {
      right: scale-px(20px);
      left: scale-px(80px);
    }

    &-item {
      .b {
        right: auto;
        left: 0;
      }
    }
  }

  &-left {
    left: auto;
    right: 0;

    .nut-fixednav-btn {
      left: auto;
      right: 0;
      border-radius: scale-px(45px) 0 0 scale-px(45px);

      .nut-icon {
        transform: rotate(0deg);
        margin-right: scale-px(5px);
        margin-left: 0;
      }
    }

    .nut-fixednav-list {
      transform: translateX(100%);
      right: auto;
      left: auto;
      border-radius: scale-px(25px) 0 0 scale-px(25px);

      padding: {
        right: scale-px(80px);
        left: scale-px(20px);
      }
    }
  }
}

.nut-drag .nut-fixednav {
  position: relative;
}
