/*
 Fieldset
 -------------------------------------------------*/
fieldset {
    border: 1px solid #eee;
    border-radius: 4px;
    margin: 1em 0;
}

legend {
    font: 600 .875em system-ui, sans-serif;
}

/*
 Label
 -------------------------------------------------*/
label {
    display: inline-block;
    font: 600 .875em system-ui, sans-serif;
    line-height: 1.4285;
}

label[for] {
    padding: .5em;
}

.required label[for]:after {
    content: " \2014  REQUIRED";
    color: #777;
    font: 700 .625rem system-ui, sans-serif;
}

/*
 Input, Select, Textarea
 -------------------------------------------------*/
input,
select,
textarea {
    background: white none no-repeat;
    border: 2px solid #dae6f6;
    border-radius: 6px;
    box-shadow: 0 1px 2px rgba(18, 30, 46, .1) inset;
    color: #262a3e;
    font: 400 .875rem system-ui, sans-serif;
    line-height: 1.143;
    outline: none;
    padding: .5rem .75rem;
    -webkit-appearance: none;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #b5cae9;
}

.has-error input,
.has-error select,
.has-error textarea {
    border-color: mediumvioletred;
}

/*
 Date/Time input
 -------------------------------------------------*/
input.datetime {
    padding-right: 1.65rem;
}

input.datetime + .datetime-clear {
    border-radius: 1em;
    bottom: .65em;
    display: block;
    font: 700 1.5em "Material Icons";
    height: 1em;
    left: calc(100% - 1.25em);
    line-height: 1;
    position: relative;
    top: -1.25em;
    width: 1em;
}

input.datetime + .datetime-clear:after {
    content: "cancel";
    color: #ccc;
    cursor: pointer;
}

input.datetime + .datetime-clear:hover:after {
    color: black;
}

.form-group.required .datetime-clear {
    display: none;
}

/*
 Select / Dropdown
 -------------------------------------------------*/
select[multiple],
textarea {
    display: block;
}

select:not([multiple]) {
    background-image: url("data:image/svg+xml,<svg fill='rgb(181, 202, 233)' xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'><path d='M16.59 8.59L12 13.17 7.41 8.59 6 10l6 6 6-6-1.41-1.41z'/></svg>");
    background-size: 24px 24px;
    background-position: right .5em center;
    padding: .5rem 2.25rem .5rem .75rem;
}

/*
 Checkbox, Radio, File, Number
 -------------------------------------------------*/
input[type=checkbox],
input[type=radio] {
    vertical-align: middle;
    margin-right: .5em;
}

input[type=radio] {
    border-radius: 50%;
}

input[type=checkbox]::-ms-check {
    border: 2px solid #dae6f6;
}

input::-webkit-file-upload-button {
    background-color: transparent;
    border-radius: 6px;
    border: 1px solid #dae6f6;
    color: #35507a;
    display: inline-block;
    margin: -.429em .5em -.5em -.75em;
    outline: none;
    padding: .5em .5em;
}

input::-ms-browse {
    background-color: transparent;
    border-radius: 6px;
    border: 1px solid #dae6f6;
    color: #35507a;
    display: inline-block;
    margin: -.429em .5em -.5em -.75em;
    outline: none;
    padding: .5em .5em;
}

input[type=number] {
    -moz-appearance:textfield;
}

input[type=number]::-webkit-inner-spin-button,
input[type=number]::-webkit-outer-spin-button {
    margin: -.5rem -.75rem;
    padding: .5rem;
}

/*
 Checkbox/Radio Icons
 -------------------------------------------------*/
input[type=checkbox]:after,
input[type=radio]:after {
    color: #6880ac;
    content: "done";
    display: block;
    font: 700 1.5em "Material Icons";
    padding: .34375rem;
    width: 100%;
}

input[type=radio]:after {
    content: "lens";
}

input[type=radio]:not(:checked):after,
input[type=checkbox]:not(:checked):after {
    color: transparent;
}

/*
 Table Styles
 -------------------------------------------------*/
table input,
table select {
    border-width: 1px;
    box-shadow: none;
    width: 100%;
}

/*
 Form Group
 -------------------------------------------------*/
.form-group {
    margin: 1em 0;
    display: block;
    position: relative;
}

.form-group label {
    display: block;
    padding-left: 0;
    width: 100%;
}
.form-group.radio-group label {
    padding: .5em;
}

.form-group input:not([type=checkbox]):not([type=radio]),
.form-group textarea,
.form-group select {
    width: 100%;
}

.error-summary,
.help-block,
.hint-block {
    color: mediumvioletred;
    display: block;
    font: 400 .875em system-ui, sans-serif;
    line-height: 1.5;
    padding: .25em;
}

.hint-block {
    color: #b0acb5;
}

.help-block:empty,
.form-group:not(.has-error) .help-block,
.hint-block:empty {
    display: none;
}
