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

@import './size-form-control';
@import './default-form-control';
@import '../../core/mixins';
@import './custom-forms';

@mixin nga-b-forms-theme() {

  .input-group-addon,
  .form-control {
    padding: 0.875rem 1.125rem;
    color: nga-theme(form-control-text-primary-color);
    background-color: nga-theme(form-control-bg);
    border: nga-theme(form-control-border-width)
            nga-theme(form-control-border-type)
            nga-theme(form-control-border-color);
    font-family: nga-theme(font-main);
    border-radius: nga-theme(form-control-border-radius);

    &:focus {
      border: nga-theme(form-control-border-width)
              nga-theme(form-control-border-type)
              nga-theme(form-control-primary-border-color);
      background-color: nga-theme(form-control-focus-bg);
    }

    &:disabled {
      border-color: #504b95;

      @include install-placeholder(rgba(161, 161, 229, 0.2),
                                   nga-theme(form-control-placeholder-font-size));
    }

    @include form-control-validation(nga-theme(form-control-text-secondary-color));
    @include install-placeholder(shade(nga-theme(form-control-placeholder-color), 14%),
                                 nga-theme(form-control-placeholder-font-size));
  }

  select.form-control:not([size]):not([multiple]) {
    height: calc(2.25rem + 20px);
  }

  .form-control-label {
    color: nga-theme(form-control-text-primary-color);
    font-weight: nga-theme(form-control-label-font-weight);
  }

  .form-control-feedback {
    font-size: nga-theme(form-control-feedback-font-size);
    font-weight: nga-theme(form-control-feedback-font-weight);
  }

  .form-text {
    color: nga-theme(color-fg);
    margin-left: 1rem;
    font-family: nga-theme(font-main);
  }

  @include form-control-size();
  @include form-control-default();

  @include custom-forms();
}
