form fieldset {
    border: 0 none;
    margin: 0;
    padding: 0;
}

form legend {
    padding: 8px 0;
    color: #333;
}

form legend.required::after {
    content: ' *';
    color: red;
}

input[type=text], /* will only select text fields */
input[type=email], /* will only select text fields */
input[type=password], /* will only select password fields */
textarea,
select {
    font-family: sans-serif;
    font-size: 14px;

    margin: 0;
    padding: 2px 6px;
    line-height: 24px;

    border: 1px solid #999;
    border-radius: 0;
    background-color: #FFF;
    color: #000;

    /*vertical-align: top;*/

    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

textarea {
    min-height: 100px;
    resize: vertical;
    /*padding-top: 5px;*/
}

/* remove dropdown arrow on IE from select */
select::-ms-expand { display: none; }

select {
    background-image: url(../svg/select_arrow.svg);
    background-size: 22px 22px;
    background-repeat: no-repeat;
    background-position: right center;
    padding: 3px 22px 3px 6px;
    max-width: 100%;
}

select:disabled { background-image: url(../svg/select_arrow_disabled.svg) }

select option { padding: 6px; }

input[type=text]:disabled,
input[type=email]:disabled,
input[type=password]:disabled,
textarea:disabled,
select:disabled {
    color: #333;
    background-color: #EEE;
}

.w100 input[type=text],
.w100 input[type=email],
.w100 input[type=password],
.w100 textarea,
.w100 select,
.w100 button,
.w100 {
    width: 100%;
    box-sizing: border-box;
}

/*  Бутони */
button[type=submit] {
    border: none;
    background-color: #0084d9;
    color: #fff;

    text-transform: uppercase;
    font-family: sans-serif;
    font-size: 14px;
    line-height: 20px;
    text-decoration: none;
    padding: 7px 24px;
    display: inline-block;
    border-radius: 4px;
    cursor: pointer;
    box-sizing: border-box;

    -webkit-transition: background-color 0.5s ease;
    -moz-transition: background-color 0.5s ease;
    -ms-transition: background-color 0.5s ease; /* IE10 is actually unprefixed */
    -o-transition: background-color 0.5s ease;
    transition: background-color 0.5s ease;

    -webkit-appearance: none;
}

button[type=submit]:hover {
    background-color: #0b4887;
    color: #FFF;
}

button[type=submit]:disabled {
    background-color: #CCC;
    cursor: default;
}

/*CHECKBOX START*/
label.checkbox {
    padding: 5px 20px 5px 30px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    vertical-align: bottom;
    display: inline-block;
}

label.checkbox input { display: none; }

label.checkbox span {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #2457AA;
    background-color: #FFF;
    border-radius: 3px;
    content: ' ';
    vertical-align: middle;
    margin-right: 6px;
    margin-left: -30px;
}

label.checkbox input:checked + span {
    position: relative;
    background-color: #2457AA;
    border-color: #2457AA;
}

label.checkbox input:checked + span::before {
    position: absolute;
    display: block;
    content: ' ';
    border-bottom: 2px solid #FFF;
    border-right: 2px solid #FFF;
    width: 3px;
    height: 6px;
    top: 3px;
    left: 6px;
    transform: rotate(45deg);
}

label.checkbox.disabled { color: #ccc; }

label.checkbox.disabled span { border-color: #ccc; }

label.checkbox.disabled input:checked + span {
    background-color: #ccc;
    border-color: #ccc;
}

label.checkbox.disabled:hover { cursor: not-allowed; }
/*CHECKBOX END*/

/*custom radio*/
label.radio {
    /* line-height: 16px;*/
    padding: 5px 20px 5px 30px;
    vertical-align: bottom;
    display: inline-block;
    position: relative;
}

label.radio input { display: none;}

label.radio span {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 1px solid #2457AA;
    background-color: #FFF;
    border-radius: 50%;
    content: ' ';
    vertical-align: middle;
    margin-left: -30px;
    margin-right: 10px;
}

label.radio input:checked + span {
    position: relative;
    border-color: #2457AA;
}

label.radio input:checked + span::before {
    position: absolute;
    display: block;
    content: ' ';
    background-color: #2457AA;
    border-radius: 50%;
    width: 8px;
    height: 8px;
    top: 3px;
    left: 3px;
}
/* custom radio END */

/* formerror */
.mgErrorField {
    border: 1px solid #ff0000 !important;
    background-color: #fffee4 !important;
}

.mgErrorTooltip {
    position: absolute;
    max-width: 520px;
    padding: 7px 20px 7px 10px;
    text-align: left;
    border-radius: 4px;
    color: #fff;
    background-color: #c40000;
    box-shadow: 1px 1px 3px 0 rgba(0,0,0,0.35);
    margin-top: 2px;
    z-index: 1;
}

.mgErrorTooltip:after {
    height: 0;
    width: 0;
    bottom: 100%;
    left: 25px;
    border: solid transparent;
    content: " ";
    position: absolute;
    border-color: rgba(196, 0, 0, 0);
    border-bottom-color: #c40000;
    border-width: 7px;
    margin-left: -7px;
}

label.checkbox .mgErrorTooltip,
label.radio .mgErrorTooltip {
    margin: 5px 0 0 -30px;
}
/* formerror */
