@import "../helpers/index.scss"; .form-field { .field-label-wrapper { .field-label { @include font($size: $t4-text, $color: $primary-text-clr); line-height: 22px; margin: 0 0 4px; span { color: $ink-lightest-clr; margin-left: 4px; } } .field-helper-text { @include font($size: $t4-text, $color: $ink-lighter-clr); line-height: 22px; margin: 0 0 4px; } } .field-input-wrapper { position: relative; .error-msg { @include font($size: $t4-text, $color: $error-clr); line-height: 22px; margin: 4px 0 0; animation: shakeError 0.5s cubic-bezier(0.36, 0.07, 0.19, 0.97) both; transform: translate3d(0, 0, 0); backface-visibility: hidden; perspective: 1000px; span { margin-right: 4px; } } } } //Normal input styles .normal-input { width: 100%; padding: 8px 16px; @include font($size: $t4-text, $color: $primary-text-clr); line-height: 22px; background-color: $white; border: 1px solid $grey-light-clr; border-radius: $radius-4; &::placeholder { color: $ink-lightest-clr; } &:focus { outline: 3px auto rgba(47, 128, 237, 0.3); } &.error { border: 1px solid $error-clr; &:focus { outline: 3px auto rgba(248, 54, 54, 0.3); } } } .select2 { &.error { border: 1px solid $error-clr; border-radius: 5px; &:focus { outline: 3px auto rgba(248, 54, 54, 0.3); } } } .file-upload-wrapper { display: inline-flex; align-items: center; .file-upload-input { position: relative; display: flex; justify-content: center; align-items: center; padding: 5px 16px; border: 1px solid $primary-text-clr; border-radius: $radius-4; cursor: pointer; input[type="file"] { position: absolute; top: 0; right: 0; bottom: 0; left: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; &::-webkit-file-upload-button { cursor: pointer; } } .upload-placeholder-1 { @include font($size: $t4-text, $color: $ink-lighter-clr, $weight: 600); } .upload-placeholder-2 { @include font($size: $t4-text, $color: $primary-text-clr, $weight: 600); margin-left: 4px; } } .file-name { @include font($size: $t4-text, $color: $primary-text-clr); margin: 0 0 0 8px; } } //checkbox-style input.cm-checkbox[type="checkbox"] { position: relative; // display: block; display: inline-block; width: 16px; height: 16px; // float: left; -webkit-font-smoothing: antialiased; text-rendering: optimizeSpeed; &:hover::after { background: $grey-lighter-clr; } &:after { content: ""; vertical-align: middle; text-align: center; position: absolute; height: 16px; width: 16px; font-size: 11px; line-height: 17px; background: $white; border: 1.5px solid $grey-regular-clr; border-radius: $radius-2; cursor: pointer; } &:checked:after { background: $brand-color; content: "\f00c"; font-family: FontAwesome !important; color: $white; border: none; } &.disabled { &:hover::after { background: transparent; cursor: not-allowed; } &:checked:after { background: $grey-light-clr; content: "\f00c"; font-family: FontAwesome !important; color: $white; border: none; } } } //Radio button styles .cm-radio-section { width: 100%; float: left; .cm-radio-label { float: left; padding-left: 10px; } .cm-radio-tag { float: left; } } input.cm-radio[type="radio"] { position: relative; display: inline-block; width: 16px; height: 14px; -webkit-font-smoothing: antialiased; text-rendering: optimizeSpeed; &:focus { outline: none; } &:hover::after { background: $grey-lighter-clr; } &:after { content: ""; vertical-align: middle; text-align: center; position: absolute; height: 16px; width: 16px; background-color: $white; border: 1.5px solid $grey-regular-clr; border-radius: $circle; cursor: pointer; } &:checked:after { background: $brand-color; content: "\25CF"; color: $white; font-size: 9px; line-height: 16px; border: none; } &.disabled { &:hover::after { background: transparent; cursor: not-allowed; } &:checked:after { background: $grey-light-clr; content: "\25CF"; color: $white; font-size: 9px; line-height: 16px; border: none; } } } //Switch styles .cm-switch { position: relative; display: inline-block; width: 36px; height: 22px; input { display: none; } .slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: $grey-light-clr; transition: all 0.2s linear; } .slider:before { position: absolute; content: ""; width: 18px; height: 18px; left: 2px; bottom: 2px; background-color: $white; transition: all 0.2s linear; } input:checked + .slider { background: $brand-color; } input:checked + .slider:before { -webkit-transform: translateX(14px); -ms-transform: translateX(14px); transform: translateX(14px); } .slider.round { border-radius: 12px; } .slider.round:before { border-radius: $circle; } }