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

// common styling for devices, cards, ports, connectors

.hp-device, .hp-logical {
  padding: 5px 15px;
  border: 2px solid $device-border;
  border-top-right-radius: 7px;
  border-bottom-left-radius: 7px;
  
  &.hp-placeholder {
    background-image: none;
    border-color: #eee;
  }
  
  .hp-status, .hp-device-name {
    display: inline-block;
    vertical-align: top;
    top: 6px;
  }
  .hp-status {
    .hp-status {
      top: 0px;
      left: 0px;
    }
  }
  .hp-device-model, .hp-secondary, .hp-context {
    display: block;
    margin-top: 3px;
    padding-left: 18px;
    color: $secondary-color;
  }
  
  .hp-context {
    font-size: 15px;
    margin-bottom: 10px;
  }
  
  .hp-filter-pane &, .hp-filter-pane .hp-rack & {
    background: none;
    padding: 5px;
  }
  
  a {
    color: $text-link-color;
    &.selectBox-dropdown {
      color: #333;
    }
  }
}

.hp-device {
  @include device-border();
}

.hp-card {
  padding: 5px 10px;
  background-color: #fff;
}

.hp-path-cable {
  position: relative;
  top: 12px;
  width: 20px;
  height: 13px;
  background: url($img-file);
  background-position: -200px -140px;
  background-repeat: no-repeat;
}

.hp-usage {
  position: relative;
  margin: 2px 65px 0px 10px;
  height: 10px;
  width: 40px;
  label {
    position: absolute;
    top: -2px;
    left: 50px;
    color: $secondary-color;
  }
  .hp-utilization-meter-value-above, .hp-utilization-meter-value-below {
  }
}

.hp-up-ports, .hp-down-ports {
  > li:last-of-type {
    margin-bottom: 0px;
  }
}

.hp-up-port, .hp-down-port {
  margin-bottom: 5px;
  padding: 5px 10px;
  min-width: 44px;
  @include box-sizing(border-box);
  > * {
    display: inline-block;
    vertical-align: top;
  }
  label {
    margin-right: 5px;
  }
  .hp-status {
    top: 2px;
    height: 14px;
    width: 14px;
    
  }
}

.hp-up-port {
  border-top: 1px solid $graphics-border;
  
  &:first-child {
    border-top: none;
  }
}

.hp-down-port {
  border-top: 1px solid $graphics-border;
  
  &:first-child {
    border-top: none;
  }
}

.hp-nic, .hp-switch {
  
  > * {
    display: table-cell;
    vertical-align: top;
  }
  
  .hp-up-ports {
    margin-left: -4px;
    border-left: 1px solid $graphics-border;
    padding: 0px 5px;
  }
  
  .hp-down-ports {
    margin-right: -4px;
    border-right: 1px solid $graphics-border;
  }
  
  .hp-card {
    border: 2px solid $graphics-border;
    
    > label {
      display: block;
      margin-left: 8px;
    }
    
    > ol {
      margin: 5px 0px;
    }
    
    // flex nics
    .hp-port {
      padding-bottom: 5px;
      padding-left: 8px;
      padding: 5px 10px;
      border-bottom: 1px solid $graphics-border;
      
      &:last-child {
        border-bottom: none;
        margin-bottom: 0px;
      }
      
      > * {
        display: inline-block;
        vertical-align: top;
        margin-right: 5px;
      }
      
      .hp-status {
        display: inline-block;
      }
    }
  }
}
