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

@import "hp-piano-mixins";

#hp-page-container {
  position: absolute;
  top: $banner-height;
  left: 0px;
  right: 0px;
  bottom: 0px;
  height: auto;
  overflow: hidden;
  ///z-index: 0;
  @include transitions3(top, $normal-animation-duration,
    bottom, $normal-animation-duration,
    right, $normal-animation-duration);
  
  /*#hp-body-div.hp-sidebar-open.hp-sessioned & {
    right: $sidebar-width + $body-gutter;
    overflow-x: visible;
  }*///
  
  body.hp-basic-layout & {
    background-color: #fff;
  }
  
  .hp-spinner img {
    margin-top: 100px;
  }
  
  @media print {
    @include print-position();
  }
}

#hp-page-footer {
}

#hp-sidebar {
  position: absolute;
  width: 0;
  top: $banner-height + $subnav-height + $body-gutter;
  bottom: $body-gutter;
  right: (- $sidebar-width);
  background-color: #f3f3f3;
  @include box-sizing(border-box);
  @include transition(right, $normal-animation-duration);
  z-index: $sidebar-z-index;
  
  body.hp-basic-layout & {
    top: $banner-height;
    bottom: 0px;
  }
  
  div.hp-sidebar-open & {
    right: $body-gutter;
    width: $sidebar-width;
  }
  
  body.hp-basic-layout div.hp-sidebar-open & {
    right: 0px;
    width: $sidebar-width + $body-gutter;
  }
  
  &.hp-inactive {
    opacity: 0.7;
  }
  
  #hp-body-div:not(.hp-sessioned) & {
    display: none;
  }
  
  .hp-flyout-contents {
    top: $subnav-height + 20px;
    background-color: $global-background;
    bottom: $flyout-footer-height;
  }
  
  footer {
    position: absolute;
    width: 100%;
    bottom: 0px;
  }
  
  @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;
  }
}

div.hp-page {
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  height: auto;
  margin: 0px;
  overflow: hidden;
  
  @media print {
    @include print-position();
  }
  
  &.hp-text-page {
    .hp-page-contents {
      padding: 20px;
    }
  }
  
  &.hp-empty {
    background-color: $secondary-background;
  }
  
  .hp-page-contents {
    position: absolute;
    top: $subnav-height + $body-gutter;
    left: $body-gutter;
    right: $body-gutter;
    bottom: $body-gutter;
    background-color: $primary-background;
    overflow-y: auto;
    overflow-x: hidden;
  }
}

div.hp-full-page, div.hp-full-content {
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  height: auto;
  width: auto;
  overflow: auto;
  
  > .hp-prompt {
    max-width: 400px;
    margin: 60px auto;
    color: $secondary-color;
    font-size: 16px;
    line-height: normal;
    font-style: italic;
    text-align: center;
  }
}

.hp-sub-nav {
  position: relative;
  display: block;
  height: $subnav-height;
  line-height: $subnav-height - 1;
  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 {
    font-size: 14px;
  }
  
  > label {
    padding-left: 10px;
  }
  
  > a {
    margin-top: 2px;
    margin-left: 10px;
    color: $text-link-color;
  }
  
  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-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-master-referrer {
    position: relative;
    top: 1px;
    font-size: 14px;
    margin-left: 15px;
    
    .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;
  }
}

.hp-page-contents {
  position: absolute;
  top: $subnav-height;
  left: 0px;
  right: 0px;
  bottom: 0px;
  
  @media print {
    @include print-position();
  }
}
 
.hp-filterbar {
  width: $sidebar-width;
  position: absolute;
  top: 0px;
  bottom: 0px;
  left: (- $sidebar-width);
  overflow-y: auto;
  background-color: $secondary-background;
  border-right: 1px solid $primary-divider;
  @include box-sizing(border-box);
  @include transition(left, $normal-animation-duration);
  
  .hp-filterbar-open & {
    left: 0px;
  }
  
  > header {
    h1 {
      white-space: nowrap;
      margin-top: 25px;
      margin-left: 0px;
      margin-bottom: 22px;
      padding-right: 20px;
    }
  }
  
  @media print {
    display: none;
  }
}

div.hp-master-filter {
  position: absolute;
  @include box-sizing(border-box);
  top: $subnav-height + $body-gutter;
  left: (- $sidebar-width);
  bottom: $body-gutter;
  width: $sidebar-width;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: #fff;
  @include transition(left, $normal-animation-duration);
  
  div.hp-filterbar-open & {
    left: $body-gutter;
  }
  
  > header {
    @include box-sizing(border-box);
    height: $subnav-height + 20px;
    line-height: $subnav-height - 2px;
    padding: 10px 15px;
    color: #333;
    font-family: 'HPRegular', Arial, Helvetica, sans-serif;
    
    h1 {
      display: inline-block;
      font-size: 18px;
      line-height: inherit;
    }
    
    .hp-filter-reset {
      float: right;
      height: 25px;
      line-height: 23px;
      font-size: 14px;
      line-height: auto;
      margin-top: 8px;
    }
  }
  
  .hp-filter {
    margin: 10px 10px 20px 10px;
    
    > label {
      margin: 10px 0px;
      
      &:after {
        content: ':';
      }
    }
  }
  
  > .hp-rich-filter {
    display: inline-block;
    white-space: nowrap;

    .hp-rack {
      display: block;
      margin: 10px 15px 15px 10px;
      cursor: pointer;
    }
    
    .hp-device {
      cursor: pointer;
    
      &:hover {
        background-color: #f3f3f3;
      }
      &.hp-selected {
        background-color: $selected-background;
      }
    }
  }
  
  @media print {
    display:none;
  }
}

div.hp-master-details {
  position: absolute;
  top: $subnav-height + $body-gutter;
  bottom: $body-gutter;
  left: $body-gutter;
  right: $body-gutter;
  @include transitions(left, $normal-animation-duration,
    right, $normal-animation-duration);
  
  div.hp-filterbar-open & {
    left: $sidebar-width + $body-gutter + $page-gutter;
  }
  
  body.hp-basic-layout & {
    top: $subnav-height + 15px;
    left: 15px;
    right: 15px;
    bottom: 15px;
  }
  
  #hp-body-div.hp-sidebar-open.hp-sessioned & {
    right: $sidebar-width + $body-gutter + $body-gutter;
  }
  
  div.hp-master-pane {
    width: $sidebar-width - 30px;
    background-color: $primary-background;
    @include box-sizing(content-box);
    border-right: $page-gutter solid $primary-divider;
    
    body.hp-basic-layout & {
      border-right: 1px solid $primary-divider;
    }
    
    .hp-master-header {
      min-height: 35px;
      
      .hp-master-title {
        display: inline-block;
        max-width: 120px;
        white-space: nowrap;
        text-overflow: ellipsis;
        overflow: hidden;
      
        a {
          max-width: 120px;
        }
      }
    }
    
    &.hp-plain {
      overflow:auto;
    }

    > .ui-resizable-e {
      width: 10px; right: -5px;
    }
    
    @media print {
      display: none;
    }
  }
  
  @media print {
    @include print-position();
  }
}

div.hp-master-full {
  position: absolute;
  top: $subnav-height + $body-gutter;
  bottom: $body-gutter;
  left: $body-gutter;
  right: $body-gutter;
  padding: 0px 15px 10px 15px;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: $primary-background;
  @include transitions(left, $normal-animation-duration,
    right, $normal-animation-duration);
  
  div.hp-filterbar-open & {
    left: $sidebar-width + $body-gutter + $page-gutter;
  }
  
  #hp-body-div.hp-sidebar-open.hp-sessioned & {
    right: $sidebar-width + $body-gutter + $body-gutter;
  }
  
  div.hp-master-pane {
    right: 0px;
    padding: 0px 15px 15px 15px;
  }
  
  .hp-master-table > tbody {
    > td {
      height: inherit;
      line-height: inherit;
      padding: 13px 10px;
      
      &.hp-icon {
        height: 30px;
      }
    }
    > tr.hp-selected, > tr.hp-selected:hover {
      
      > td {
        
        &.hp-row-details-cell {
          border-bottom-color: $primary-divider;
        }
        
        &:last-child {
          border-right: 1px solid $primary-divider;
          padding-right: 9px;
        
          &:after {
            content: '';
            display: none;
          }
        }
      }
    }
  }
  
  .hp-master-header {
    height: 30px;
    line-height: 30px;
    margin: 35px 0px 25px 0px;
    z-index: $header-z-index;
    
    > * {
      display: inline-block;
      vertical-align: top;
    }
    
    .hp-master-title {
      display: none;
    }

    > .hp-status {
      position: relative;
      top: 3px;
      left: 0px;
      margin-right: 5px;
    }
    
    h1 {
      padding-left: 0px;
      line-height: inherit;
      margin: 0px;
    }
    
    .hp-status-counts {
      margin-right: 20px;
    }
    
    .hp-header-sort {
      
      > * {
        display: inline-block;
        vertical-align: top;
      }
      
      .hp-sort {
        height: 28px;
        line-height: 28px;
      }
    }
    
    .hp-header-controls {
      .hp-details-actions {
        height: 28px;
        line-height: 28px;
        border-left: none;
      }
    }
  }
  
  @media print {
    @include print-position();
    margin-top: 80px;
  }
}

.hp-master-header {
  position: relative;
  margin: 0px;
  @include box-sizing(border-box);
  font-family: 'HPRegular', Arial, Helvetica, sans-serif;

  h1 {
    position: relative;
    padding: 5px 0px;
    font-size: 13px;
    font-weight: bold;
    line-height: 14px;
    
    .hp-status {
      display: inline-block;
    }
  }
  
  .hp-master-add {
    display: inline-block;
    margin-right: 10px;
    
    a {
      display: block;
      height: 25px;
      line-height: 23px;
      font-size: 14px;
      line-height: auto;
      max-width: 100%;
      white-space: nowrap;
      text-overflow: ellipsis;
      overflow-x: none;
      padding-left: 18px;
      padding-right: 10px;
      background-image: $add-url;
      background-position: 0px 1px;
      background-repeat: no-repeat;
    }
  }

  .hp-master-grid-sort {
    display: inline-block;
    font-weight: normal;
    line-height: 30px;

    .hp-sort {
      display: inline-block;
    }
  }
  
  &:hover {
    .hp-close {
      display: block;
    }
  }
}

div.hp-master-pane {
  position: absolute;
  top: 0px;
  bottom: 0px;
  left: 0px;
  overflow: visible; ///hidden;
  padding: 15px;
  @include box-sizing(border-box);
  @include transition(width, $normal-animation-duration);
  
  .hp-master-header {
    margin-bottom: 10px;
    
    &:after {
      content: '';
      height: 0px;
      clear: both;
      visibility: hidden;
    }
    
    .hp-master-view {
      display: none;
      float: right;
      vertical-align: top;
      font-size: 0px;
    
      &.hp-active {
        display: block;
      }
    
      .hp-master-table-view, .hp-master-grid-view {
        display: inline-block;
        vertical-align: top;
        position: relative;
        width: 25px;
        height: 25px;
        background-image: url($img-file);
        background-repeat: no-repeat;
        cursor: pointer;
      
        &:hover {
          background-color: #e6e6e6;
        }
      }
    
      .hp-master-table-view {
        border-right: 1px solid $secondary-divider;
        background-position: ($master-view-x + 8px) -11px;      
        &:hover, &.hp-active {
          background-position: ($master-view-x + 8px) 9px;
        }
      }
    
      .hp-master-grid-view {
        background-position: ($master-view-x + 8px) -51px;      
        &:hover, &.hp-active {
          background-position: ($master-view-x + 8px) -31px;
        }
      }
    }
  }
  
  .dataTables_scrollBody {
    border-top: 1px solid #d9d9d9;
    border-bottom: 1px solid #d9d9d9;
    
    body.hp-basic-layout & {
      border-bottom: none;
    }
    
    &:focus {
      outline: none;
    }
  }
 
  .hp-master-table {
    
    &:focus {
      outline: none;
    }
    
    > thead {
      th, td {
        white-space: nowrap;
        padding: 5px 20px 5px 10px;
        font-family: 'HPBold', Arial, Helvetica, sans-serif;
      }
    }
    
    > tbody > tr > td {
      height: $master-row-height - 16px;
      line-height: $master-row-height - 16px;
      padding: 8px 10px;
      
      > * {
        height: 14px;
      }
      
      a:hover {
        text-decoration: none;
      }
      
      &.hp-icon {
        padding-top: 0px;
        padding-bottom: 0px;
        
        > .hp-status {
          position: relative;
          top: 10px;
        }
      }
      
      > .hp-status {
        //top: 4px;
      }
    }
    
    > tbody > tr {
      cursor: pointer;
      color: $secondary-primary-color;
      
      &:hover {
        color: $primary-color;
      }
      
      &.hp-selected {
        color: $selected-color;
      }
      
      &.hp-expanded {
        background-color: $primary-background;
      }
      
      &.hp-master-table-control {
        background-image: none;
        
        > td {
          padding-top: 15px;
          padding-bottom: 15px;
          
          &:hover {
            background-color: inherit;
          }
        }
        
        a:not(.hp-disabled) {
          color: $text-link-color;
        }
      }
      
      &.hp-row-details-row {
        cursor: auto;
        background: none;
        
        > td > * {
          height: auto;
        }
        .hp-row-details-cell {
          padding: 0px 20px 20px 50px;
          border-top-style: none;
          border-bottom: 1px solid $secondary-divider;
          border-right: 1px solid $secondary-divider;
          
          a:not(.hp-disabled) {
              color: $text-link-color;
          }
        }
        form:last-of-type {
          padding-bottom: 0px;
        }
        form, ol {
          margin-bottom: 0px;
        }
        
        &.hp-selected {
          
        }
      }
    }
  }
  
  > .hp-master-table {
    width: 100%;
    overflow: auto;
  }
  
  .hp-master-grid {
    overflow-y: auto;
    overflow-x: hidden;
    margin: 0px -5px;
    
    &:focus {
      outline: none;
    }
    
    .hp-master-grid-item {
      @include box-sizing(border-box);
      display: inline-block;
      margin: 5px;
      min-width: 180px;
      color: $secondary-color;
      background-color: $grid-item-background;
      border: 1px solid $grid-item-outline;
      cursor: pointer;
      
      html.hp-high-contrast & {
        color: $projection-secondary-color;
      }
    
      &:hover {
        background-color: $primary-background;
        color: $primary-color;
        border-color: $grid-item-outline-selected;
        
        html.hp-high-contrast & {
          color: $projection-color;
        }
        
        > header {
          background-color: $primary-background;
        }
      }
      
      &.hp-selected {
        border: 1px solid $grid-item-outline-selected;
        color: $primary-color;
        
        html.hp-high-contrast & {
          color: $projection-color;
        }
        
        > header {
          background-color: $selected-background;
        }
        
        .hp-master-item-summary {
          background-color: $primary-background;
        }
      }
      
      > header {
        padding: 5px 10px;
        color: #000;
        
        > * {
          display: inline-block;
          vertical-align: top;
        }
        > .hp-status {
          position: relative;
          top: 2px;
        }
      }
      
      label {
        color: $secondary-color;
        
        html.hp-high-contrast & {
          color: $projection-secondary-color;
        }
      }
      
      .hp-master-item-summary, .hp-master-item-details {
        position: relative;
        padding: 10px;
        .hp-column-form {
          width: auto;
          display: inline-block;
          vertical-align: top;
          margin-right: 80px;
        }
      }
      
      .hp-master-item-summary {
        background-color: $grid-item-detail-background;
        
        .hp-master-item-summary-items li {
          display: inline-block;
          margin-right: 10px;
          margin-bottom: 5px;
        }
      }
      
      .hp-master-item-details {
        display: none;
      }
    }
    
    #hp-master-show-more {
      display: inline-block;
      margin-top: 10px;
      margin-bottom: 10px;
      margin-left: 15px;
      color: $text-link-color;
    }
    
    .hp-master-grid-control {
      padding: 15px 5px;
      
      .hp-master-grid-empty {
        color: $secondary-color;
        font-style: italic;
        margin-bottom: 15px;
        
        html.hp-high-contrast & {
          color: $projection-secondary-color;
        }
      }
      a:not(.hp-disabled) {
        color: $text-link-color;
        display: block;
        margin-top: 10px;
      }
    }
  }
  
  .dataTables_wrapper {
    display: none;
    
    &.hp-active {
      display: block;
    }
    &.hp-empty {
      display: none;
    }
  }
  
  .hp-master-grid {
    display: none;
    
    &.hp-active {
      display: block;
    }
    
    &.hp-empty {
      display: none;
    }
  }
  
  .hp-master-pane-summary {
    position: absolute;
    bottom: 0px;
    left: 15px;
    right: 15px;
    padding: 15px 0px;
    border-top: 1px solid $primary-divider;
    
    .hp-summary {
      label {
        display: inline-block;
        color: $secondary-color;
        margin-right: 10px;
        
        html.hp-high-contrast & {
          color: $projection-secondary-color;
        }
      }
      .hp-value {
        display: inline-block;
        color: $primary-color;
        
        html.hp-high-contrast & {
          color: $projection-color;
        }
      }
      .hp-utilization-meter {
        margin-top: 10px;
        width: 160px;
      }
    }
  }
}

table.hp-master-table {
  a {
    color: $text-link-color;
  }
}

div.hp-details-pane {
  position: absolute;
  top: 0px;
  bottom: 0px;
  left: $sidebar-width + $page-gutter;
  right: 0px;
  @include box-sizing(border-box);
  min-width: $sidebar-width;
  padding: 25px 30px 15px 30px;
  overflow: hidden;
  background-color: $primary-background;
  @include transition(left, $normal-animation-duration);
  
  &.hp-plain {
    overflow:auto;
  }
  &.hp-empty {
    background-color: $secondary-background;
    > * {
      visibility: hidden;
    }
    > .hp-empty-message {
      display: block;
      visibility: visible;
      position: absolute;
      top: 50%;
      left: 50%;
      margin-top: -40px;
      margin-left: -50px;
      color: $secondary-color;
      font-style: italic;
      font-size: 18px;
    }
    > #hp-no-details {
      display: block;
      visibility: visible;
    }
  }
  
  @media print {
    @include print-position();
    left: 0px !important;
    padding: 0px;
  }
}

div.hp-details-full {
  position: absolute;
  top: $subnav-height + $body-gutter;
  bottom: $body-gutter;
  left: $body-gutter;
  right: $body-gutter;
  @include box-sizing(border-box);
  padding: 25px 15px 15px 15px;
  overflow-y: auto;
  overflow-x: hidden;
  background-color: $primary-background;
  @include transitions(left, $normal-animation-duration,
    right, $normal-animation-duration);
  
  div.hp-full-page & {
    top: 15px;
    bottom: 15px;
    left: 15px;
    right: 15px;
    
    body.hp-basic-layout & {
      top: 0px;
      bottom: 0px;
      left: 0px;
      right: 0px;
    }
  }
  
  #hp-body-div.hp-sidebar-open.hp-sessioned & {
    right: $sidebar-width + $body-gutter + $body-gutter;
  }
  
  div.hp-remote-console {
    position: absolute;
    top: 0px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    background-color: #333;
    color: #fff;
    font-family: monospace;
    padding: 10px;
  }
}

div.hp-master-full {
  
  &.hp-notify-open {
    .hp-master-list, > div.dataTables_wrapper {
      top: 50px + 35px + 45px + 10px;
    }
    &.hp-notify-disabled {
      .hp-master-list, > div.dataTables_wrapper {
        top: 50px + 35px + 5px;
      }
    }
  }
  
  > div.dataTables_wrapper {
    position: absolute;
    top: 50px + 35px;
    left: 15px;
    right: 15px;
    bottom: 0px;
  }
  
  .hp-master-list {
    position: absolute;
    top: 50px + 35px;
    left: 15px;
    right: 15px;
    bottom: 0px;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 0px;
    
    &:focus {
      border: none;
      outline: none;
    }
    
    > li.hp-pending {
      background-color: $secondary-background;
      
      @media print {
        display: none;
      }
    }
    
    li.hp-master-list-item {
      position: relative;
      border-top: 3px solid #ccc;
      margin-bottom: 10px;
      padding: 0px;
      //color: $secondary-color;
      
      &.hp-selected {
        .hp-master-list-item-primary header {
          background-color: $selected-background;
        }
      }
      
      &:hover {
        a {
          text-decoration: underline;
        }
      }
      
      &.hp-collapsed .hp-master-item-detail {
        display: none;
      }
      
      &.hp-expanded {
        .hp-master-item-summary {
          display: none;
        }
      }
      
      .hp-master-list-item-primary {
        background-image: $horizontal-dot-url;
        background-position: left bottom;
        background-repeat: repeat-x;
        padding-bottom: 1px;
        
        > * {
          padding-top: 10px;
          margin: 0px 30px;
        }
      
        > header {
          line-height: 18px;
          padding: 10px;
          margin: 0px;
          cursor: pointer;
        
          > * {
            display: inline-block;
            vertical-align: top;
          }

          .hp-collapser {
            width: 20px;
          }
          
          .hp-master-item-name {
            font-size: 16px;
            margin-left: 5px;
            margin-right: 20px;
          }
          
          .hp-summary {
            color: $secondary-color;
            margin-right: 20px;
            
            html.hp-high-contrast & {
              color: $projection-secondary-color;
            }
          }
          
          form {
            margin-bottom: 0px;
            width: auto;
            .hp-form-content {
              white-space: nowrap;
            }
          }
        }
      }
      
      .hp-master-list-item-secondary {
        padding: 10px 0px;
        margin-left: 30px;
      }
      
      form {
        display: inline-block;
        width: 45%;
        &.hp-show-form { 
          vertical-align : top;
        }
      }
    }
    
    #hp-master-show-more {
      display: inline-block;
      margin: 10px 0px 20px 15px;
      color: $text-link-color;
    }
    
    .hp-master-list-splash {
      max-width: 300px;
      margin: 40px auto;
      text-align: center;
      
      .hp-master-list-empty {
        color: $secondary-color;
        font-style: italic;
        margin-bottom: 20px;
        html.hp-high-contrast & {
          color: $projection-secondary-color;
        }
      }
      
      div.hp-help {
        margin: 10px 0px;
      }
      a {
        display: block;
        color: $text-link-color;
      }
    }
    
    .hp-master-list-control {
      @media print {
        display: none;
      }
    }
    
    @media print {
      @include print-position();
    }
  }
}

.hp-header-controls, .hp-details-header-controls {
  position:absolute;
  right: 0px;
  top: 0px;
  
  > * {
    display: inline-block;
    vertical-align: top;
  }

  .hp-map-control {
    position: relative;
    top: 5px;
    margin-right: 0px;
    @include box-sizing(border-box);
    height: 20px;
    width: 20px;
    background-image: url($img-file);
    background-position: -256px -19px;
    background-repeat: no-repeat;
    
    &:hover {
      background-position: -256px 1px;
    }
  }

  .hp-details-actions, .hp-header-actions {
    
    > label {
      height: 25px;
      font-size: 14px;
      line-height: 25px;
      font-family: 'HPRegular', Arial, Helvetica, sans-serif;
      color: $text-link-color;
      border: 2px solid #BFE5F5;
      border-top-right-radius: 5px;
      border-bottom-left-radius: 5px;
      background-color: #BFE5F5;
      
      &:after {
        display: inline-block;
        vertical-align: top;
        content: '';
        width: 25px;
        height: 25px;
        margin-left: 10px;
        background-image: $select-down-link-url;
        background-position: 3px 4px;
        background-repeat: no-repeat;
        border-left: 1px solid #ccc;
      }
      
      &:hover {
        border-color: #999;
      }
    }
    
    &.hp-active {
      > label {
        border-color: transparent;
        background-color: transparent;
      }
    }
        
    .hp-details-actions-button, .hp-header-actions-button {
      
      border: none;
    
      .hp-details-actions-button-label, .hp-header-actions-button-label {
        display: inline-block;
        white-space: nowrap;
      }
    }
  }
  
  .hp-drop-menu label {
    text-align: right;
  }
  
  .hp-header-selection {
    color: $secondary-color;
    font-style: italic;
    vertical-align: baseline;
    margin: 0px 10px;
    
    html.hp-high-contrast & {
      color: $projection-secondary-color;
    }
  }
  
  .hp-header-select-all {
    margin: 0px 10px;
    cursor: pointer;
  }
  
  @media print {
    display: none !important;
  }
}
    
.hp-details-header, .hp-full-header {
  position: relative;
  height: $subnav-height;
  line-height: $subnav-height - 2px;
  margin-bottom: 20px;
  white-space: nowrap;
  z-index: $header-z-index;
  font-family: 'HPRegular', Arial, Helvetica, sans-serif;
  
  > * {
    display: inline-block;
    vertical-align: top;
  }
  
  > .hp-status {
    position: relative;
    top: 11px;
    margin-right: 10px;
  }
  
  div.hp-context {
    position: absolute;
    top: 2px;
    font-size: 14px;
    line-height: normal;
    color: #aaa;
  }
  
  h1 {
    margin: 0px;
    padding-left: 0px;
    padding-right: 10px;
    font-size: 28px;
    line-height: 38px;
    font-weight: normal;
    font-family: 'HPLight', Arial, Helvetica, sans-serif;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    
    .hp-annotation {
      color: $panel-title-color;
      
      html.hp-high-contrast & {
        color: $projection-secondary-color;
      }
    }
  }
  
  .hp-panel-selector {
    font-size: 20px;
    border-left: 2px solid #999;
    color: #000;
    
    > label {
      line-height: 40px;
      height: 40px;
    }
    
    .hp-options li {
      height: 36px;
      line-height: 36px;
      
      &.hp-sub-options {
        height: auto;
      }
    }
  }
  
  .hp-panel-selector-title {
    display: inline-block;
    font-size: 16px;
    height: 30px;
    line-height: 30px;
    white-space: nowrap;
    padding: 0px 15px;
    border-left: 1px solid $secondary-divider;
  }
  
  &.hp-nameless {
    .hp-panel-selector {
      border-left: none;
      margin-left: -10px;
    }
  }
  
  .hp-related-control {
    position: relative;
    top: 7px;
    margin: 0px 20px;
    @include box-sizing(border-box);
    height: 20px;
    width: 20px;
    padding: 12px;
    background-image: url($img-file);
    background-position: -253px -16px;
    background-repeat: no-repeat;
    border: 2px solid #ccc;
    border-top-right-radius: 5px;
    border-bottom-left-radius: 5px;
    
    &:hover {
      background-position: -253px 4px;
      border-color: #999;
    }
  }
  
  .hp-details-header-controls, .hp-header-controls {
    top: 6px;
  }
  
  @media print {
    @include print-position();
    height: 80px;
  }
}

.hp-details-nav {
  height: $subnav-height;
  line-height: $subnav-height - 2px;
  margin-bottom: 10px;
  white-space: nowrap;
  z-index: $header-z-index;
  border-top: 1px solid $secondary-divider;
  
  > * {
    display: inline-block;
    vertical-align: top;
  }
 
  .hp-search {
    position: relative;
    height: 100%;
    width: 20px;
    
    &:after {
      position: absolute;
      top: 0px;
      right: 0px;
      width: 15px;
      height: 16px;
      background-image: url($img-file);
      background-position: -120px -120px;
      background-repeat: no-repeat;
      cursor: pointer;

      &:hover {
        background-position: -120px -100px;
      }
    }
  }
}

.hp-details-show-section {
  position: absolute;
  top: 25px;
  bottom: 15px;
  left: 30px;
  right: 30px;
  
  .hp-details-show-view {
    position: absolute;
    top: $subnav-height + 20px;
    bottom: 0px;
    left: 0px;
    right: 0px;
    overflow-y: auto;
    overflow-x: hidden;
    color: $primary-primary-color;
    
    a:not(.hp-disabled) {
      color: $text-link-color;
    }
    
    h2, h3, h4 {
      a:not(.hp-disabled) {
        color: #000;
      }
    }
    
    @media print {
      @include print-position();
    }
  }
  
  &.hp-notify-open {
    .hp-details-show-view {
      top: $subnav-height + 65px;
    }
    &.hp-notify-disabled {
      .hp-details-show-view {
        top: $subnav-height + 20px;
      }
    }
  }
  
  div.hp-grid-panels {
    margin: -10px -15px 0px -15px;
  }
  
  @media print {
    @include print-position();
  }
}

#hp-overlay, #hp-dialog-overlay, .ui-widget-overlay, .hp-dialog-overlay {
  position: absolute;
  top: 0px;
  bottom: 0px;
  left: 0px;
  right: 0px;
  display: none;
  
  &.hp-active {
    display: block;
  }
}

#hp-body-div.hp-sidebar-open.hp-sessioned {
  
  #hp-sidebar-controls {
    position: absolute;
    top: $banner-height;
    content: '';
    display: block;
    right: 0px;
    width: $sidebar-width + $body-gutter;
    height: $subnav-height - 1;
    ///background-color: #fff;
    border-bottom: 1px solid #d9d9d9;
    
    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;
      }
    }
    
    body.hp-basic-layout & {
      display: none;
    }
  }
  
  #hp-overlay, .hp-overlay {
    right: $sidebar-width + $body-gutter;
  }
}

#hp-overlay, .hp-overlay {
  background-color: rgba(255, 255, 255, 0.6);
  z-index: ($change-container-z-index - 1);
  
  &.hp-changing {
    background-color: rgba(0, 0, 0, 0.6);
    
    body.hp-basic-layout & {
      background-color: rgba(208, 208, 208, 0.6);
    }
  }
  
  @media print {
    background-color: transparent;
  }
}

#hp-dialog-overlay, .ui-widget-overlay, .hp-dialog-overlay {
  background-color: rgba(0, 0, 0, 0.6);
  z-index: ($dialog-z-index - 1);
  
  @media print {
    background-color: transparent;
  }
}

.ui-widget-overlay {
  display: block;
}

// need this so IE9 can center the actual container
#hp-change-page-container-wrapper {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 10px;
  right: 10px;
  
  body.hp-basic-layout & {
    top: 30px;
    bottom: 30px;
    left: 30px;
    right: 30px;
  }
  
  @media print {
    @include print-position();
  }
}

#hp-change-page-container {
  position: relative;
  top: 0px;
  bottom: 0px;
  height: 100%;
  max-width: 960px;
  min-width: 400px;
  margin: 0px auto;
  background-color: $primary-background;
  color: $primary-color;
  z-index: $change-container-z-index;
  display: none;
  overflow: hidden;
  @include drop-menu-border();

  &.hp-active {
    display: block;
  }
  
  .hp-details-header {
    @include box-sizing(border-box);
    height: $banner-height;
    padding: 10px 30px;
    background-color: $change-header-background;
    border-bottom: 1px solid $change-header-divider;
    margin-bottom: 0px;
    line-height: 40px;
    
    > h1 {
      max-width: 70%;
    }
    
    > .hp-details-header-controls {
      height: $banner-height;
      top: 0px;
      
      .hp-help-current {
        position: relative;
        cursor: pointer;
        width: 50px;
        height: $banner-height - 1;
        line-height: $banner-height - 1;
        
        .hp-icon {
          position: relative;
          top: 20px;
          left: 17px;
          width: 20px;
          height: 20px;
          background-image: url($img-file);
          background-repeat: no-repeat;
          background-position: $help-x -20px;
        }
        &:hover {
          background-color: $primary-background;
        }
      }
    }
  }
  
  .hp-stacked-panel {
    > label {
      @include box-sizing(border-box);
      padding: 10px 30px;
      color: #000;
      border-color: #e6e6e6;
    }
    
    @media print {
      height: auto !important;
      padding-top: 10px !important;
    }
  }
  
  @media print {
    @include print-position();
  }
}

// need this so IE9 can center the actual container
#hp-dialog-container-wrapper, .hp-dialog-container-wrapper {
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 20px;
  right: 20px;
  text-align: center;
  
  @media print {
    @include print-position();
  }
}

#hp-dialog-container, .hp-dialog-container {
  max-width: 920px;
  min-width: 300px;
  margin: 0px auto;
  background-color: $primary-background;
  color: $primary-color;
  z-index: $dialog-z-index;
  display: none;
  text-align: left;

  &.hp-active {
    display: inline-block;
  }
  
  @media print {
    @include print-position();
    border-left: 20px solid $secondary-background;
    border-right: 20px solid $secondary-background;
  }
}

.hp-dialog {
  position: relative;
  padding-top: $banner-height + 5;
  padding-bottom: $form-footer-height + 15;
  padding-left: 30px;
  padding-right: 30px;
  @include box-sizing(border-box);
  overflow: hidden;
  
  > header {
    position: absolute;
    top: 0px;
    left: 0px;
    right: 0px;
    height: $banner-height - 10;
    line-height: $banner-height - 10;
    white-space: nowrap;
    font-family: 'HPRegular', Arial, Helvetica, sans-serif;
    
    background-color: $secondary-background;
    border-bottom: 1px solid $primary-divider;
    margin-bottom: 10px;
    
    h1 {
      font-size: 28px;
      line-height: $banner-height - 10;
      font-weight: normal;
      margin: 0px 30px;
      width: 90%;
      overflow-x: hidden;
      text-overflow: ellipsis;
      font-family: 'HPLight', Arial, Helvetica, sans-serif;
    }
    
    > .hp-controls {
      position: absolute;
      top: 0px;
      right: 0px;
      height: 100%;
      
      .hp-help-current {
        position: relative;
        display: inline-block;
        cursor: pointer;
        width: $banner-height - 11;
        height: 100%;
        line-height: $banner-height - 11;
      
        .hp-icon {
          position: relative;
          top: 16px;
          left: 18px;
          width: 20px;
          height: 20px;
          background-image: url($img-file);
          background-repeat: no-repeat;
          background-position: $help-x -20px;
        }
        &:hover {
          background-color: $primary-background;
        }
      }
    }
  }
  
  footer {
    position: absolute;
    bottom: 0px;
    left: 0px;
    right: 0px;
    height: $form-footer-height;
    line-height: $form-footer-height;
    border-top: 1px solid #d9d9d9;
    white-space: nowrap;
    
    .hp-spinner {
      position: absolute;
      left: 0px;
      top: 0px;
      display: inline-block;
      width: auto;
      margin: 7px 10px;
      .hp-spinner-image {
        margin: 0px;
      }
    }
    
    .hp-control-message {
      display: block;
      vertical-align: top;
      color: $secondary-color;
      white-space: nowrap;
      overflow-x: hidden;
      text-overflow: ellipsis;
      padding: 0px 15px;
      @include box-sizing(border-box);
      
      &.hp-error {
        background-color: $attention-background;
        border-right: 1px solid $primary-divider;
      }
    }
    
    .hp-controls {
      position: absolute;
      right: 0px;
      top: 0px;
      padding: 0px 30px;
      white-space: nowrap;
      
      > * {
        margin-left: 5px;
      }
    }
  }
  
  .hp-filters {
    position: relative;
    
    .hp-search {
      width: 100%;
      padding-right: 30px;
    }
    
    .hp-search-icon {
      position: absolute;
      top: 8px;
      right: 7px;
      width: 15px;
      height: 16px;
      background-image: url($img-file);
      background-position: -120px -120px;
      background-repeat: no-repeat;
    }
  }
  
  .hp-add-choices {
    width: 100%;
    min-width: 400px;
    @include no-select();
    
    tr {
      cursor: pointer;
    }
  }
  
  .hp-column-form {
    min-width: 600px;
  }
}

.hp-show-view-multi {
  margin: 20px 0px;
}

.hp-details-edit-section, .hp-details-add-section {
  position: absolute;
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;
  
  &.hp-empty {
    background-color: $secondary-background;
    .hp-panel-selector, .hp-form-contents, .hp-stacked-panels, .hp-form-controls input {
      visibility: hidden;
    }
    > .hp-empty-message {
      display: block;
      position: absolute;
      top: 50%;
      left: 50%;
      margin-top: -40px;
      margin-left: -50px;
      color: $secondary-color;
      font-style: italic;
      font-size: 18px;
    }
    > #hp-no-details {
      display: block;
      visibility: visible;
    }
  }
  
  .hp-edit-form, .hp-add-form {
    position: absolute;
    top: $banner-height;
    bottom: 0px;
    padding-bottom: $form-footer-height;
    @include box-sizing(border-box);
    
    > .hp-form-contents {
      height: 100%;
      padding: 20px 15px;
      margin-bottom: $form-footer-height;
      @include box-sizing(border-box);
      overflow: auto;
    }
    
    > .hp-stacked-panels {
      height: 100%;
      margin: 0px;
      @include box-sizing(border-box);
    }
    
    > .hp-footer {
      position: absolute;
      bottom: 0px;
      left: 0px;
      right: 0px;
      height: $form-footer-height;
      
      @media print {
        @include print-position();
        position: relative;
      }
    }
    
    @media print {
      @include print-position();
    }
  }
  
  @media print {
    @include print-position();
  }
}

.hp-details-more-section, .hp-details-contents {
  position: absolute;
  top: 0px;
  right: 0px;
  bottom: 0px;
  left: 0px;
  
  &.hp-has-nav {
    top: $subnav-height + 10px;
  }
  
  .hp-stacked-panels {
    height: 100%;
    margin: 0px;
    @include box-sizing(border-box);
  }
  
  @media print {
    @include print-position();
  }
}

.hp-details-contents {
  overflow: auto;
}