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

.hp-toggle {
  display: inline-block;
  position: relative;
	@include box-sizing(border-box);
	///height: 26px;
	background-color: #fff;
  border: 1px solid #bbb;
  font-size: 14px;
  color: #000;
  margin-bottom: 10px;
  white-space: nowrap;
  overflow-x: hidden;
  cursor: pointer;
  @include no-select;
  
  &:focus {
    border: 1px solid $selected-background;
    outline: none;
    
    .hp-toggle-thumb {
      background-color: #333;
    }
  }
  
  &:hover {
    .hp-toggle-thumb {
      background-color: #333;
    }
  }
  
  &.hp-error {
    border: 2px solid $error;
  }
  
  &[disabled] {
    color: #999;
  }
  
  ol {
    position: relative;
    margin-bottom: 0px;
    @include transition(left, 0.2s);
  }
  
  li {
    display: inline-block;
    margin-right: -4px;
    @include box-sizing(border-box);
    padding: 5px 10px;
    margin: 0px;
    background-color: $primary-background;
    color: #000;
    ///@include transition(all, 0.2s);
    
    &.hp-on {
      padding-right: 16px;
    }
    
    &.hp-off {
      padding-left: 16px;
    }
  }
  
  .hp-toggle-thumb {
    position: absolute;
    top: 2px;
    left: 3px;
    @include box-sizing(border-box);
    padding: 0px;
    height: 20px;
    width: 6px;
    background-color: #999;
  	@include transition(left, 0.2s);
  }
  
  &.hp-checked {
    .hp-toggle-thumb {
      background-color: $menu-selected-color;
    }
  }
}
