/* *** Mobile Navigation *** */

.bb-mobile-navigation {
  position: fixed;
  -webkit-transform: translate3d(0, 0, 0);
  z-index: 99;
  -webkit-overflow-scrolling: touch;
  top: 0;
  height: 100%;
  max-height: 100%;
  overflow: auto;
  width: 460px;
  right: -460px;
  &.pos-right {
    right: -460px;
    left: auto;
    transition: right 0.3s;
  }
  &.pos-left {
    left: -460px;
    right: auto;
    transition: left 0.3s;
  }

  .holder {
    padding: 40px 30px 30px;

  }
  .close {
    position: absolute;
    top: 14px;
    left: 14px;
    color: #ffffff;
    line-height: 28px;
    width: 27px;
    height: 27px;
    text-align: center;
    vertical-align: middle;
    padding: 0;
    font-size: 14px;
    @include border-radius(6px);
    .bb-icon {
      line-height: 27px;
    }
  }
  .community {
    .logo, .text, .bb-btn {
      margin-bottom: 5px;
    }
  }

  .bb-header-search {
    .form-toggle {
      display: none;
    }
    form {
      @include clearfix();
      border: 3px solid #ececec;
      border-radius: 5px;
    }
    .search-submit {
      float: right;
      padding: 13px 10px;
      margin-bottom: 0;
      font-size: 20px;
      background-color: transparent;
    }
    input {
      float: left;
      width: 80%;
      text-align: left;
      border: none;
    }
  }

  .more-navigation {
    display: none;
  }

  .main-navigation {
    float: none;
    position: relative;
    margin-bottom: 10px;
    padding-bottom: 10px;

    > ul {
      display: block;
      margin: 0;
      @extend .clearfix;
      li > a {
        position: relative;
        //display: block;
        font-size: 13px;
        line-height: 1.1em;
        font-weight: 600;
        color: inherit;
        text-transform: uppercase;

      }
      > li {
        position: relative;
        text-align: left;
        display: block;
        clear: both;
        padding: 5px 0 5px 0;
        line-height: 1.5em;

        .dropdown-toggle {
          float: right;
          padding: 5px;
          cursor: pointer;
          text-align: center;
          vertical-align: middle;
          font-size: 25px;
          line-height: 15px;
          background-color: transparent;
          @include border-radius(0);
          @include transition(ease 0.3s);
          color: inherit;
          &:before {
            content: "\f107";
            font-family: $icon-font-family;
          }
          &.toggled-on {
            @include transform(rotate(180deg));
          }
        }

        &.menu-item-has-children {
          > a:after {
            content: none;
          }
        }
        a {
          display: inline-block;
        }
        > a {
          font-size: 15px;
          font-weight: 600;
        }
        .sub-menu {
          display: none;
          overflow: hidden;
          margin: 0;
          padding-left: 15px;
          li {
            position: relative;
            display: block;
            float: left;
            width: 100%;
            margin: 0;
            padding: 5px 20px 5px 0;
            clear: both;
            &.menu-item-has-children {
              > a {
                padding-right: 13px;
              }
            }

            a {
              display: inline-block;
              padding: 0;
              font-size: 13px;
              color: inherit;
              text-align: left;
              font-weight: 500;
              line-height: 1em;
            }
            &:hover {
              background-color: transparent;
            }
            &.menu-item-icon {
              .bb-icon {
                line-height: 1em;
                vertical-align: middle;
                position: absolute;
                top: 50%;
                left: 7px;
                margin-top: -1px;
                @include transform(translateY(-50%));
                :before {
                  line-height: 1em;
                }
              }
              a {
                padding-left: 25px;
              }
            }
          }
          .label {
            top: -10px;
            right: -15px;
          }
          .menu-item-icon:before {
            content: none;
          }
          &.toggled-on {
            display: block;
          }
        }

        &:before {
          content: none;
        }
      }
    }

    .menu-item-icon {
      &:before {
        content: '';
        position: absolute;
        top: 10px;
        left: 0;
        height: 17px;
        opacity: 0.15;
      }
      &:first-child {
        &:before {
          content: none;
        }
      }
      a {
        position: relative;
        padding-left: 22px;
      }
      .bb-icon {
        position: absolute;
        top: 0;
        left: 0;
        font-size: 15px;
      }
    }

    .label {
      position: absolute;
      z-index: 3;
      top: -10px;
      right: -15px;
      padding: 0 4px;
      color: #fff;
      letter-spacing: 1px;
      font-size: 8px;
      border-radius: 2px;
      height: 12px;
      line-height: 12px;
      box-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
      background-color: #00a256;

      &.hot {
        background-color: #e65252;
      }
      &.new {
        background-color: #00a256;
      }
    }
  }

  .more-menu {
    .bb-trending-navigation {
      float: none;
      padding: 0;
      width: 100%;
      ul {
        overflow: hidden;
        li {
          margin-bottom: 15px;
        }
      }
    }
    .bb-badge-list {
      float: none;
      padding: 10px 0;
      margin-bottom: 10px;
      width: 100%;
      text-align: center;
      border-bottom: 2px solid #ececec;

      ul {
        li {
          a {
            margin: 0 5px 10px;
          }
        }
      }
    }
    .section-navigation {
      ul {
        list-style: none;
        margin: 0;

        -webkit-column-count: 2;
        -moz-column-count: 2;
        column-count: 2;
        -webkit-column-gap: 10px;
        -moz-column-gap: 10px;
        column-gap: 10px;

        li {
          margin-bottom: 10px;
          a {
            color: inherit;
            font-size: 17px;
          }
        }
      }
    }
    .more-menu-header {
      padding: 15px 0 10px;
    }
    .more-menu-body {
      margin-bottom: 10px;
      padding: 7px 0 15px;
      clear: both;
      .sections-header {
        display: block;
        margin-bottom: 15px;
        font-size: 12px;
        line-height: 16px;
        color: #9a9a9a;
        text-transform: uppercase;
      }
    }
    .more-menu-footer {
      padding-top: 5px;
      display: block;
      text-align: left;

      > * {
        display: block;
        float: none;
        text-align: center;
      }
      .social ul {
        float: none;
        margin: 15px 0 0;
      }
    }
  }
  .more-menu-header,
  .more-menu-body,
  .more-menu-footer {
    padding-left: 0;
    padding-right: 0;
  }
  .more-menu-body,
  .main-navigation {
    padding-left: 0;
    padding-right: 0;
    border-bottom: 2px solid #f0f0f0;
  }
  .more-menu-body {
    padding: 10px 0;
  }
  @media (max-width: $screen-ss-max) {
    width: 100%;
    right: -100%;

    .main-navigation {
      float: none;
      width: 100%;
    }
    .more-menu {
      .bb-trending-navigation {
        li {
          float: none;
          width: 100%;
          padding: 0;
          text-align: left;
          &:before {
            content: none;
          }
        }
      }
    }

    .main-navigation ul {
      li {
        float: none;
        width: 100%;
      }
    }
    .more-menu .section-navigation ul {
      -webkit-column-count: 1;
      -moz-column-count: 1;
      column-count: 1;
    }

    .social.circle {
      li {
        margin: 0 3px 5px;
        a {
          width: 40px;
          height: 40px;
          line-height: 38px;
          font-size: 17px;
        }
      }
    }
  }
}

.main-menu-open {
  body {
    position: relative;
  }
  &, body {
    overflow: hidden;
    height: 100%;
  }
  #mobile-nav-bg {
    position: absolute;
    z-index: 98;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
  }
  @media (max-width: $screen-ss-max) {
    #mobile-nav-bg {
      display: none;
    }
  }
}

.main-menu-open .bb-mobile-navigation.pos-right {
  right: 0;
}
.main-menu-open .bb-mobile-navigation.pos-left {
  left: 0;
}