.fm-float {
  position: relative;

  .feedback {
    position: absolute;
  }

  > .btn-dropdown,
  > .fm-input,
  > .fm-select, {
    //height: $form-float-height;

  }

  .fm-dropdown {
    .fm-options > .fm-option > label {
   //   height: $form-float-height;
     // line-height: $form-float-line-height;
    }
  }

  + button {
   // height: $form-float-height;
    padding: inherit;
  }


  > label {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%; // allow textareas
    font-size: $input-font-size;
    color: $input-placeholder-color;
    overflow: hidden;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    border: $input-border-width solid transparent; // Required for aligning label's text with the input as it affects inner box model
    transform-origin: 0 0;
    @include transition($form-float-transition);

    &.legend-textarea,
    &.fm-label {
      width: auto;
      padding-left: divide($form-float-padding-x, 2, 2);
      padding-right: divide($form-float-padding-x, 2, 2);
      margin-left: divide($form-float-padding-x, 2, 2);
      margin-right: divide($form-float-padding-x, 2, 2);
    }

    &.legend-textarea,
    &.fm-label {
      display: flex;
      height: 100%;
      align-items: center;
      padding-top: 0;
      padding-bottom: 0;

      @include transition(
        height .1s ease-in-out,
        background-color .1s ease-in-out,
        transform .1s ease-in-out,
      );
    }

    &.legend-textarea {
      padding-top: $form-float-padding-y;
      height: auto;

      @include transition(
        height .1s ease-in-out,
        background-color .1s ease-in-out,
        transform .1s ease-in-out,
      );
    }
  }



  > .fm-input {
  //  padding: $form-float-padding-y $form-float-padding-x;

    &::placeholder {
      color: transparent;
    }

    &:focus,
    &:not(:placeholder-shown) {
      // padding-top: $form-float-input-padding-t;
      // padding-bottom: $form-float-input-padding-b;
    }
    // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
    &:-webkit-autofill {
      // padding-top: $form-float-input-padding-t;
      // padding-bottom: $form-float-input-padding-b;
    }
  }

  &.fm-lg > .fm-select {
    padding-top: $form-float-input-padding-t;
    padding-bottom: $form-float-input-padding-b;
  }

  > .fm-select {
    padding-top: $form-float-input-padding-t;
    padding-bottom: $form-float-input-padding-b;
  }

  > .fm-input:focus,
  > .fm-input:not(:placeholder-shown),
  > .fm-select {

    ~ label.legend-textarea,
    ~ label.fm-label {
      will-change: auto;
      opacity: 1;
      height: auto;
      line-height: initial;
      background-color: $input-bg;
      color: $input-color;
      transform: $form-float-legend-transform;
    }

    ~ label {
      opacity: $form-float-label-opacity;
      transform: $form-float-label-transform;
    }
  }
  // Duplicated because `:-webkit-autofill` invalidates other selectors when grouped
  > .fm-input:-webkit-autofill {
    ~ label {
      opacity: $form-float-label-opacity;
      transform: $form-float-label-transform;
    }
  }
}
