.form-field-group { @include font-size($base-font-size); min-height: 2em; position: relative; .toggle-password-visibility { background: $white; color: $gray; display: inline-block; font-weight: 300; float: right; position: relative; top: 2rem; right: 0.625rem; z-index: 1000; } label { background: $white; color: $gray; font-weight: 300; margin: 0 6px; padding: 0 4px; position: relative; top: -2.25rem; transition: all 0.3s ease; user-select: none; white-space: nowrap; } input, textarea { font-size: inherit; border: 1px solid $gray; border-radius: 6px; margin-bottom: 4px; outline: none; padding: 12px; width: 100%; -webkit-appearance: none; &.float-label { & + label { @include font-size($base-font-size); color: $gray; font-weight: 300; top: -2.15rem; cursor: text; } &:focus, &:required:valid, &.placeholder-up { border-color: $blue; + label { @include font-size($base-font-size - 2); color: $black; font-weight: normal; top: -3.6rem; } } } &[disabled], &[disabled] + label { background-color: $gray-light; border-color: $gray-medium; color: $gray; &:hover { cursor: not-allowed; opacity: 1; } } } input[type=date] { padding-left: 40px; background: no-repeat url("/images/svg/icons/calendar.svg") 5px; background-size: 30px 30px; //background-position: 5px; } textarea.float-label { & + label { position: absolute; top: 1.5rem; left: 0; } &:focus, &:required:valid, &.placeholder-up { + label { left: 0; top: .25rem; } } } &.has-danger { input, textarea { &.float-label, &.float-label.placeholder-up { border-color: $red; + label { font-weight: normal; z-index: 2100; + label.error { @include font-size($base-font-size - 2); color: $red; display: block; margin-top: 1.25rem; white-space : normal; } @include font-size($base-font-size - 2); color: $red; top: -3.6rem; } } } textarea.float-label + label { top: .25rem; + label.error { margin-top: 2.25rem; } } } }