// -----------------------------------------------------------------------------
// This file contains all styles related to the inputnumber component.
// -----------------------------------------------------------------------------
// @import "./variables.scss";

.#{$namespace}input-number {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: $input-number-width;
  height: $input-number-height;
  border-radius: $input-number-border-radius;
  border: 1px solid $input-number-border-color;
  &:hover:not(.#{$namespace}disabled){
    border: 1px solid $input-number-border-color-hover;
  }
  &:active:not(.#{$namespace}disabled){
    border-color: $input-number-border-color-active;
  }
  &.#{$namespace}disabled {
    * {
      cursor: not-allowed;
    }
  }
  
  .#{$namespace}input-number-minus, .#{$namespace}input-number-plus {
    background: $input-number-control-background;
    user-select: none;
    height: 100%;
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  
    &:hover {
      cursor: pointer;
      color: $input-number-control-hover-color;
      background: $input-number-control-hover-background;
    }

    &:active {
      color: $input-number-control-active-color;
    }
  
    &.#{$namespace}disabled {
      background-color: $input-number-disabled-background-color;
      color: $input-number-disabled-color;
      cursor: not-allowed;
    }
  }
  
  .#{$namespace}input-number-minus {
    border-radius: $input-number-minus-border-radius;
    border-right: 1px solid $input-number-border-color;
  }
  
  .#{$namespace}input-number-plus {
    border-radius: $input-number-plus-border-radius;
    border-left: 1px solid $input-number-border-color;
  }
  
  .#{$namespace}input-number-number {
    text-align: center;
    height: 100%;
    width: $input-number-number-width;
    border: none;

    &:hover, &:focus, &:active {
      outline: none;
    }
  
    &[disabled] {
      background-color: $input-number-disabled-background-color;
      color: $input-number-number-disabled-color;
    }
    
    &[readOnly] {
      background-color: $input-number-number-readonly-background-color;
      color: $input-number-number-readonly-color;
    }
  }
}

.#{$namespace}input-number-xs{
  width: $input-number-width-xs;
  height: $input-number-height-xs;
  .#{$namespace}input-number-number {
    width: $input-number-number-width-xs;
  }
}

.#{$namespace}input-number-sm{
  width: $input-number-width-sm;
  height: $input-number-height-sm;
  .#{$namespace}input-number-number {
    width: $input-number-number-width-sm;
  }
}

.#{$namespace}input-number-lg{
  width: $input-number-width-lg;
  height: $input-number-height-lg;
  font-size: $input-number-font-size-lg;
  .#{$namespace}input-number-number {
    width: $input-number-number-width-lg;
  }
}