// (C) Copyright 2011-2013 Hewlett-Packard Development Company, L.P.

.hp-sub-nav {
  position: relative;
  display: block;
  height: $subnav-height;
  line-height: $subnav-height - 1;
  white-space: nowrap;
  background-color: $primary-background;
  border-bottom: 1px solid $primary-divider;
  padding: 0px 43px;
  @include box-sizing(border-box);
  font-family: 'HPRegular', Arial, Helvetica, sans-serif;
  -webkit-font-smoothing: antialiased;
  
  body.hp-basic-layout & {
    padding: 0px 30px;
  }
  
  > * {
    display: inline-block;
    vertical-align: top;
    margin-right: -4px;
  }
  
  .hp-filter, .hp-filter-reset, .hp-master-referrer {
    font-size: 14px;
    //vertical-align: baseline;
    vertical-align: top;
  }
  
  .hp-meta-filter {
    margin-right: 15px;
  }
  
  > label {
    padding-left: 10px;
  }
  
  > a {
    margin-top: 2px;
    margin-left: 10px;
    color: $text-link-color;
    
    &.hp-disabled {
      color: $tertiary-color;
      pointer-events: none;
      cursor: default;
    }
  }
  
  div.hp-filterbar-control {
    position: absolute;
    left: 0px;
    top: 0px;
    width: 35px;
    height: 100%;
    
    div.hp-pin-left {
      position: relative;
      top: 9px;
      left: 0px;
    }
  }
  
 div.hp-master-match-count {
    position: absolute;
    top: 0px;
    right: 40px;
    height: 100%;
    margin-right: 0px;
    text-align: right;
    color: $secondary-color;
    font-style: italic;
    top: 2px;
  }
  
  div.hp-sidebar-control {
    position: absolute;
    top: 0px;
    right: -4px;
    width: 35px;
    height: 100%;
    margin-right: 0px;
    
    div.hp-pin-right {
      position: relative;
      top: 8px;
      left: 10px;
    }
  }
  
  .hp-page-label {
    margin-right: 30px;
    
    h1 {
      display: inline-block;
      font-family: 'HPBold', Arial, Helvetica, sans-serif;
      line-height: inherit;
    }
    .hp-page-item-count {
      display: inline-block;
      margin-left: 5px;
      color: #999;
      font-size: 18px;
    }
  }
  
  a {
    cursor: pointer;
  }
  
  .hp-filter {
    .hp-value {
      max-width: 150px;
      overflow: hidden;
      text-overflow: ellipsis;
    }
  }
  
  .hp-filter-reset {
    position: relative;
    top: 1px;
    margin-left: 15px;
    margin-top: 0px;
  }
  
  .hp-master-referrer {
    position: relative;
    top: 1px;
    margin-left: 15px;
    margin-right: 5px;
    top: 2px;
    
    > label {
      display: none;
    }
    
    .hp-close {
      position: relative;
      display: inline-block;
      top: 5px;
      margin-left: 5px;
      cursor: pointer;
    }
  }
  
  .hp-application-context {
    margin-left: 20px;
    position: absolute;
    top: 0px;
    right: 0px;
    height: 100%;
    padding: 0px 40px 0px 20px;
    background-color: $global-background;
    border-left: 1px solid $global-border;
    white-space: nowrap;
    
    .hp-status {
      display: inline-block;
      top: 3px;
      margin-right: 10px;
    }
    h1 {
      display: inline-block;
      font-family: 'HPBold', Arial, Helvetica, sans-serif;
      line-height: inherit;
      padding-right: 10px;
    }
    a:hover {
      color: $text-link-color;
    }
  
    ol.hp-application-controls {
      display: inline-block;
      margin-bottom: 0px;
      vertical-align: top;
      ///height: 100%;

      li {
        display: inline-block;
        margin-right: -4px;
        @include box-sizing(border-box);
        height: 39px;
        width: 36px;
        padding: 12px 10px;
        text-align: center;
        cursor: pointer;
        &:hover {
          background-color: #fff; //#f3f3f3;
          .hp-power {
            background-position: $power-x -220px;
          }
          .hp-uid {
            background-position: ($uid-x + 1) -220px;
          }
          .hp-console {
            background-position: $console-x -220px;
          }
          .hp-disc {
            background-position: $disc-x -220px;
          }
        }
        &.hp-selected {
          background-color: $selected-background;
        }
        a {
          display: block;
        }
      }
    }
  }
  
  @media print {
    display: none;
  }
}

div.hp-pin-right, div.hp-pin-left {
  width: 20px;
  height: 20px;
  background-color: transparent;
  background-image: url($img-file);
  background-repeat: no-repeat;
  cursor: pointer;
  border: 1px solid #e6e6e6;
}

div.hp-pin-left {
  background-position: ($pin-x + 5) (-20px + 5px);
  
  div.hp-filterbar-open & {
    background-position: ($pin-x + 5) (-60px + 5px);
  }
  
  &:hover {
    background-position: ($pin-x + 5px) (0px + 5px);
    .hp-filterbar-open & {
      background-position: ($pin-x + 5px) (-40px + 5px);
    }
  }
}

div.hp-pin-right {
  background-position: ($pin-x + 5px) (-60px + 5px);
  
  div.hp-sidebar-open & {
    background-position: ($pin-x + 5px) (-20px + 5px);
  }
  
  &:hover {
    background-position: ($pin-x + 5px) (-40px + 5px);
    div.hp-sidebar-open & {
      background-position: ($pin-x + 5px) (0px + 5px);
    }
  }
}

.hp-unpin {
  width: 20px;
  height: 20px;
  background-color: transparent;
  background-image: url($img-file);
  background-position: $pin-x -80px;
  background-repeat: no-repeat;
  
  &:hover {
    background-position: $pin-x -60px;
  }
  .hp-global &:hover {
    background-position: $pin-x -100px;
  }
}
