// (C) Copyright 2020 Hewlett-Packard Enterprise Company, L.P.

#hp-main-banner {
  #hp-activity-notification {
    position: absolute;
    top: 0px;
    right: 0px; //-400px;
    height: $banner-height;
    max-width: 150px;
    padding: 0px 15px;
    @include box-sizing(border-box);
    background-color: $global-background;
    color: #000;
    line-height: $banner-height;
    font-size: 13px;
    white-space: nowrap;
    z-index: $header-z-index + 2; // above primary, below secondary
    @include transitions(right, 1s, max-width, 1s);
    
    &.hp-active {
      right: 150px;
      max-width: 400px;
    }
    
    .hp-message {
      padding-left: 30px;
      max-width: 300px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }

    .hp-status {
      position: absolute;
      top: 25px;
      left: 25px;
      display: none;
      -webkit-animation: bounce 0.7s ease-in-out 0.5s infinite;
      -moz-animation: bounce 0.7s ease-in-out 0.5s infinite;
      -ms-animation: bounce 0.7s ease-in-out 0.5s infinite;
      -o-animation: bounce 0.7s ease-in-out 0.5s infinite;
      
      &.hp-active {
        display: block;
      }
    }
    
    @media print {
      display: none;
    }
  }
}

@-webkit-keyframes bounce {
  0%  {left: 25px;}
  30% {left: 25px;}
  50% {left: 15px;}
  70% {left: 25px;}
  90% {left: 27px;}
  100%  {left: 25px;}
}

@-moz-keyframes bounce {
  0%  {left: 25px;}
  30% {left: 25px;}
  50% {left: 15px;}
  70% {left: 25px;}
  90% {left: 27px;}
  100%  {left: 25px;}
}

@-ms-keyframes bounce {
  0%  {left: 25px;}
  30% {left: 25px;}
  50% {left: 15px;}
  70% {left: 25px;}
  90% {left: 27px;}
  100%  {left: 25px;}
}

@-o-keyframes bounce {
  0%  {left: 25px;}
  30% {left: 25px;}
  50% {left: 15px;}
  70% {left: 25px;}
  90% {left: 27px;}
  100%  {left: 25px;}
}

#hp-activity-flyout, #hp-upload-flyout {
  
  > header {
    #hp-activity-count {
      &:before {
        content: '(';
      }
      &:after {
        content: ')';
      }
    }
  }
  
  .hp-flyout-contents {
    max-height: 400px;
    overflow-y: auto;
  }
  
  &.hp-sidebarred {
    .hp-flyout-contents {
      max-height: none;
      overflow-x: hidden;
      overflow-y: auto;
      
      .hp-activity {
        > .hp-activity-message {
          width: 131px;
        }
      }
      
      .hp-fileupload {
        > .hp-upload-message {
          width: 131px;
        }
      }
    }
  }
  
  #hp-flyout-new-activities, #hp-flyout-old-activities {
    margin: 0px;
  }
    
  li.hp-activity, li.hp-fileupload {
    color: #000;
    height: 45px;
    line-height: 15px;
    cursor: pointer;
    @include transition(background-color, 8s);
    
    &:hover {
      .hp-brief {
        background-color: $global-hover-background;
      }
    }
    
    &.hp-selected, &.hp-selected:hover {
      div.hp-brief {
        background-color: $selected-background;
        border-top: 1px solid #ccc;
        border-bottom: 1px solid #ccc;
        border-right: 1px solid #ccc;
        left: -1px;
        padding: 6px 14px 6px 16px;
        width: 201px;
        z-index: 50;
        > * {
          opacity: 0.2;
        }
      }
      div.hp-full {
        z-index: 50;
        opacity: 1;
        right: 200px;
        width: 300px;
      }
    }
    
    &.hp-new {
      background-color: $primary-background;
    }
    
    div.hp-brief {
      position: relative;
      @include box-sizing(border-box);
      padding: 7px 15px;
      background-color: transparent;
      min-height:45px; //to keep the same height as activity brief
      
      > .hp-status {
        float: left;
        //margin-top: 1px;
        margin-right: 5px;
        margin-bottom: 14px;
      }
    
      > .hp-activity-message, > .hp-upload-message {
        display: block;
        margin-bottom: 3px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        
        p {
          margin: 0px;
        }
      }
    
      > .hp-activity-source {
        color: #666;
        width: 121px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        
        p {
          margin: 0px;
        }
      }
    }
    
    div.hp-full {
      position: absolute;
      top: 0px;
      right: 0px;
      width: 200px;
      max-height: 70%;
      overflow: auto;
      padding: 7px 20px 7px 28px;
      @include box-sizing(border-box);
      @include drop-menu-border();
      background-color: #f3f3f3;
      color: #000;
      opacity: 0;
      z-index: -50;
      line-height: normal;
      @include transition(right, $appearance-duration);
        
      header {
        margin-bottom: 10px;
        
        > * {
          display: inline-block;
          vertical-align: baseline;
          white-space: normal;
          color: #333;
        }
        
        > .hp-status {
          position: absolute;
          top: 9px;
          left: 10px;
        }
        
        > .hp-timestamp {
          display: block;
          color: #666;
          margin-right: 4px;
          margin-top: 5px;
        }
        
        > .hp-activity-message, .hp-upload-message {
          margin-right: 4px;
          p {
            margin-bottom: 0px;
          }
        }
      }
      
      > .hp-contents {
        margin-top: 10px;
        
        > .hp-actions {
          margin-bottom: 10px;
        }
      }
      
      a {
        color: $text-link-color;
      }
    }
  }

  footer {
    @include box-sizing(border-box);
    height: $flyout-footer-height;
    padding: 10px 15px;
  }
}

#hp-upload-flyout {
  li.hp-fileupload {
    div.hp-full {
      word-break:break-all;
      overflow:visible;   //added to fix the spinning icon disappearing for upload flyouts 
      
      > .hp-contents {
        > .hp-details {
          display: none;  // used for calculating the interval
        }
        > .hp-message {
          display: inline-block;
        }
        > .hp-actions {
          margin-top: 10px;
          display: block;
        }
      }
    }
  }
}

#hp-flyout-uploads {
  .hp-close {
    display: inline-block;
    position: relative;
    top: 4px;
  }
  
  .hp-upload-message {
    display: inline-block;
  }
}
