.Wrapper {
  position: relative;
  width: 100%;
}

.Input {
  display: block;
  outline: none;
  box-sizing: border-box;
  min-height: 29px; /* input-height - 1!*/
  max-height: 29px; /* input-height - 1!*/
  width: 100%;
  padding-left: 3px;
  padding-right: 5px;
  color: var(--input-color);
  font-size: var(--input-font-size);
  transition: 0.2s ease background-color;

  box-shadow: none;
  border: none;
  border-radius: 0; /* iPad adds border */
  border-bottom: var(--input-border);
  background-color: transparent;
}

.TextAlignRight.Input {
  text-align: right;
}

.AnimatedBorder {
  position: relative;
  display: block;
}
.AnimatedBorder:before,
.AnimatedBorder:after {
  content: '';
  height: 2px;
  width: 0;
  bottom: 0;
  position: absolute;
  background: var(--input-focus-border-color);
  transition: 0.2s ease all;
}
.AnimatedBorder:before {
  left: 50%;
}
.AnimatedBorder:after {
  right: 50%;
}

.Input:focus {
  /*border-color: transparent;*/
}

.Input:focus ~ .AnimatedBorder:before,
.Input:focus ~ .AnimatedBorder:after {
  width: 50%;
}

.Input.Error,
.Input.Error.Disabled {
  background: var(--input-error-background-color);
}
.Input.Error ~ .AnimatedBorder:before,
.Input.Error ~ .AnimatedBorder:after {
  background: var(--input-error-border-color);
  width: 50%;
}

.Input.Disabled {
  color: var(--input-disabled-color);
  background-color: var(--input-disabled-background);
  box-shadow: none;
}
.Input.Disabled::placeholder {
  color: var(--input-disabled-color);
}

.Input.WithIcon {
  padding-right: 20px;
}
.Input.WithPrefixIcon {
  padding-left: 25px;
}
.Icon {
  position: absolute;
  right: 6px;
  bottom: 3px;
}
.PrefixIcon {
  display: flex;
  position: absolute;
  left: 2px;
  bottom: 6px;
}

/* AUTOFILL HACK */
/*https://medium.com/@brunn/detecting-autofilled-fields-in-javascript-aed598d25da7*/

@keyframes :global(onAutoFillStart) {
  /* ADDED opacity:1 JUST BECAUSE PRODUCTION BUILD DELETES EMPTY ANIMATIONS */
  from {
    opacity: 1;
  }
  to {
    opacity: 1;
  }
}
@keyframes :global(onAutoFillCancel) {
  from {
    opacity: 1;
  }
  to {
    opacity: 1;
  }
}

.Wrapper input:-webkit-autofill {
  animation-name: 'onAutoFillStart';
}
.Wrapper input:not(:-webkit-autofill) {
  animation-name: 'onAutoFillCancel';
}

.TestContentCentered {
  justify-content: center;
}
