/*
 * Navigataur: A pure CSS responsive navigation menu
 * Author: Mike King (@micjamking)
 */

/*--------------------------------
 Functional Styles (Required)
---------------------------------*/
/* Tim Pietrusky advanced checkbox hack (Android <= 4.1.2) */
body{ -webkit-animation: bugfix infinite 1s; }
@-webkit-keyframes bugfix { from {padding:0;} to {padding:0;} }

.header { position: relative; }
#toggle, .toggle { display: none; }
.menu li { list-style: none; float:left;  }

$menu-collapse: 944px;

// @media only screen and (max-width: $lap-end){
@media only screen and (max-width: $menu-collapse){
  .menu { display: none; opacity: 0; width: 100%; position: absolute; right: 0; }
  .menu li { display: block; width: 100%; margin: 0; }
  .menu li a { display: block; width: 100%; text-decoration: none; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; }
  .menu li a .icon { display: none; }
  .toggle { display: block; position: relative; cursor: pointer; -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
  #toggle:checked ~ .menu { display: block; opacity: 1; z-index: 999; }
}

/* support for submenus */
ul.menu li {
  position: relative;

  &:hover ul {
    display: block;
  }

  ul {
    display: none;

    z-index: 10;
    position: absolute;
    top: 68px;

    margin-left: 0;
    background-color: white;

    li {
      white-space: nowrap;
      float: none;

      a {
        display: block;
        padding: 20px 10px;

        &:hover, &:focus {
          background: $grayLighter;
        }
      }
    }
  }
}

/*--------------------------------
 Presentation Styles (Editable)
---------------------------------*/
header .grid {
  height: 68px;
}

.menu {
  margin: 0;
  top: 68px;
}

.menu li a{
  @include box-sizing(border-box);
  @include transition(all 0.25s linear);
  display: block;
  padding: 32px 12px;
  text-decoration: none;
  font-weight: normal;
  font-size: 14px;
  line-height: 1;
}

.menu > li > a:hover, .menu > li > a:focus{
  background: $site-background;
  box-shadow: inset 0px 5px $navigation-color;
  color: $navigation-color;
  padding: 40px 12px 24px;
}

.toggle{ 
  z-index: 20; 
}

@media only screen and (max-width: $menu-collapse){
  .menu{
    background: $white;
    border-top:    1px solid $navigation-color;
    border-bottom: 4px solid $navigation-color;
  }
  
  .menu, .menu li, .menu li a{
    height: auto;
  }
  
  .menu li a{
    padding: 15px 15px !important;
  }
  
  .menu li a:hover, .menu li a:focus{
    background: $grayLighter;
    box-shadow: inset 5px 0px $navigation-color;
    padding: 15px 15px 15px 25px;
  }
  
  .toggle {
    position: absolute;
    top: 17px;
    right: 10px;
  }

  .toggle::after {
    @include border-radius(2px);
    @include box-sizing(border-box);
    @include transition(all 0.5s linear);
    font-family: "FontAwesome";
    content: "\f0c9";
    display: inline-block;
    width: 100%;
    padding: 10px 15px;
    background: $navigation-color;
    text-align: center;
    font-size: 12px;
    color: $white;
    white-space: nowrap;
  }
  
  .toggle:hover::after{
    background: darken($navigation-color, 7%);
  }
  
  #toggle:checked + .toggle::after{
    content: attr(data-close);
  }

  /* submenus */
  ul.menu li ul {
    display: block;
    position: relative;
    top: 0;
  }
}
