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

.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 {
  .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;
        }
      }
    }
  }
}

div.hp-master-full {
  .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;
      }
    }
  }
}

div.hp-master-details {
  div.hp-master-pane {
    .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;
        }
      }
    }
  }
}
