/**
 * @license
 * Copyright Akveo. All Rights Reserved.
 * Licensed under the MIT License. See License.txt in the project root for license information.
 */

@import 'input-statuses';
@import 'input-sizes';
@import 'input-shapes';

@mixin nb-input-theme() {

  [nbInput] {
    @include nb-input-core-theme();
    @include input-statuses();
    @include input-sizes();
    @include input-shapes();
  }

  @include nb-form-field-root-component('[nbInput]');

  @each $size in nb-get-sizes() {
    @include nb-form-field-with-prefix('[nbInput].size-#{$size}', $size);
    @include nb-form-field-with-suffix('[nbInput].size-#{$size}', $size);
  }
}

@mixin nb-input-core-theme() {
  border-style: nb-theme(input-border-style);
  border-width: nb-theme(input-border-width);
  font-family: nb-theme(input-text-font-family);
  appearance: none; // removes inner shadow on iOS

  &.nb-transition {
    @include nb-component-animation(border, background-color, color, box-shadow);
  }

  &::placeholder {
    font-family: nb-theme(input-placeholder-text-font-family);
    text-overflow: ellipsis;
  }

  &:focus {
    outline: none;
  }

  &.input-full-width {
    width: 100%;
  }
}
