
.nut-fixednav {
  position: fixed;
  z-index: $fixednav-index;
  display: inline-block;
  height: 50px;
  right: 0;

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

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

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

  &-btn {
    box-sizing: border-box;
    position: absolute;
    right: 0;

    z-index: $fixednav-index;
    width: 70px;
    height: 100%;
    background: $fixednav-button-background;
    border-radius: 45px 0px 0px 45px;
    box-shadow: 0px 2px 4px 0px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;

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

    .nut-icon {
      margin-right: 5px;
      transition: all 0.3s;
      transform: rotate(0deg);
      transition: all 0.3s;
    }
  }

  &-list {
    position: absolute;
    right: 0;
    transform: translateX(100%);
    transition: all 0.5s;

    z-index: $fixednav-index;
    flex-shrink: 0;
    height: 100%;
    background: $fixednav-background-color;
    display: flex;
    justify-content: space-between;
    border-radius: 25px 0px 0px 25px;
    box-shadow: 2px 2px 8px 0px rgba(0, 0, 0, 0.2);

    padding: {
      left: 20px;
      right: 80px;
    }

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

      img {
        width: 20px;
        height: 20px;
        margin-bottom: 2px;
      }

      .nut-fixednav-list-text {
        font-size: 10px;
      }

      .b {
        position: absolute;
        right: 0;
        top: 1px;
        height: 14px;
        line-height: 14px;
        font-size: 10px;
        padding: 0 3px;
        color: white;
        background: $color-primary;
        border-radius: 7px;
        text-align: center;
        min-width: 12px;
      }
    }
  }

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

    .nut-fixednav-btn {
      flex-direction: row-reverse;
      right: auto;
      left: 0;
      border-radius: 0 45px 45px 0;

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

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

      padding: {
        left: 80px;
        right: 20px;
      }

      margin: 0;
    }
  }
}

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

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

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

    padding: {
      right: 20px;
      left: 80px;
    }

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

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

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

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

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

      padding: {
        right: 80px;
        left: 20px;
      }
    }
  }
}

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