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

#hp-page-notifications {
  position: relative;
  opacity: 0;
  top: -45px;
  background-color: $attention-background;
  color: $attention-color;
  height: 35px;
  margin-bottom: 10px;
  overflow: hidden;
  background-image: $select-down-url;
  background-position: right 8px;
  background-repeat: no-repeat;
  border-top-right-radius: 7px;
  border-bottom-left-radius: 7px;
  white-space: nowrap;
  cursor: pointer;
  
  .hp-notify-disabled & {
    display: none;
    top: -$subnav-height;
  }
  
  &:hover {
    background-image: $select-down-over-url;
    border: 2px solid #999;
    margin: -2px -2px 8px -2px;
  }
  
  &:focus {
    outline: none;
  }
  
  &.hp-available {
    opacity: 1;
    top: 0px;
  }
  
  &.hp-active {
    background-image: $select-up-url;
    max-height: 80%;
    height: auto;
    @include drop-menu-border();
    border-bottom-color: #F4B51E;
    //border-radius: 0px;
    border-top-right-radius: 7px;
    border-bottom-left-radius: 7px;
    margin: -1px;
    z-index: 100;
    
    &:hover {
      background-image: $select-up-over-url;
    }
    
    .hp-notification .hp-full, .hp-controls .hp-selector {
      display: block;
      overflow-y: auto;
      overflow-x: hidden;
    }
    
    .hp-notification {
      > header {
        height: auto;
        .hp-message {
          margin-top: 10px;
          line-height: 15px;
          white-space: normal;
          
          > p {
            overflow: visible;
            text-overflow: clip;
            white-space: normal;
            margin-bottom: 0px;
          }
        }
      }
    }
  }
  
  html.hp-high-contrast & {
    color: $projection-attention-color;
  }
  
  a {
    color: $text-link-color;
  }
  
  @media print {
    @include print-position();
    display: none;
  }
  
  .hp-notification {
    position: relative;
    display: inline-block;
    vertical-align: top;
    margin-right: -4px;
    @include box-sizing(border-box);
    border: 1px solid transparent;
    overflow: hidden;
    white-space: nowrap;
    
    > header {
      vertical-align: top;
      height: 35px;
      line-height: 35px;
      
      > .hp-status {
        top: 12px;
        left: 10px;
        line-height: 14px;
        margin-right: 10px;
      }
    }
    
    .hp-source, .hp-source-name {
      display: none;
    }
    
    .hp-full {
      display: none;
      position: relative;
      margin: 0px 0px 20px 0px;
      padding: 0px 28px;
      max-height: 400px;
      overflow-y: auto;
      white-space: normal;
      
      p, ul, ol {
        margin: 10px 0px;
      }
      
      .hp-resolution-container {

        > h3 {
          display: inline;
          font-weight: bold;
          font-size: inherit;
          margin-right: 5px;
        }

        .hp-resolution {
          display: inline-block;

          > p {
            display: inline;
          }
        }

        .hp-actions {
          margin-top: 15px;
          > li {
            color: $primary-color;
            display: inline-block;
            margin-right: 20px;
          }
        }
      }
    }
  }
  
  .hp-controls {
    display: inline-block;
    vertical-align: top;
    width: 200px;
    border-left: 1px solid #ccc;
    @include box-sizing(border-box);
    
    > header {
      height: 35px;
      line-height: 35px;
      padding: 0px 10px;
    
      .hp-view-all {
        display: inline-block;
        margin-right: 10px;
      }
    
      //removed the hp-summary-status class and imported and applied styles attached to it from _hp-piano-status
      ol {
        display: inline-block;
        > li {
          display: inline-block;
          margin-right: 10px;
    
          > * {
            display: inline-block;
          }
        }
        .hp-status {
          top: 4px;
          left: 2px;
        }
      }
    }
    
    .hp-selector {
      display: none;
      height: 0px;
      margin-bottom: 0px;
      overflow-y: auto;
      
      li {
        padding: 5px 10px;
        background-color: $attention-background;
        
        &.hp-selected {
          background-color: $selected-background;
        }
        
        &:hover {
          background-color: $menu-selection;
        }
        
        .hp-status {
          display: inline-block;
          top: 4px;
        }
        .hp-message {
          display: inline-block;
          width: 160px;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
        .hp-timestamp {
          margin-left: 19px;
        }
      }
    }
  }
  
  @media print {
    display: block;
    margin-bottom: 10px;
  }
}

.hp-notification-summary {
  > * {
    display: inline-block;
    vertical-align: top;
    margin-right: 10px;
  }
  
  .hp-status {
    margin-right: 0px;
  }
  
  .hp-state {
    color: $secondary-color;
    
    .hp-progress {
      width: 100px;
      margin: 12px 10px 1px 10px;
    }
    
    .hp-duration {
      display: inline-block;
      margin-left: 10px;
      min-width: 40px;
      color: $secondary-color;
    }
  }
  
  .hp-message {
    display: inline-block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    
    > p {
      overflow: hidden;
      text-overflow: ellipsis;
      white-space: nowrap;
    }
  }
  
  .hp-aside {
    position: absolute;
    right: 10px;
    color: $secondary-color;
    
    > * {
      display: inline-block;
      white-space: nowrap;
    }
    
    .hp-owner {
      margin-right: 15px;
    }
  }
  
  .hp-close {
    position: absolute;
    top: 8px;
    right: 10px;
    width: 20px;
    height: 20px;
    background-position: -156px -16px;
    margin-left: 10px;
    display: none;

    &:hover {
      background-position: -156px 4px;
    }

    &.hp-active {
      display: block;
    }
  }
}

.hp-details-error { // .hp-details-error should be removed from all pages
  display: none;
  padding: 20px;
  margin-bottom: 20px;
}

.hp-details-notify, .hp-notify {
  position: relative;
  @include box-sizing(border-box);
  margin: 5px 0px 15px 0px;
  padding: 20px;
  background-color: $attention-background;
  color: $attention-color;
  white-space: normal;
  display: none;
  
  html.hp-high-contrast & {
    color: $projection-attention-color;
  }
  
  &.hp-active {
    display: block;
  }
  
  &.hp-notify-heavy {
    height: auto;
    width: auto;
    margin: 10px auto;
  }
  
  .hp-details-pane .hp-details-show-section & {
    margin-right: -15px;
  }
  

  .hp-status {
    margin-top: 12px;
    margin-left: 12px;
  }
  
  .hp-notify-message {
    padding: 8px 0px;

  }
  
  @media print {
    padding: 15px 0px;
    display: none;
  }
  
  a {
    cursor: pointer;
  }
  
  .hp-details-notify-controls, .hp-notify-controls {
    position: absolute;
    top: 8px;
    right: 12px;
    
    li {
      display: inline-block;
      margin-left: 8px;
      
      a {
        font-weight: bold;
        color: $secondary-color;
      }
    }
    
    @media print {
      display: none;
    }
  }
}

.hp-form-content .hp-notify {
  padding:14px;
  
  h3 {
    display:inline;
    font-size:13px;
    font-weight:bold;
  }
}

.hp-dialog-notification {
  position: relative;
  background-color: $attention-background;
  color: $attention-color;
  @include box-sizing(border-box);
  padding: 20px 30px;
  margin-bottom: 15px;
  overflow: auto;
  
  html.hp-high-contrast & {
    color: $projection-attention-color;
  }
  
  > * {
    display: inline-block;
    vertical-align: top;
  }
  
  > .hp-status {
    display: none;
    top: 2px;
    height: 12px;
  }
  
  > .hp-message {
    display: inline-block;
    max-width: 460px;
  }
  
  > .hp-full, .hp-details {
    display: block;
    margin-top: 10px;
    
    .hp-contents {
      overflow: auto;
    }
    
    p, ul, ol {
      margin: 10px 0px;
    }
    
    .hp-notification-details.hp-sub-details {
      position: relative;
      padding-left: 15px;
      
      &:before {
        display: block;
        content: '-';
        position: absolute;
        top: 0px;
        left: 0px;
      }
    }
    
    .hp-resolution-container {

      > h3 {
        display: inline;
        font-weight: bold;
        font-size: inherit;
        margin-right: 5px;
      }

      .hp-resolution {
        display: inline-block;

        > p {
          display: inline;
        }
      }

      .hp-actions {
        margin-top: 15px;
        > li {
          color: $primary-color;
          display: inline-block;
          margin-right: 20px;
        }
      }
    }
    
    .hp-actions {
      margin-top: 15px;
      margin-bottom: 0px;
      
      > li {
        color: $primary-color;
        display: inline-block;
        margin-right: 10px;
      }
    }
  }
}

.hp-details-pane .hp-notify {
  width: auto;
  margin: 0px 0px 20px 0px;
}

.hp-temporary-status {
  clear: both;
}

.hp-error-section {
  background-color: inherit;
}

#hp-error-page, .hp-error-section {
  
  .hp-notify {
    max-width: 600px;
    height: auto;
    margin: 0px auto;
    background-color: #fff;
    color: #000;
    text-align: left;
    @include drop-menu-border();
    
    h1 {
      display: block;
      font-weight: bold;
      font-size: 14px;
      margin-bottom: 15px;
    }
    
    label {
      display: block;
      font-weight: bold;
      margin-bottom: 5px;
    }
    
    a {
      text-decoration: underline;
    }
    
    footer {
      width: 100%;
      text-align: right;
    }
    
    .hp-spinner {
      width: 400px;
      background-color: #fff;
      color: #000;
      padding: 20px 10px 50px 10px;
      margin: 0px auto;
      @include drop-menu-border();
    }
  }
}

.hp-sessioned .hp-error-section {
  background-color: inherit;
  
  .hp-notify {
    width: 400px;
    margin: 0px auto;
    background-color: #fff;
    color: #000;
    @include drop-menu-border();
  }
  
  .hp-notify-autowidth {
    width: auto;
  }
}

.hp-unauthorized-page { // deprecated
  width: 400px;
  margin: 40px auto;
  padding: 10px;
  background-color: $information-background;
  color: $attention-color;
}
