@use "sass:color";
@use "../base";
@use "../functions" as *;
@use "./Input";

$text-color: Input.$text-color !default;
$background-color: Input.$background-color !default;
$border-color: Input.$border-color !default;
$border-radius: Input.$border-radius !default;

.NumberInput {
  position: relative;
  display: inline-block;
  border: base.em(1px) solid $border-color;
  border: base.em(1px) solid rgba($border-color, 0.75);
  border-radius: $border-radius;
  color: $border-color;
  background-color: $background-color;
  padding: 0 base.em(4px);
  margin-right: base.em(2px);
  line-height: base.em(17px);
  text-align: right;
  overflow: visible;
  cursor: n-resize;
}

.NumberInput--fluid {
  display: block;
}

.NumberInput__content {
  margin-left: 0.5em;
}

.NumberInput__barContainer {
  position: absolute;
  top: base.em(2px);
  bottom: base.em(2px);
  left: base.em(2px);
}

.NumberInput__bar {
  position: absolute;
  bottom: 0;
  left: 0;
  width: base.em(3px);
  box-sizing: border-box;
  border-bottom: base.em(1px) solid $border-color;
  background-color: $border-color;
}

.NumberInput__input {
  display: block;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  border: 0;
  outline: 0;
  width: 100%;
  font-size: base.em(12px);
  line-height: base.em(17px);
  height: base.em(17px);
  margin: 0;
  padding: 0 0.5em;
  font-family: Verdana, sans-serif;
  background-color: $background-color;
  color: $text-color;
  text-align: right;
}
