@import '../colors/settings';
@import './topbar';
@import '../typography/settings';
@import '../settings/z-index';
@import '../tools/mixins/spacing-responsive';

/* ---------- LEFT NAV ---------- */

.wrapper {
  padding-top: rem-calc(52);
  padding-left: rem-calc(100);
  transition: all 0.4s ease 0s;
}

.left-nav-container {
  background-color: $cui-yellow-50;
}

.leftnav-wrapper {
  position: fixed;
  left: 0;
  z-index: $zindex-top-bar-fixed - 10;
}

.page-content-wrapper {
  width: 100%;
}

.leftnav {
  position: absolute;
  top: -1px;
  min-height: 100vh;
  margin: 0;
  background-color: $cui-black-100;
  border-top: darken($cui-black-100, 10%) 1px solid;

  .inverse & {
    background-color: $cui-white-100;
    border-top: $top-bar-admin-border 1px solid;
    border-right: $top-bar-admin-border 1px solid;
  }

  .cisco-logo {
    padding: 7px 0;
    font-size: 35px;
    line-height: 27px;
    color: $cui-gray-30;
    text-align: center;
    border-bottom: 1px solid rgba(0, 0, 0, 0.2);
  }

  ul {
    max-height: 100vh;
    padding: 0;
    margin: 0;
    overflow: auto;
    list-style: none;

    @include vr-spacing(pt, 1, 1px);
    @include vr-spacing(pb, 3, 1px);

    li.dropup {
      width: rem-calc(100);
    }

    li {
      position: relative;
    }
  }

  a {
    display: block;
    padding: 0.5rem 0.5rem 1rem;
    color: $cui-gray-30;
    text-align: center;
    text-transform: capitalize;
    cursor: pointer;

    .inverse & {
      color: $text-color;

      & .selected {
        color: $cui-white-100;
      }
    }

    .title {
      display: block;
      padding-top: 7px;
      margin: 0;
      overflow: hidden;
      font-family: $brand-font-light;
      font-size: 14px;
      font-weight: normal;
      line-height: 1;
      text-overflow: ellipsis;
      white-space: nowrap;
    }

    > .icon {
      display: block;
      width: 50px;
      height: 50px;
      padding: 0.5rem;
      margin: 0 auto;
      font-size: 22px;
      line-height: 1.5;
      color: $cui-gray-10;
      background-color: $cui-black-100;
      border-radius: 50%;

      .inverse & {
        color: $cui-white-100;
        background-color: $cui-gray-30;
      }
    }

    .submenu-icon {
      display: block;
      height: 10px;
      padding: 0;
      margin: 0 auto;
      font-size: 15px;
      color: $cui-gray-30;
      border-radius: 0;
    }

    &:hover,
    &:focus {
      text-decoration: none;
      box-shadow: none;

      > .icon {
        background-color: $cui-theme-50;
      }
    }
  }

  .active {
    a {
      &:hover,
      &:focus {
        .icon {
          color: $cui-gray-10;
        }
      }

      .icon {
        background-color: $cui-theme-50;
      }

      .submenu-icon {
        background-color: transparent;
      }
    }
  }

  .sub-nav {
    position: absolute;
    top: 0;
    left: 100%;
    padding: 0;
    background-color: $cui-theme-20;
    border: none;
    border-radius: 0;

    // z-index: -1;
    .inverse & {
      left: 99px;
    }

    &.show-up {
      top: auto;
      bottom: 0;
    }

    li {
      list-style: none;

      a {
        padding: 11px 1.5rem;
        margin-top: 0;
        color: $cui-gray-70;
        text-align: left;
        text-transform: capitalize;

        transition: all 350ms linear;

        &:hover,
        &:focus {
          text-decoration: none;
          background-color: $cui-theme-50;

          .title {
            color: $cui-white-100;
          }
        }

        .title {
          position: relative;
          top: 1px;
          padding: 0;
          line-height: 1;
          white-space: nowrap;
        }

        .desc {
          display: block;
          margin-top: 7px;
          font-size: 11px;
          color: darken($cui-theme-50, 15%);
        }
      }
    }
  }
}

.selected {
  a {
    background-color: $cui-theme-20;
    box-shadow: none;

    .title {
      color: $cui-gray-70;
    }

    .submenu-icon {
      color: $cui-theme-50;
      background-color: transparent;
    }
  }

  .sub-nav {
    a {
      background-color: transparent;
    }
  }
}

li.supportTab {
  // .sticky & {
  //   position: absolute;
  //   bottom: 50px;
  //   left: 20px;
  //   right: 20px;
  //   text-align: center;
  // }
  // .title {
  //   font-size: 12px;
  // }
}

/* ---------- END LEFT NAV ---------- */
