header.global {
  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, rgba(255,255,255, 1), rgba(230,230,230, 0.9)));
  height: 68px;
  position: relative;
  width: 100%;
  z-index: 10;

  nav {
    @include clearfix;
    height: 40px;
    margin: 0 auto;
    max-width: 1200px;
    padding: 14px 10px 0px;
    max-width: grid-width(12);
    min-width: 760px;
  }

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

    &::before {
      @extend .faded-vertical-divider;
      content: "";
      display: block;
      height: 50px;
      position: absolute;
      right: 1px;
      top: -8px;
      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/header-logo.png'));
      background-position: 0 0;
      background-repeat: no-repeat;
      display: block;
      height: 31px;
      width: 64px;
    }
  }

  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-family: $sans-serif;
        @include inline-block;
        margin: 0px 30px 0px 0px;
        text-decoration: none;
        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, #fff 0%, rgb(250,250,250) 50%, rgb(237,237,237) 50%, rgb(220,220,220) 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-family: $sans-serif;
        @include inline-block;
        line-height: 1em;
        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 {
          background: #FFF;
        }
      }
    }

    &.user {
      float: right;

      > li.primary {
        display: block;
        float: left;
        margin: 0px;

        > a {
          margin: 0px;
          @include border-right-radius(0px);
        }

        &:last-child {
          > a {
            @include border-radius(0 4px 4px 0);
            border-left: none;
          }
        }
      }

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

        .avatar {
          //background: rgb(220,220,220);
          @include background-image(url('../images/portal-icons/home-icon.png'));
          background-size: cover;
          //@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: 26px;
          @include inline-block;
          left: 8px;
          opacity: 0.5;
          overflow: hidden;
          position: absolute;
          top: 4px;
          @include transition(all, 0.15s, linear);
          width: 26px;
        }

        &:hover {
          .avatar {
            opacity: 0.8;
          }
        }
      }

      ul.dropdown-menu {
        background: rgb(252,252,252);
        @include border-radius(4px);
        @include box-shadow(0 2px 24px 0 rgba(0,0,0, 0.3));
        border: 1px solid rgb(100,100,100);
        display: none;
        padding: 5px 10px;
        position: absolute;
        right: 0px;
        top: 50px;
        width: 170px;
        z-index: 3;

        &.expanded {
          display: block;
        }

        &::before {
          background: transparent;
          border: {
            top: 6px solid rgba(252,252,252, 1);
            right: 6px solid rgba(252,252,252, 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 dotted rgba(200,200,200, 1);
          @include box-shadow(inset 0 1px 0 0 rgba(255,255,255, 0.05));

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

          > a {
            border: 1px solid transparent;
            @include border-radius(3px);
            @include box-sizing(border-box);
            color: $blue;
            cursor: pointer;
            display: block;
            margin: 5px 0px;
            overflow: hidden;
            padding: 3px 5px 4px;
            text-overflow: ellipsis;
            @include transition(padding, 0.15s, linear);
            white-space: nowrap;
            width: 100%;

            &:hover {
              color: $base-font-color;
              text-decoration: none;
            }
          }
        }
      }
    }
  }
}
