input, select{
  background-color: $gray-dark;
  color: $gray-lighter;
  border: 1px solid $gray-light;
  font-family: $font-family-bold;

  &:focus{
    border-color: $teal-lighter;
  }

  // Change Autocomplete styles in Chrome
  &:-webkit-autofill,
  &:-webkit-autofill:hover,
  &:-webkit-autofill:focus, {
    border: 1px solid $input-border;
    -webkit-text-fill-color: $input-color;
    transition: background-color 5000s ease-in-out 0s;
    font-family: "Oxygen Bold", Arial, sans-serif;
    font-weight: bold;
    font-size: 12px;
    @include box-shadow(0 0 0 50px $gray-dark inset !important);
  }

  &[disabled]{
    @include placeholder(transparent);
  }

  &.pf-select2{
    height: 32px; // supposed to be select2 field (before initialization)
  }
}

input[type='number']{
  &::-webkit-inner-spin-button,
  &::-webkit-outer-spin-button {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    margin: 0;
    display: none;
  }
}

input[type='file']{
  &::-webkit-file-upload-button{
    background-color: transparent;
    border: none;
    color: $gray-light;
    outline: none;
  }
}

textarea{
  min-height: 32px;
  max-height: 400px;
  resize: vertical;
}

fieldset[disabled]{
  .form-control{
    color: $gray-light;
    @include placeholder(transparent);
  }

  .input-icon-left, .input-icon-right{
    .fa-stack{
      i:last-child{
        color: $gray;
      }
    }
  }
}

#select2-pf-map-dialog-edit-icon-select-container,  //select2 head
#select2-pf-map-dialog-new-icon-select-container,   //select2 head
#select2-pf-map-dialog-new-icon-select-results,     //Select2 body
#select2-pf-map-dialog-edit-icon-select-results,    //Select2 body
.pf-form-icon-field {
  font-family: "Font Awesome 5 Free";
  font-weight: bold;
  option {
    font-family: inherit;
    font-weight: inherit;
  }
}

// fix for ugly <select> boxes (Firefox) ==============================================================================
@supports (-moz-appearance:none) {
  select {
    -moz-appearance: none !important;
    background: $gray-dark url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAgAAAAFCAMAAABPT11nAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAAZQTFRFiIiIAAAA/v9K/QAAAAJ0Uk5T/wDltzBKAAAAHElEQVR42mJggAFGGMUIZjGCGIwMYIIRCgACDAABOwAVoypkGgAAAABJRU5ErkJggg==') right center no-repeat !important;
    background-position: calc(100% - 5px) center !important;
    padding-right: 16px !important;
  }
}

// form fields with icons groups (stacked icons) ======================================================================
.input-icon-left:not(.input-icon-right){
  .fa-stack:first-child{
    left: 14px;
  }
}

.input-icon-right:not(.input-icon-left){
  .fa-stack:first-child{
    right: 14px;
  }
}

.input-icon-left.input-icon-right{
  .fa-stack:first-child{
    left: 14px;
  }
  .fa-stack:nth-child(2) {
    right: 14px;
  }
}

.input-icon-left, .input-icon-right{
  .fa-stack{
    position: absolute;
    top: 4px;

    i:first-child{
      color: $gray-light;
    }

    i:last-child{
      color: $gray-dark;
    }
  }
}


// buttons ============================================================================================================
.btn{
  // progress bar inside button
  .btn-progress{
    position: absolute;
    display: block;
    height: 100%;
    background-color: rgba($green, .2 );
    max-width: 100%;
    width: 0;
    top: 0;
    left: 0;
    overflow: hidden;
    line-height: 30px;
    color: $orange-light;
    font-size: 10px;
    text-align: left;
    @include transition( width 0.1s linear);
  }
}


// drag&drop zone
.pf-form-dropzone{
  border: 2px dashed $gray-darker;
  height: 100px;
  background-color: darken($gray, 3%);
  text-align: center;
  font-size: 20px;
  line-height: 100px;
  margin: 15px 0;
  color: $gray-darker;
  border-radius: 10px;
  @include transition( color 0.18s ease-out, border-color 0.18s ease-out);

  &:hover{
    color: $teal-lighter;
    border-color: $teal-lighter;
    cursor: -moz-grabbing;
    cursor: -webkit-grabbing;
    cursor: grabbing;
  }
}


// fix for bootstrap-toggle plugin
.toggle{
  &.btn:active{
    box-shadow: none;
  }
}


.pf-form-field-char-count{
  display: block;
  margin-top: 10px;
}
