
// Disable sidenav animations while starting the app
// See https://github.com/angular/material2/blob/master/src/lib/sidenav/sidenav-transitions.scss
.starting.mat-sidenav-transition {
  .mat-sidenav,
  .mat-sidenav-content,
  .mat-sidenav-backdrop.mat-sidenav-shown {
    transition: none;
  }
}

aio-nav-menu.top-menu .vertical-menu-item  {
  background-color: $lightgray;
  text-transform: uppercase;
}

md-sidenav.mat-sidenav.sidenav {
  position: fixed;
  bottom: 0;
  left: 0;
  padding: 80px 0px 0px;
  min-width: 260px;
  background-color: $offwhite;
  box-shadow: 6px 0 6px rgba(0,0,0,0.10);
}

md-sidenav.mat-sidenav.sidenav.collapsed {
    padding-top: 32px;
}

md-sidenav-container.sidenav-container {
    min-height: 100%;
    height: auto !important;
    max-width: 1400px;
    margin: 0;
    transform: none;
    padding-top: 64px;
}

// md-sidenav.sidenav.mat-sidenav.mat-sidenav-side.mat-sidenav-opened {
//   position: fixed;
//   padding-top: 72px;
// }

md-sidenav-container div.mat-sidenav-content {
    height: auto;
}

.vertical-menu-item {
  box-sizing: border-box;
  color: $darkgray;
  cursor: pointer;
  display: block;
  max-width: 260px;
  overflow-wrap: break-word;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-left: 20px;
  text-decoration: none;
  text-align: left;
  transition-duration: 180ms;
  transition-property: background-color, color;
  transition-timing-function: ease-in-out;
  width: 100%;
  word-wrap: break-word;
  outline: none;

  &:hover {
    text-shadow: 0 0 5px #ffffff;
    background-color: $lightgray;
  }

  //icons _within_ nav
  .mat-icon {
    position: absolute;
    top: 6px;
    margin-left: 10px;
  }

  @include bp(tiny) {
    padding-top: 10px;
    padding-bottom: 10px;
  }

}

.vertical-menu-item.selected {
  color: $blue;
}

.heading {
  color: #444;
  cursor: pointer;
  position: relative;
  text-transform: uppercase;
  width: 100%;
}

.mat-icon, .material-icons {
  display: inline-block;
  position: absolute;
  top: 6px;
  right: 8px;
  color: $mediumgray;
}

.heading-children.expanded {
  visibility: visible;
  opacity: 1;
  max-height: 4000px; // Arbitrary max-height. Can increase if needed. Must have measurement to transition height.
  transition: visibility 500ms, opacity 500ms, max-height 500ms;
  -webkit-transition-timing-function: ease-in-out;
  transition-timing-function: ease-in-out;
}

.heading-children.collapsed {
  visibility: hidden;
  opacity: 0;
  max-height: 1px; // Must have measurement to transition height.
  transition: visibility 275ms, opacity 275ms, max-height 280ms;
  -webkit-transition-timing-function: ease-out;
  transition-timing-function: ease-out;
}

a.selected.level-1,
.heading.selected.level-1,
.heading-children.selected.level-1 {
  border-left: 3px $blue solid;
}

.level-1 {
  font-family: $main-font;
  font-size: 14px;
  font-weight: 400;
  padding-left: 10px;
  transition: background-color 0.2s;
}

.level-2 {
  font-family: $main-font;
  font-size: 14px;
  color: $mediumgray;
  font-weight: 400;
  padding-left: 20px;
  text-transform: none;
}

.level-3 {
  font-family: $main-font;
  font-size: 14px;
  color: $mediumgray;
  padding-left: 30px;
}

.level-1.expanded .mat-icon, .level-2.expanded .mat-icon {
  @include rotate(90deg);
}

.level-1:not(.expanded) .mat-icon, .level-2:not(.expanded) .mat-icon {
  @include rotate(0deg);
}

.promo-img-container img {
  max-width: 90%;
  @include bp(small) {
    max-width: 100%;
  }
}

aio-nav-menu.top-menu {
  aio-nav-item:first-child .vertical-menu-item {
    padding-top: 48px;
  }

  aio-nav-item:last-child div {
    border-bottom: 2px solid rgba($mediumgray, 0.5);
  }

}
