label {
    color: var(--color-secondary);
    font-size: 14px;
    display: inline-block;
    line-height: 1em;
}

input[type=checkbox] + *, input[type=radio] + * {
    font-weight: normal;
    line-height: 1.5;
    margin: 0 0 0.7em 0;
    display: block;
    font-size: 1em;
    white-space: normal;
    padding: 0;
    border: 0;
    text-align: left;
}

input[type=radio]:checked + span {
    font-weight: 600;
}

input[type=checkbox] + *, label input[type=radio] + * {
    margin: 0
}

input[type="text"],
input[type="date"],
input[type="password"],
input[type="email"],
input[type="tel"],
select,
textarea {
    -moz-appearance: none;
    -webkit-appearance: none;
    -ms-appearance: none;
    appearance: none;
    background: transparent;
    border: none;
    border-bottom: solid 1px #dcdcdc;
    color: var(--color-black);
    display: block;
    width: 100%;
    outline: 0;
    margin: 0;
    padding: 24px 0 5px;
    text-decoration: none;
    box-sizing: border-box;
    /*height: calc(24px + 24px + 5px);*/
    line-height: 1.5em;
    font-family: inherit !important;
    font-size: 16px;
    font-style: normal;
    font-weight: normal;
    z-index: 1;
    position: relative;
    border-radius: 0;
}

input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    /*border: none;*/
    /*border-bottom: solid 1px #dcdcdc;*/
    /*-webkit-text-fill-color: var(--color-black);*/
    -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
    /*transition: background-color 5000s ease-in-out 0s;*/
}

.helper input:-webkit-autofill,
.helper input:-webkit-autofill:hover,
.helper input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #fff inset !important;
}

select {
    margin: 0;
    padding-top: 0;
}

textarea {
    border: solid 1px var(--border-color);
    padding: 1em;
    min-height: 10em;
    line-height: 1.2em;
    background-color: rgba(178, 145, 66, 0.1);
    min-width: 100%;
}

textarea:focus {
    background-color: #fff;
}

body.is-ie textarea {
    min-height: 10em;
}


label + input {
    padding-top: 0 !important;
}

input[placeholder] ~ label:first-of-type,
.ui-effects-wrapper ~ label:first-of-type {
    margin: 0;
    position: absolute;
    font-size: 16px;
    -webkit-transition: all 0.2s ease-out;
    -moz-transition: all 0.2s ease-out;
    -o-transition: all 0.2s ease-out;
    transition: all 0.2s ease-out;
    -moz-transform: translateX(0) translateY(-30px);
    -webkit-transform: translateX(0) translateY(-30px);
    -ms-transform: translateX(0) translateY(-30px);
    transform: translateX(0) translateY(-30px);
    z-index: 0;
    white-space: nowrap;
    overflow: hidden;
    width: 100%;
}

input[placeholder]:focus ~ label:first-of-type,
input[placeholder]:not(:placeholder-shown) ~ label:first-of-type {
    -moz-transform: translateX(0) translateY(-53px);
    -webkit-transform: translateX(0) translateY(-53px);
    -ms-transform: translateX(0) translateY(-53px);
    transform: translateX(0) translateY(-53px);
    font-size: 14px;
    z-index: 1;
}

.input-eraser {
    --size: 10px;
    position: absolute;
    margin-top: 24px;
    min-width: unset;
    top: 10px;
    right: 0;
    cursor: pointer;
    z-index: 2;
    opacity: 0;
    transition: opacity 0ms ease;
    transition-delay: 100ms;
}

input[placeholder]:focus ~ .input-eraser {
    opacity: 1;
    transition-delay: 0;
}

input[placeholder]:placeholder-shown ~ .input-eraser {
    display: none;
}

input[type=text][placeholder] {
    padding-right: 30px;
}

input[type=password] ~ .password-control,
input[type=text] ~ .password-control {
    position: absolute;
    background: url("/i/show.svg") center right no-repeat;
    content: '';
    width: 24px;
    height: 24px;
    margin-top: -30px;
    right: 0;
    z-index: 1;
}

input[type=text] ~ .password-control {
    background: url("/i/hide.svg") center right no-repeat;
}

input ~ .input-comment {
    font-size: 14px;
    color: var(--color-secondary);
    line-height: 1em;
    margin-top: 5px;
}

input ~ .input-comment:empty {
    display: none;
}

input ~ .input-comment.warning {
    color: var(--color-red);
}

input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
select:focus,
textarea:focus {
    border-color: var(--border-color);
    box-shadow: none;
}

input[type="text"].warning,
input[type="password"].warning,
input[type="email"].warning,
input[type="tel"].warning,
input[type="date"].warning,
select.warning,
textarea.warning {
    border-color: var(--color-red);
}

input[type="text"][placeholder].warning ~ label:first-of-type,
input[type="password"][placeholder].warning ~ label:first-of-type,
input[type="email"][placeholder].warning ~ label:first-of-type,
input[type="tel"][placeholder].warning ~ label:first-of-type,
input[type="date"][placeholder].warning ~ label:first-of-type {
    color: var(--color-red);
}

input[type="checkbox"].warning + span {
    color: var(--color-red);
}

input[type="text"].small,
input[type="password"].small,
input[type="email"].small,
.select-wrapper.small select {
    height: 2em;
    font-size: inherit;
}

input[type="checkbox"],
input[type="radio"] {
    -moz-appearance: none;
    -webkit-appearance: none;
    -ms-appearance: none;
    appearance: none;
    display: block;
    /*float: left;*/
    /*margin-right: -2em;*/
    opacity: 0;
    width: 1em;
    z-index: -1;
    position: absolute;
}

input[type="checkbox"] + *,
input[type="radio"] + * {
    text-decoration: none;
    cursor: pointer;
    display: inline-block;
    font-size: 1em;
    font-weight: normal;
    padding-left: 32px;
    padding-right: 0.75em;
    position: relative;
    line-height: 1.4em;
    color: var(--color-black);
    min-height: 24px;
}

input[type="checkbox"] + *:empty, input[type="radio"] + *:empty {
    padding-right: 0;
}

input[type="checkbox"] + *:before,
input[type="radio"] + *:before {
    width: 24px;
    height: 24px;
    content: '';
    display: inline-block;
    left: 0;
    position: absolute;
    top: -1px;
}

input[type="checkbox"] + *:before {
    background: url("/i/checkbox-empty.svg");
}

input[type="radio"] + *:before {
    background: url("/i/radiobutton-empty.svg");
}


input[type="checkbox"]:checked + *:before {
    background: url("/i/checkbox-filled.svg");
}

input[type="radio"]:checked + *:before {
    background: url("/i/radiobutton-filled.svg");
}

input[type="checkbox"] + * a,
input[type="radio"] + * a {
    display: inline;
}

::-webkit-input-placeholder {
    color: rgba(0, 0, 0, 0.35) !important;
    opacity: 1.0;
}

:-moz-placeholder {
    color: rgba(0, 0, 0, 0.35) !important;
    opacity: 1.0;
}

::-moz-placeholder {
    color: rgba(0, 0, 0, 0.35) !important;
    opacity: 1.0;
}

:-ms-input-placeholder {
    color: rgba(0, 0, 0, 0.35) !important;
    opacity: 1.0;
}

.formerize-placeholder {
    color: rgba(0, 0, 0, 0.35) !important;
    opacity: 1.0;
}

input[type=password] {
    padding-right: 30px;
}

.ui-widget {
    z-index: 9999999999 !important;
}

.ui-autocomplete,
input ~ .searchResponse {
    display: none;
    background-color: #fff;
    color: #333;

    border-radius: 0 0 var(--box-radius) var(--box-radius);
    box-shadow: var(--box-shadow16dp);
    border: 1px solid #dcdcdc;
    border-top: none;
    line-height: 1em;
    padding: 0;
    position: absolute;
    font-size: 10pt;
    overflow-y: auto;
    text-align: left;
    max-height: 20em;
}

.ui-autocomplete .ui-menu-item,
input ~ .searchResponse .responseBody > * {
    display: block;
    text-decoration: none;
    padding: 0.7em 1.5em 0.7em 1em;
    border-bottom: 1px solid #dcdcdc;
    white-space: normal;
    cursor: pointer;
}

.ui-autocomplete .ui-menu-item a {
    padding: 0 !important;
    margin: 0 !important;
    background: none !important;
    border: none !important;
    color: var(--color-black);
}

.ui-autocomplete .ui-menu-item:hover a {
    color: var(--border-color);
}

.ui-autocomplete .ui-menu-item:last-child,
input ~ .searchResponse .responseBody > *:last-child {
    border-bottom: none;
}

input ~ .searchResponse .responseBody.no-results:before {
    content: 'Ничего не найдено';
    display: block;
    padding: 0.7em 1.5em 0.7em 1em;
}


.select-wrapper {
    text-decoration: none;
    display: block;
    position: relative;
    font-size: inherit;
    overflow: visible;
    /*border-bottom: 1px solid #ccc;*/
}

.select-wrapper select, .select-wrapper option {
    /*font-size: inherit;*/
}

/*
.select-wrapper.small:before {
    font-size: 0.8em;
    height: 2em;
    line-height: 2.5em;
}

.select-wrapper.small select, .select-wrapper.small option {
    font-size: 1em;
}
*/
.select-wrapper:before {
    content: '';
    background: url("/i/expand-down.svg") no-repeat center;
    width: 24px;
    height: 24px;
    display: block;
    pointer-events: none;
    position: absolute;
    right: 0;
    text-align: center;
    top: 0px;
}

.select-wrapper select::-ms-expand {
    display: none;
}

.select-wrapper select, .select-wrapper [readonly], .select-wrapper [contenteditable] {
    padding-right: 28px !important;
}

/*
.select-wrapper.small select, .select-wrapper.small [readonly], .select-wrapper.small [contenteditable] {
    padding-right: 24px !important;
}
 */

select option {
    background-color: #fff;
    color: #333;
    font-size: 1em;
    padding-inline: 0;
}


.aggrement-flag {
    margin-top: 1em;
    display: flex;
    flex-wrap: nowrap;
    align-items: flex-start;
    justify-content: flex-start;
    font-size: 12pt;
    position: relative;
    max-width: 550px;
}

.aggrement-flag > * {
    margin: 0 !important;
}

.aggrement-flag a {
    display: inline;
}
