/*---------------------------------------------------------------------------------------------
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
* See LICENSE.md in the project root for license terms and full copyright notice.
*--------------------------------------------------------------------------------------------*/
@import "../style/index";
@import "./variables";

@mixin uicore-inputs-input {

  display:                block;
  width:                  100%;
  padding:                $uicore-inputs-padding-bordered $uicore-bordered-padding;
  margin:                 $uicore-inputs-margin 0;
  font-family:            $uicore-font-family;
  font-size:              $uicore-font-size;
  line-height:            normal;
  color:                  $buic-text-color;
  background-color:       $buic-background-control;
  background-image:       none;
  border:                 1px solid $buic-inputs-border;
  border-radius:          $uicore-border-radius;
  box-shadow:             $buic-inputs-boxshadow 0px 1px 1px inset;
  box-sizing:             border-box;
  transition:             border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;

  &:-ms-input-placeholder {       color: $buic-foreground-disabled; }
  &::-webkit-input-placeholder {  color: $buic-foreground-disabled; }
  &::placeholder {                color: $buic-foreground-disabled; }

  &[disabled] {

    background-color:   $buic-background-control-disabled;
    border-color:       $buic-foreground-disabled;
    color:              $buic-foreground-disabled;
    cursor:             not-allowed;
    opacity:            $uicore-opacity-disabled;
  }

  &[readonly] {

    color:              $buic-foreground-muted;
    cursor:             default;
  }

  &:focus {

    outline:            0px;
    border-color:       $buic-foreground-focus-border;
    box-shadow:         $uicore-inputs-focus-gradient;
  }
}
