header.global {
  //background: rgb(255,255,255);
  background: rgba(245,245,245, 0.9);
  border-bottom: 1px solid rgb(190,190,190);
  @include box-shadow(0 1px 5px 0 rgba(0,0,0, 0.1));
  //@include background-image(linear-gradient(-90deg, rgb(255,255,255), rgba(235,235,235, 1)));
  //@include background-image(linear-gradient(-90deg, rgb(255,255,255), rgba(228,239,243, 1)));
  //@include background-image(linear-gradient(-90deg, rgb(255,255,255), rgba(240,240,240, 0.9)));
  //border-color: rgb(177, 210, 222);
  height: 68px;
  position: relative;
  width: 100%;
  z-index: 10;

  nav {
    @include clearfix;
    @include box-sizing(border-box);
    height: 40px;
    margin: 0 auto;
    max-width: 1200px;
    padding-top: 14px;
    width: flex-grid(12);
  }

  h1.logo {
    float: left;
    margin: 9px 15px 0px 0px;
    padding-right: 20px;
    position: relative;

    &::before {
      @extend .faded-vertical-divider;
      content: "";
      display: block;
      height: 50px;
      position: absolute;
      right: 1px;
      top: -12px;
      width: 1px;
    }

    &::after {
      @extend .faded-vertical-divider-light;
      content: "";
      display: block;
      height: 50px;
      position: absolute;
      right: 0px;
      top: -12px;
      width: 1px;
    }

    a {
      @include background-image(url('/static/images/logo.png'));
      background-position: 0 0;
      background-repeat: no-repeat;
      display: block;
      height: 23px;
      width: 47px;
    }
  }

  ol {
    &.left {
      float: left;
    }

    &.guest {
      float: right;
    }

    > li {
      @include inline-block;
      margin-right: 20px;
      position: relative;
      vertical-align: middle;

      &:last-child {
        margin-right: 0px;
      }

      a {
        letter-spacing: 1px;
        vertical-align: middle;
      }
    }

    li.secondary {
      > a {
        color: $lighter-base-font-color;
        color: $blue;
        display: block;
        //font: italic 1.2rem/1.4rem $serif;
        font: normal 1.2rem/1.4rem $sans-serif;
        @include inline-block;
        margin: 0px 30px 0px 0px;
        text-decoration: none;
        //text-transform: lowercase;
        text-transform: uppercase;
        text-shadow: 0 1px rgba(255,255,255, 0.6);

        &:last-child {
          margin-right: 0px;
        }

        &:hover {
          color: $base-font-color;
        }
      }
    }

    li.primary {
      margin-right: 5px;

      > a {
        @include background-image(linear-gradient(-90deg, rgb(245,245,245) 0%, rgb(243,243,243) 50%, rgb(237,237,237) 50%, rgb(235,235,235) 100%));
        border: 1px solid transparent;
        border-color: rgb(200,200,200);
        @include border-radius(3px);
        @include box-sizing(border-box);
        @include box-shadow(0 1px 0 0 rgba(255,255,255, 0.6));
        color: $base-font-color;
        display: inline-block;
        font: normal 1.2rem/1.4rem $sans-serif;
        @include inline-block;
        margin: 1px 5px;
        padding: 10px 12px;
        text-decoration: none;
        text-transform: uppercase;
        text-shadow: 0 1px rgba(255,255,255, 0.6);
        vertical-align: middle;

        &:last-child {
          margin-right: 0px;
        }

        &:hover, &.active {
        }
      }
    }

    &.user {
      float: right;

      a.user-link {
        padding: 10px 12px 10px 42px;
        position: relative;
        text-transform: none;

        @media screen and (max-width: 768px) {
          font-size: 0em;
          padding: 10px 0px;
          width: 38px;
        }

        .avatar {
          background: rgb(220,220,220);
          @include border-radius(3px);
          border: 1px solid rgb(80,80,80);
          @include box-shadow(0 1px 0 0 rgba(255,255,255, 0.6));
          height: 21px;
          @include inline-block;
          left: 8px;
          overflow: hidden;
          position: absolute;
          top: 7px;
          width: 21px;

          &::after {
            @include background-image(linear-gradient((-60deg), rgba(0,0,0, 0) 0%, rgba(0,0,0, 0.1) 50%, rgba(0,0,0, 0.2) 50%, rgba(0,0,0, 0.3) 100%));
            content: "";
            display: block;
            height: 100%;
            position: absolute;
            right: 0px;
            top: 0px;
            width: 100%;
          }

          img {
            @include border-radius(4px);
            display: block;
            min-height: 100%;
            min-width: 100%;
            height: 100%;
          }
        }
      }

      ul.dropdown-menu {
        @include border-radius(4px);
        @include box-shadow(0 1px 6px 0 rgba(0,0,0, 0.3));
        border: 1px solid rgb(0,0,0);
        @include background-image(linear-gradient(-90deg, rgba(0,0,0, 0.9) 0%,
                                                          rgba(0,0,0, 0.7) 100%));
        display: none;
        padding: 5px 10px;
        position: absolute;
        right: 4px;
        top: 50px;
        width: 150px;
        z-index: 3;

        &.expanded {
          display: block;
        }

        &::before {
          background: transparent;
          border: {
            top: 6px solid rgba(0,0,0, 1);
            right: 6px solid rgba(0,0,0, 1);
            bottom: 6px solid transparent;
            left: 6px solid transparent;
          }
          @include box-shadow(1px 0 0 0 rgb(0,0,0), 0 -1px 0 0 rgb(0,0,0));
          content: "";
          display: block;
          height: 0px;
          position: absolute;
          @include transform(rotate(-45deg));
          right: 12px;
          top: -6px;
          width: 0px;
        }

        li {
          display: block;
          border-top: 1px solid rgba(0,0,0, 0.4);
          @include box-shadow(inset 0 1px 0 0 rgba(255,255,255, 0.05));

          &:first-child {
            border: none;
            @include box-shadow(none);
          }

          > a {
            @include box-sizing(border-box);
            @include border-radius(3px);
            color: rgba(255,255,255, 0.9);
            display: block;
            font: italic 1.2rem/1.4rem $serif;
            height: auto;
            margin: 5px 0px;
            overflow: hidden;
            padding: 3px 5px 4px;
            text-shadow: none;
            text-overflow: ellipsis;
            text-transform: none;
            @include transition(padding, 0.1s, linear);
            white-space: nowrap;
            width: 100%;

            &:hover {
              background: $blue;
              @include background-image(linear-gradient(-90deg, lighten($blue, 15%) 0%,
                                                                rgba($blue, 1) 100%));
              border-color: rgba(0,0,0, 1);
              @include box-shadow(none);
              padding-left: 8px;
              text-shadow: 0 -1px rgba(0,0,0, 0.2);
            }
          }
        }
      }
    }
  }
}
