.form {
    border: solid 1px #E8EAEC;
    border-radius: 4px;
    background: #fff;
    padding: 16px;
    margin-top: 16px;
}
.form--popup {
    border: none !important;
    margin: 0 !important;
    width: 424px;
    max-width: calc(100vw - 32px);
}
.form--popup-type-2 {
    padding: 20px 24px 28px;
}
.color-red {
    color: #FF0000;
}
.form__text h3,
.form__text .h3 {
    font-size: 16px;
    line-height: 20px;
    color: #1E2F46;
    margin-bottom: 12px;
}
.form__text {
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 16px;
}
.form__text div {
    margin-top: 12px;
}
.form__bottom-text {
    font-size: 14px;
    line-height: 20px;
    margin-top: 16px;
    margin-bottom: 26px;
}
.form__btns {
    margin-top: 30px;
}
.form__btns *:not(:first-child) {
    margin-top: 12px;
}
.form__note {
    border-bottom: solid 1px #E8EAEC;
    position: relative;
    margin-left: -16px;
    margin-right: -16px;
    z-index: 1;
}
.form__note h5,
.form__note .h5 {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 50%);
    z-index: 1;
    white-space: nowrap;
}
.form__note h5:before,
.form__note .h5:before {
    position: absolute;
    content: '';
    background-color: #fff;
    height: 100%;
    width: calc(100% + 16px);
    top: 0;
    left: -8px;
    z-index: -1;
}
label > span,
label div:not(.btn-group) {
    font-size: 14px;
    line-height: 20px;
    color: #1E2F46;
    margin-bottom: 4px;
    margin-top: 12px;
}
input[type="text"],
input[type="password"],
input[type="email"],
input[type="phone"],
input[type="tel"],
textarea {
    background-color: #fff;
    outline: none;
    box-shadow: none;
    border: solid 1px #E8EAEC;
    border-radius: 4px;
    box-sizing: border-box;
    width: 100%;
    font-size: 14px;
    line-height: 20px;
    color: #1E2F46;
    padding: 12px 16px;
    transition: all .3s;
}
textarea:disabled {
    background-color: #eaeaea;
}
input[type="text"]:hover,
input[type="password"]:hover,
input[type="email"]:hover,
input[type="text"]:focus,
input[type="password"]:focus,
input[type="email"]:focus,
input[type="tel"]:focus,
input[type="phone"]:focus,
textarea:focus { 
    border-color: #0868C2;
}
textarea {
    resize: vertical;
}
.person {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}
.person__img {
    width: 64px;
    height: 64px;
    margin-right: 14px;
    overflow: hidden;
    border-radius: 50%;
}
label {
    position: relative;
}
label input[type="radio"].radio,
label input[type="checkbox"].checkbox {
    position: absolute;
    opacity: 0;
}
label input[type="radio"].radio + span:empty,
label input[type="checkbox"].checkbox + span:empty {
    box-sizing: border-box;
    position: relative;
    display: inline-block;
    vertical-align: top;
    width: 16px;
    height: 16px;
    border: solid 1px #DADADA;
    margin: 3px 0 0;
    cursor: pointer;
    border-radius: 50%;
}
label input[type="checkbox"].checkbox + span:empty {
    border-radius: 4px;
    margin: 5px 0 0;
}
label input[type="radio"].radio + span:empty + span,
label input[type="checkbox"].checkbox + span:empty + span {
    margin: 0 0 0 5px;
    cursor: pointer;
}
label input[type="radio"].radio + span:empty:before,
label input[type="checkbox"].checkbox + span:empty:before {
    box-sizing: border-box;
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    width: 16px;
    height: 16px;
    border: solid 4px transparent;
    border-radius: 50%;
    transition: all .3s;
    cursor: pointer;
}
label input[type="checkbox"].checkbox + span:empty:before {
    border-radius: 4px;
}
label input[type="radio"].radio:checked + span:empty:before,
label input[type="radio"].radio.checked + span:empty:before,
label input[type="checkbox"].checkbox:checked + span:empty:before,
label input[type="checkbox"].checkbox.checked + span:empty:before {
    border-color: #0868C2;
}
label input[type="radio"].radio:checked:disabled + span:empty:before,
label input[type="radio"].radio.checked:disabled + span:empty:before,
label input[type="checkbox"].checkbox:checked:disabled + span:empty:before,
label input[type="checkbox"].checkbox.checked:disabled + span:empty:before {
    border-color: #DADADA;
}
.radio-text-input {
    position: relative;
    display: inline-block;
    vertical-align: top;
    margin-left: 5px;
    margin-top: -5px;
}
.radio-text-input input[type="text"] {
    width: 52px;
    padding: 4px 4px 4px 12px;
    text-align: left;
}
label input[type="radio"].radio:not(:checked) ~ .radio-text-input:before {
    content: '';
    position: absolute;
    width: 52px;
    height: 28px;
    top: 0;
    left: 0;
    cursor: pointer;
}
label input[type="radio"].radio:not(:checked) ~ .radio-text-input input[type="text"] {
    color: #788290;
}
label input[type="file"].file {
    position: absolute;
    opacity: 0;
    z-index: 2;
    width: 100%;
    height: 44px;
}
label input[type="file"] ~ .btn-group {
    width: 100%;
}
label input[type="file"] ~ .btn-group .btn {
    white-space: nowrap;
}
label input[type="file"] ~ .btn-group .btn:last-child {
    /*width: 100%;*/
    width: calc(100% - 134px);
}
.subfields {
    position: relative;
    padding-left: 20px;
}
.subfields:before {
    content: '';
    position: absolute;
    background-color: #F2F2F2;
    width: 4px;
    top: 0;
    left: 0;
    bottom: 0;
}
.input-error {
    border-color: #ED1C24 !important;
}
.input-error ~ small, .write-error {
    font-size: 14px;
    line-height: 20px;
    color: #ED1C24;
}
.form-row {

}
.form-row--checkbox {
    margin: 20px 0 22px;
}
form > label:first-child > span,
form > label:first-child div:not(.btn-group) {
    margin-top: 0;
}
form label + h3 {
    margin: 24px 0 16px;
}
form .info-box {
    margin-bottom: 24px;
}
.form-link {
    margin: 12px 0;
}
.form .info-note {
    padding: 0;
    margin-top: 30px;
    margin-bottom: 30px;
}
.form--popup-type-2 .info-note {
    margin-left: -24px;
    margin-right: -24px;
}
.form--popup-type-2 form > .btn {
    margin-top: 16px;
}
.popup--type-2 .fancybox-close-small {
    top: 14px;
    left: auto;
    right: 60px;
}
.popup--type-2 .fancybox-close-small svg path {
    stroke: #1E2F46;
}
.nice-select-up .list {
    top: auto;
    bottom: 100%;
    margin: 0 0 5px 0;
    transform: scale(0.75) translateY(42px);
}
.popup--success .form--popup {
    width: 650px;
    max-width: 100%;
    padding-top: 56px;
    padding-bottom: 52px;
}
.popup--success svg {
    margin-bottom: 24px;
}
.popup--success .btn {
    margin-top: 16px;
}
label input[type="radio"].radio ~ small,
label input[type="checkbox"].checkbox ~ small {
    display: block;
    margin: -4px 0 0 25px;
}
label input[type="radio"].radio:disabled + span:empty {
    border-color: #f0f0f0;
    cursor: default;
}
label input[type="radio"].radio:disabled + span:empty + span {
    color: #a4abb4;
    cursor: default;
}
label input[type="radio"].radio:disabled + span:empty + span span.color-body {
    color: #c8ccd2 !important;
}
.form__list {
    margin-top: 20px;
}
@media (min-width: 996px) {
    .form:not(.form--popup) {
        margin-top: 24px;
        padding: 24px;
        display: grid;
        grid-template-columns: 1fr 430px;
        -ms-grid-columns: 1fr 430px;
        grid-gap: 50px;
    }
    .form__text {
        margin-bottom: 0;
    }
    .form label:first-child > span,
    .form label:first-child div {
        margin-top: 0;
    }
    .form__text h3,
    .form__text .h3 {
        font-size: 18px;
        line-height: 24px;
    }
    label > span,
    label div:not(.btn-group) {
        margin-top: 16px;
    }
    .form__bottom-text {
        margin-bottom: 30px;
    }
    .form__btns {
        display: grid;
        display: -ms-grid;
        grid-template-columns: 1fr 1fr;
        -ms-grid-columns: 1fr 16px 1fr;
        grid-gap: 16px;
    }
    .form__btns > * {
        display: block;
        -ms-grid-row-align: center;
    }
    .form__btns > *:nth-child(1) {
        -ms-grid-column: 1;
    }
    .form__btns > *:nth-child(2) {
        -ms-grid-column: 3;
    }
    .form__btns *:not(:first-child) {
        margin-top: 0;
    }
    .form__note {
        margin: 0;
    }
}
@media (min-width: 1260px) {
    .form:not(.form--popup) {
        margin-top: 0;
        display: block;
    }
    .form__text {
        margin-bottom: 12px;
    }
    .form label:first-child > span,
    .form label:first-child div {
        margin-top: 0;
    }
    .form__text h3,
    .form__text .h3 {
        font-size: 18px;
        line-height: 24px;
    }
    label > span,
    label div:not(.btn-group) {
        margin-top: 16px;
    }
    .form__bottom-text {
        margin-bottom: 30px;
    }
	/*	.formmessage textarea,.formmessage input {max-width:95%;}*/
}
@media (max-width: 500px) {
    .popup--type-2 {
        padding-top: 10px;
    }
    .popup--type-2 .fancybox-close-small {
        top: 25px;
        right: 24px;
    }
    .form--popup-type-2 {
        padding: 16px;
    }
    .popup--type-2 .fancybox-close-small {
        right: 14px;
    }
    .popup--success svg {
        max-height: 100px;
    }
    .popup--success p br {
        display: none;
    }
    /*.formmessage textarea,.formmessage input {max-width:90%;}*/
}