/* Header
------------------------------------
*/
.header {
  position: relative;
  display: -webkit-box;
  display: -webkit-flex;
  display: -ms-flexbox;
  display: flex;
  height: $layout-header-height;
  width: 100%;
  @include padding(0, 20px, 0, 0);
  z-index: $zIndex-navbar;
  background-color: $color-contrast-lowest;
  border-bottom: 1px solid fade($color-contrast-low, 70%);
  -webkit-box-align: center;
  -webkit-align-items: center;
  -ms-flex-align: center;
  align-items: center;
  -webkit-box-pack: justify;
  -webkit-justify-content: space-between;
  -ms-flex-pack: justify;
  justify-content: space-between;
  a {
    color: $color-contrast-high;
    &:hover,
    &:active,
    &:focus {
      color: $color-contrast-high;
    }
  }
  //Used only in Boxed layout
  .header-inner {
    height: inherit;
    display: -webkit-box;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
  }
  &.transparent {
    background-color: transparent !important;
  }
  .brand {
    vertical-align: middle;
    width: $layout-sidepanel-width;
    text-align: center;
  }
  .bubble {
    border-radius: 100%;
    height: 16px;
    width: 16px;
    background-color: $color-danger;
    color: $color-contrast-lowest;
    position: absolute;
    top: -3px;
    @include right(-5px);
    border: 2px solid $color-contrast-lowest;
    opacity: 0.98;
  }
  .profile-dropdown-toggle {
    padding: 0;
    @include margin-right( 5px );
    border-radius: 50%;
    transition: all cubic-bezier(0.4, 0, 0.2, 1) 180ms;
    &:after {
      content: "";
      border-radius: 100%;
      height: 16px;
      width: 16px;
      background-color: $color-success;
      position: absolute;
      bottom: -1px;
      @include right(1px);
      border: 2px solid $color-contrast-lowest;
      opacity: 0.98;
    }
    &:hover {
      box-shadow: 0px 0px 0px 4px $color-border-a;
    }
    &.active,
    &:active {
      box-shadow: 0px 0px 0px 4px transparentize($color-contrast-medium, 0.55);
    }
  }
  .notification-list {
    display: inline-block;
    line-height: 23px;
    user-select: none;
  }
  .search-link {
    display: inline-block;
    @include margin-left(15px);
    color: $color-contrast-high;
    opacity: 0.77;
    font-size: 14px;
    vertical-align: middle;
    line-height: 12px;
    font-weight: 400;
    font-family: $base-font-family;
    letter-spacing: -0.006em;
    i {
      @include margin-right(4px);
      vertical-align: middle;
    }
    &:hover {
      opacity: 1;
    }
  }
  ul {
    li {
      line-height: 12px;
      vertical-align: middle;
    }
  }
  .dropdown {
    line-height: 12px;
  }
  .dropdown-menu {
    margin-top: 10px;
  }
}

/* Bootstrap navbar
------------------------------------
*/
.navbar {
  min-height: 50px;
  position: relative;
  margin-bottom: 20px;
  border: 1px solid transparent;
  top: -1px;
}
.navbar-nav > li {
  & > a {
    position: relative;
    display: block;
    padding: 10px 15px;
    padding-top: 20px;
    padding-bottom: 20px;
  }
}

.nav > li > a {
  padding: 10px 15px;
}

.navbar-default {
  background-color: $color-contrast-lowest;
  .navbar-nav > .active > a,
  .navbar-default .navbar-nav > .active > a:hover,
  .navbar-default .navbar-nav > .active > a:focus {
    background-color: transparent;
  }
  .navbar-nav > .active > a,
  .navbar-default .navbar-nav > .active > a:hover,
  .navbar-default .navbar-nav > .active > a:focus {
    background-color: transparent;
  }
}

.navbar-toggle {
  border-radius: 0;
  background-color: transparent !important;
}

.navbar-default .navbar-nav > li > a {
  color: $color-contrast-high;
}

.nav-collapse {
  &.collapse {
    height: 100% !important;
  }
}

.navbar-center,
.navbar-center > li {
  float: none;
  display: inline-block;
  *display: inline; /* ie7 fix */
  *zoom: 1; /* hasLayout ie7 trigger */
  vertical-align: top;
}

.navbar-nav {
  li a {
    min-width: 50px;
  }
}

/* Header Responsive Classes
------------------------------------
*/

@media only screen and (min-width: 980px) {
  body {
    &.menu-pin {
      .header .brand {
        width: 245px;
      }
    }
    &.menu-behind {
      .header .brand {
        width: 200px;
        @include text-align(left);
        @include padding-left(20px);
      }
    }
    &.box-layout {
      background-color: $color-contrast-lowest;
      & > .container,
      & > .full-height > .container {
        height: 100%;
        padding: 0;
        background-color: $color-contrast-lowest;
      }
      .header {
        background-color: transparent;
        border: 0;
        padding: 0;
        & > .container {
          background-color: $color-contrast-lowest;
          border-bottom: 1px solid rgba(230, 230, 230, 0.7);
          padding: 0 20px 0 0;
          height: 100%;
        }
      }
    }
  }

  .header {
    .brand {
      position: relative;
    }
    .user-info-wrapper {
      .user-details {
        .user-name {
          font-size: 16px;
        }
        .user-other {
          font-size: 10px;
        }
      }
      .user-pic {
        position: relative;
        top: -6px;
      }
    }
  }

  .notification-panel {
    width: 400px;
  }
}

@media (max-width: 991px) {
  body {
    &.box-layout {
      .header {
        & > .container {
          padding: 0;
          .pull-right .sm-action-bar {
            @include right(0);
          }
        }
      }
    }
    &.horizontal-app-menu {
      .header {
        & > .container {
          padding: 0;
				}
				.header-icon{
					padding: 0;
				}
      }
    }
  }
  .header {
    padding: 0 15px;
    width: 100%;
		border-bottom: 1px solid rgba(0, 0, 0, 0.07);
		height: 48px;
    .header-inner {
      text-align: center;
      .mark-email {
        @include left( 45px );
        position: absolute;
        top: 23px;
      }
      .quickview-link {
        position: absolute;
        @include right( 0 );
        top: 12px;
      }
    }
    .brand {
      width: auto;
    }

    & > .pull-left,
    & > .pull-right {
      position: relative;
    }
    & > .pull-right {
      .sm-action-bar {
        @include right(0);
      }
    }
  }
}
//Windows Rendering
.windows {
  .header .search-link {
    font-size: 15px;
  }
}
