@import 'css/master/settings/settings';
/*
****************************************************************************
Form Field Usage Notes/Documentation
****************************************************************************
https://sites.google.com/a/officedepot.com/ecomdev/home/form_field-usage
Form Field Sample markup
----------------------------------------------------------------------------
Form Field Label
Form Field Sample markup for an inline form (with labels to the left of inputs)
----------------------------------------------------------------------------
****************************************************************************
Styled Checkbox and Radio Usage Notes/Documentation
****************************************************************************
https://sites.google.com/a/officedepot.com/ecomdev/home/styled-checkbox-and-radio-usage
Styled Radio Sample Markup
----------------------------------------------------------------------------
Label text next to input element
Styled Checkbox Sample Markup
----------------------------------------------------------------------------
Label text next to input element
*/
.form_field {
display: block;
position: relative;
padding: 0 5px;
font-size: 1em;
margin: 0 0 10px 0;
min-height: 2em;
*zoom: 1; /*clearfix*/
}
/*clearfix*/
.form_field:before,
.form_field:after { content: " "; display: table; }
.form_field:after { clear: both; }
.form_field > label,
.form_field > label .help_block {
display: block;
padding: 6px 0;
margin: 0 -5px;
height: 1.2em;
line-height: 1.2em;
font-size: 1em;
font-weight: normal;
white-space: nowrap;
}
.justifyButtons {
display: flex;
justify-content: space-between;
grid-template-columns: 1fr 1fr;
}
.form_field > label.error {
padding: 6px 0 0;
white-space: normal;
margin: 0;
}
.form_field > label.input_wrapper {
white-space: normal;
height: auto;
}
.form_field label em.star {
position: absolute;
top: 5px;
left: -10px;
color: #c00;
font-weight: normal;
}
.form_field > label .help_block {
position: absolute;
top: 0;
right: 0;
margin-right: 0;
}
.form_field > input,
.form_field > select,
.form_field > textarea,
.form_field .form_field_input,
.form_field .hasDatepicker {
outline: none;
border: 1px solid #72777C;
padding: 4px;
margin: 0 -5px;
width: 100%;
height: 1.2em;
/*height: 1.4em\9;*/
font-size: 1.2em;
font-weight: normal;
@include border-radius(5px);
-webkit-appearance: none;
}
.form_field.float_label {
height: 62px;
}
.form_field.float_label > label:first-of-type {
bottom: 24px;
color: #72777C;
font-size: 16px;
left: 14px;
position: absolute;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
/*bottom: 38px\9;
color: #1e5a99\9;
font-size: 12px\9;*/
transition: all .2s ease-out;
-webkit-transition: all .2s ease-out;
}
.form_field.float_label > input {
height: 24px;
padding-left: 10px;
padding-top: 12px;
}
.form_field.float_label > select {
height: 42px;
padding: 0 0 0 10px;
}
.form_field.float_label > input ~ label.is_floated:first-of-type {
bottom: 42px;
left: 16px;
color: #1e5a99;
font-size: 12px;
pointer-events: none;
position: absolute;
transition: all .2s ease-out;
-webkit-transition: all .2s ease-out;
}
.form_field.float_label > input.error ~ label:first-of-type {
bottom: 24px;
left: 16px;
}
.form_field.float_label > input.error ~ label.is_floated:first-of-type {
bottom: 42px;
}
/* Tablet float labels */
.tablet .form_field.float_label > input ~ label:first-of-type {
bottom: 22px;
}
.tablet .form_field.float_label > input.error ~ label:first-of-type {
bottom: 22px;
}
.tablet .form_field.float_label > input ~ label.is_floated:first-of-type {
bottom: 40px;
left: 16px;
}
/**/
.form_field > input.error,
.form_field > select.error,
.form_field > textarea.error {
border: 1px solid #cc0000;
background-color: #f2bfbf;
}
.tablet .form_field > input[type=tel] { width: 100%; }
.form_field.auto_width > input,
.form_field.auto_width > select,
.form_field.auto_width > textarea,
.form_field.auto_width .form_field_input,
.form_field.auto_width .hasDatepicker {
width: auto;
margin-right: 10px;
}
.form_field > select,
.form_field > textarea,
.form_field select.form_field_input,
.form_field textarea.form_field_input { height: auto; }
.form_field > select,
.form_field select.form_field_input { padding: 3px 4px; background-color: #fff; }
.form_field > label > input {
margin: 0;
}
.form_field > input:focus,
.form_field > select:focus,
.form_field > textarea:focus,
.form_field .form_field_input:focus,
.form_field .hasDatepicker:focus {
border-color: #1e5a99;
}
.form_field > select,
.form_field select.form_field_input { -webkit-appearance: menulist; }
.form_field > img.info {
position: absolute;
top: 2.6em;
right: -16px;
}
.inline_form .form_field > img.info { top: .6em; }
.form_field .ui-datepicker-trigger {
position: absolute;
top: 2.6em;
right: 6px;
}
.inline_form .form_field .ui-datepicker-trigger { top: .6em; }
.form_field .help_block,
.form_field > label .help_block {
font-size: .9em;
color: #666;
font-weight: normal;
margin-top: .25em;
}
.tablet .form_field.phone_number > input[type=tel],
.form_field.phone_number input { width: 25%; }
.form_field.phone_number input + input { margin-left: 10px; }
/* Inline Form Styles */
.inline_form .form_field { padding-left: 17.5ex; }
.inline_form .gw2 > .form_field { padding-left: 76px; }
.inline_form .gw1 > .form_field { padding-left: 38px; }
.inline_form .form_field label {
position: absolute;
top: 0;
left: 10px;
white-space: normal;
}
.inline_form .form_field label.error {
position: static;
top: auto;
left: auto;
font-size: 1em;
padding-bottom: 0;
margin: 0;
clear: both;
}
.inline_form .form_field > label .help_block {
position: static;
top: auto;
right: auto;
}
/* Overrides for old form fields */
#phoneNumber1-0,
#faxNumber1-0,
#mobileNumber1-0,
#phoneNumber2-0,
#faxNumber2-0,
#mobileNumber2-0 {
text-align: center;
width: 3ex;
}
#phoneNumber3-0,
#phoneNumber4-0,
#faxNumber3-0,
#mobileNumber3-0 {
text-align: center;
width: 4ex;
}
.form_field #phoneNumber1-0,
.form_field #faxNumber1-0,
.form_field #mobileNumber1-0,
.form_field #phoneNumber2-0,
.form_field #faxNumber2-0,
.form_field #mobileNumber2-0,
.form_field #phoneNumber3-0,
.form_field #faxNumber3-0,
.form_field #mobileNumber3-0 {
width: 25%;
}
.form_field #phoneNumber4-0 {
width: 100%;
}
/* Fancy Checkboxes and Radio Buttons (Style Guide 7.x) */
input.styled_checkbox:not(old) { display: none; }
input.styled_checkbox + .styled_checkbox_label:after {
background: #fff;
display: inline-block;
width: 18px;
height: 18px;
color: #1e5a99;
border: 2px solid #1e5a99;
border-radius: 4px;
font-size: 18px;
font-weight: bold;
line-height: 18px;
content: '\00A0';
text-align: center;
cursor: pointer;
overflow: hidden;
vertical-align: text-bottom;
}
input.styled_checkbox:focus + .styled_checkbox_label {
content: '';
outline: 1px dotted #212121;
outline: 4px auto -webkit-focus-ring-color;
}
input.styled_checkbox.sr-only {
display: inline-block;
}
input.styled_checkbox.med + .styled_checkbox_label.med:after {
width: 14px;
height: 14px;
font-size: 14px;
line-height: 14px;
overflow: visible;
}
input.styled_checkbox:checked + .styled_checkbox_label:after,
input.styled_checkbox.checked + .styled_checkbox_label:after {
content: '\2713';
}
input.styled_checkbox.radio_on,
input.styled_checkbox.radio_on + .styled_checkbox_label,
input.styled_checkbox.radio_on + .styled_checkbox_label:after {
display: none;
}
input.styled_radio:not(old) { display: none; }
input.styled_radio + .styled_radio_label:after {
display: inline-block;
width: 13px;
height: 13px;
border: 1px solid #72777C;
border-radius: 15px;
color: #1e5a99;
content: '';
margin-right: .4ex;
position: relative;
top: .15em;
cursor: pointer;
}
input.styled_radio:checked + .styled_radio_label:after,
input.styled_radio.checked + .styled_radio_label:after,
input.styled_radio.radio_on + .styled_radio_label:after {
width: 5px;
height: 5px;
border: 5px solid #1e5a99;
}
/*------------------------------
Inline Error Messages
-------------------------------*/
.inline_error_box {
position: relative;
background: #ce0000;
}
.inline_error_box:before {
top: 100%;
left: 5%;
border: solid transparent;
border-top-color: #ce0000;
content: " ";
height: 0;
width: 0;
position: absolute;
margin-left: 5px;
border-width: 6px;
}
.form_field input.inline_error_box {
background: none;
border-color: #ce0000;
}
.form_field label.inline_error_box {
position: relative;
left: 0;
background: #ce0000;
color: #fff;
padding: 2px 4px;
margin-left: -5px;
}
.custom_select {
position: relative;
height: 40px;
background: $white;
margin: 5px 0;
@include box-shadow(0 7px 10px -8px, $grayLight);
&:after {
content: '';
position: absolute;
top: 0;
width: 0;
height: 0;
right: 20px;
bottom: 0;
margin: auto;
border-style: solid;
border-width: 5px 5px 0;
border-color: $blue transparent;
pointer-events: none;
display: block;
clear: none;
}
&:before {
width: 30px;
position: absolute;
top: 1px;
right: 10px;
bottom: 1px;
background: $white;
border-left: 1px solid $grayLight;
content: '';
pointer-events: none;
display: block;
}
&:hover {
&:before {
background: $grayLight;
}
}
select {
box-shadow: none;
background: transparent;
height: 100%;
width: 100% !important;
cursor: pointer;
outline: none;
padding-right: 35px;
padding-left: 15px;
border: 1px solid $grayLight;
margin-right: 0 !important;
@include border-radius(3px);
@include font-size(14px);
// Disable default styling on ff
-moz-appearance: none;
// Disable ugly ass outline on firefox
&:-moz-focusring {
color: transparent;
text-shadow: 0 0 0 #000;
}
// Disable default styling on webkit browsers
-webkit-appearance: none;
// Disable default arrow on IE 11+
&::-ms-expand {
display: none;
}
&:focus {
border-color: $grayLight;
}
}
}
// IE 9 only
@media all and (min-width:0\0) and (min-resolution:.001dpcm){
.custom_select{
select {
padding-right: 0;
}
&:after, &:before {
display: none;
}
}
}
#passwordComplexityHint {
background: $white;
padding: 10px 10px;
width: 240px;
li {
line-height: 1.7;
}
.pwd_one_accepted_characters {
border-top: 1px solid $grayLight;
margin-top: 0.5rem;
padding-top: 0.5rem;
}
.circle_icon {
border-radius: 50%;
float: left;
height: 11px;
margin: 3px 6px 0 0;
width: 11px;
padding: 1px 3px 1px 1px;
}
.circle_icon.valid {
border: 1px solid #90B50F;
animation: circlePulse 0.4s 1;
-webkit-animation: circlePulse 0.4s 1;
background-repeat: no-repeat;
filter: grayscale(100%) sepia(100%) hue-rotate(90deg);
background: url(https://media.officedepot.com/image/upload/v1580180790/gtools/images/us/od/mini_check.png);
background-repeat: no-repeat;
background-position: center;
}
.circle_icon.invalid {
border: 1px solid #9c9c9c;
filter: grayscale(100%);
background: #FFF url(https://media.officedepot.com/image/upload/v1580180790/gtools/images/us/od/mini_check.png) no-repeat center;
}
}