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

@import "hp-piano-mixins";

div.hp-dashboard {
  
  div.hp-details-full {
    padding: 0px;
  }
  
  div.hp-grid-panels {
    top: 15px;
    bottom: 15px;
    left: 15px;
    right: 15px;
    
    div.hp-grid-panel {
      > header a {
        .hp-count {
          padding-left: 5px;
          color: $panel-title-color;
        }
        &:hover .hp-count {
          color: $text-link-color;
        }
      }
      
      .hp-panel-contents-container {
        overflow: hidden;
      }
      
      ol.hp-summary-status {
        font-size: 16px;
      }
      
      ol.hp-utilization-summary {
        li {
          display: inline-block;
          margin-right: 20px;
        }
      }
      .hp-pie {
        width: 120px;
        height: 120px;
      }
      
      .hp-pie-summary {
        margin: 10px 0px;
        text-align: center;
      }
    }
  }
}

// for xSystems, convert them over
.hp-dashboard {
  position: absolute;
  top: 0px;
  left: 0px;
  right: 0px;
  bottom: 0px;
  height: auto;
  width: auto;
  overflow: auto;
  padding: 0px;
  
  .hp-details-edit-section {
    position: absolute;
    top: 0px;
    right: 0px;
    left: $sidebar-width;
    bottom: 0px;
    height: auto;
    width: auto;
    min-width: $sidebar-width;
    overflow-y: auto;
    overflow-x: hidden;
    background-color: #fff;
    padding: 10px 24px 0px 24px;
    
    @media print {
      position: relative;
      left: 0px !important;
    }
  }
  
  .hp-grid-panels {
    .hp-aggregate-panel {
      text-align: center;
      > header {
        text-align: left;
      }
      .hp-aspects {
        text-align: center;
      }
      > ol, > table {
        margin: 40px auto;
      }
      > table {
        margin-top: 30px;
      }
    }
  }
}

section.hp-dashboard-panels {
  position: absolute;
  top: $subnav-height + $body-gutter;
  bottom: $body-gutter;
  left: $body-gutter;
  right: $body-gutter;
  padding: 30px;
  background-color: $primary-background;
}

ol.hp-dashboard-primary {
  height: 50%;
  width: 100%;
  overflow: hidden;
  text-align: center;
  margin: 0px;
}

ol.hp-dashboard-secondary {
  height: 34%;
  width: 100%;
  overflow: hidden;
  text-align: center;
  margin: 0px;
}

ol.hp-dashboard-indicators {
  height: 16%;
  width: 100%;
  border-top: 5px solid $secondary-divider;
  margin: 0px;
}

div.hp-dashboard-tertiary {
  background-color: $secondary-background;
}

div.hp-dashboard-notify {
  position: relative;
  background-color: $attention-background; ///#0096d6;
  color: $attention-color; ///#fff;
  font-size: 20px;
  font-family: 'HPRegular', Arial, Helvetica, sans-serif;
  
  .hp-status.hp-primary {
    float: left;
    margin-right: 20px;
    margin-bottom: 20px;
  }
}

li.hp-dashboard-panel {
  display: inline-block;
  vertical-align: top;
  text-align: left;
  border-top: 5px solid $secondary-divider;
  margin-right: 30px;
  @include box-sizing(border-box);
  padding-bottom: 30px;
  height: 100%;
  overflow: hidden;
  
  &:last-child {
    margin-right: 0px;
  }
  
  header h2 {
    font-size: 18px;
    color: #000;
    margin-bottom: 20px;
    font-family: 'HPBold', Arial, Helvetica, sans-serif;
    
    html.hp-high-contrast & {
      color: $projection-secondary-color;
    }
    
    .hp-count {
      color: $panel-title-color;
      font-family: 'HPRegular', Arial, Helvetica, sans-serif;
      padding-left: 10px;
      
      &:after {content: ' >';}
      
      html.hp-high-contrast & {
        color: $projection-tertiary-color;
      }
    }
  }
  
  .hp-alerts-summary .hp-alerts-status-counts {
    li {
      min-width: 60px;
      padding-right: 0px;
      margin-right: 20px;
      &:last-of-type {
        margin-right: 0px;
      }
    }
    .hp-status {
      display: inline-block;
      margin: 0px 2px;
    }
    .hp-status-count, .hp-status-delta {
      display: inline-block;
      height: 14px;
      font-size: 15px;
      padding-top: 4px;
      text-align: center;
      &:after {
        content: ' ';
      }
    }
    .hp-status-count {
      display: none;
    }
  }
  &:hover {
    .hp-alerts-summary {
      .hp-status-count {
        display: inline-block;
      }
      .hp-status-delta {
        display: none;
      }
    }
  }
  
  table {
    margin: 15px 0px;
    
    td, th {
      padding: 5px;
    }
    thead td, thead th {
      background-color: $primary-background;
      color: $tertiary-color;
      border-left: none;
      
      html.hp-high-contrast & {
        color: $projection-tertiary-color;
      }
    }
  }
}

// indicators
.hp-indicator {
  display: inline-block;
  padding: 15px 0px;
  //min-width: 200px;
  
  .hp-value {
    display: inline-block;
    font-size: 36px;
    line-height: 42px;
    color: #666;
    font-family: 'HPLight', Arial, Helvetica, sans-serif;
    
    html.hp-high-contrast & {
      color: $projection-secondary-color;
    }
    
    &:hover {
      color: $text-link-color;
      text-decoration: none;
    }
  }
  
  .hp-delta {
    display: inline-block;
  }
  
  label {
    display: block;
    margin-top: 5px;
    color: $secondary-color;
    
    html.hp-high-contrast & {
      color: $projection-secondary-color;
    }
  }
  
  &.hp-changed {
    .hp-value, label {
      color: $primary-color;
      
      html.hp-high-contrast & {
        color: $projection-color;
      }
    }
  }
}

// activity

.hp-dashboard-activity {
  
  h1 {
    font-size: 18px;
    line-height: 18px;
    color: $secondary-primary-color;
    font-weight: normal;
    margin-bottom: 20px;
    
    html.hp-high-contrast & {
      color: $projection-secondary-color;
    }
    
    .hp-activity-count {
      color: $secondary-color;
      &:before {content: "("}
      &:after {content: ")"}
      
      html.hp-high-contrast & {
        color: $projection-secondary-color;
      }
    }
  }
  
  .hp-summary {
    
    > li {
      display: inline-block;
      vertical-align: top;
      margin-right: 16px;
      
      .hp-status, .hp-user {
        margin-bottom: 5px;
        margin-right: 0px;
      }
      
      .hp-user {
        background-image: url($img_file);
        background-position: $user-x -20px;
        background-repeat: no-repeat;
        width: 19px;
        height: 19px;
        
        &.hp-unset {
          background-position: $user-x -40px;
        }
      }
    }
  }
}

.hp-dashboard-value {
  position: relative;
  display: inline-block; ///
  line-height: 32px;
  padding-bottom: 20px;
  ///margin-right: 20px;
  
  .hp-grid-panels .hp-grid-panel .hp-panel-contents & {
    width: auto;
    vertical-align: top;
    min-width: 200px;
  }
  
  > * {
    display: inline-block;
    vertical-align: top;
  }
  h3 { ///
    display: block;
  }
  .hp-value-graph {
    margin-right: 15px;
    margin-bottom: 15px;
  }
  .hp-status {
    float: left;
    top: 10px;
    margin-right: 15px;
  }
  .hp-value {
    font-size: 32px;
    line-height: normal;
    color: #666;
    font-family: 'HPLight', Arial, Helvetica, sans-serif;
    
    .hp-unavailable {
      display: inline-block;
      height: 28px;
    }
    
    .hp-units-details {
      display: block;
      font-size: 18px;
    }
  }
}

ol.hp-dashboard-controls {
  li {
    margin-bottom: 10px;
  }
}

// long so we can fix width without using !important
.hp-grid-panels .hp-grid-panel .hp-panel-contents div.hp-dashboard-bar-graph {
  border-left: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  padding: 0px 5px;
  width: 125px;
  
  .hp-graph {
    width: 120px;
    height: 120px;
  }
}

div.hp-dashboard {
  div.hp-value.hp-primary {
    color: inherit;
    font-family: 'HPRegular', Arial, Helvetica, sans-serif;
    font-size: 36px;
    line-height: normal;
    margin-bottom: 30px;
    
    &.hp-notify {
      background-color: $attention-background;
      padding: 15px;
      
      .hp-status {
        margin-top: 0px;
        margin-left: 0px;
      }
    }
    
    > .hp-status {
      display: inline-block;
    }
    .hp-summary {
      display: inline-block;
    }
    .hp-units-details {
      display: block;
      margin-top: 10px;
      font-family: 'HPLight', Arial, Helvetica, sans-serif;
      font-size: 20px;
    }
    .hp-guidance {
      padding: 15px 0px;
      font-family: 'HPLight', Arial, Helvetica, sans-serif;
      font-size: 16px;
      color: #000;
    }
  }
  
  div.hp-graphed-value {
    width: 200px;
    margin: 30px auto;
  }
}

/*
.hp-activity {
  color: $secondary-primary-color;
  margin-bottom: 25px;
  
  html.hp-high-contrast & {
    color: $projection-secondary-color;
  }
  
  > * {
    display: inline-block;
    vertical-align: top;
  }
  
  .hp-status, .hp-user {
    width: 11px;
    height: 11px;
    margin-top: 5px;
    margin-right: 5px;
  }
  
  .hp-user {
    background-image: url($img_file);
    background-position: $user-x -120px;
    background-repeat: no-repeat;
  }
  
  .hp-message {
    width: 140px;
  }
}
*/