/*section.form h1 {
    margin: 0;
    padding-bottom: 10px;
    color: #0091DC;
}*/

form fieldset {
    border: 0 none;
    margin: 0;
    padding: 0;
}

form legend {
	padding: 8px 0;
    color: #555;
}

form legend.required::after,
form label.required::after {
    content: ' *';
    color: red;
}

input[type=text],
input[type=email],
input[type=tel],
input[type=number],
input[type=url],
input[type=password],
textarea,
select {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;

    margin: 0;
    padding: 4px 8px;
    line-height: 25px;
    border: 1px solid #0091DC;
    background-color: #FFF;
    border-radius: 0;

    height: 35px;

    box-sizing: border-box;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* INFO: Hide Arrows From Input Number -> https://www.w3schools.com/howto/howto_css_hide_arrow_number.asp */
/* Chrome, Safari, Edge, Opera */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

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

textarea {
    min-height: 150px;
    resize: vertical;
}

/* remove dropdown arrow on IE from select */
select::-ms-expand {
    display: none;
}

select {
    background-image: url(../svg/arrow-down.svg);
    background-size: 28px 28px;
    background-repeat: no-repeat;
    background-position: right center;
    padding: 4px 30px 4px 6px
}

input[type=text]:disabled,
input[type=email]:disabled,
input[type=tel]:disabled,
input[type=number]:disabled,
input[type=url]: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=tel],
.w100 input[type=number],
.w100 input[type=url],
.w100 input[type=password],
.w100 textarea,
.w100 select,
.w100 button,
.w100 {
    width: 100%;
    box-sizing: border-box;
}

/*  Бутони */
button[type=submit],
a.submit,
a.cancel {
    text-transform: uppercase;
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 25px;
    text-decoration: none;
    padding: 3px 20px;
    display: inline-block;
    vertical-align: top;

    border-radius: 4px;
    border: none;

    -webkit-transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
    -moz-transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
    -ms-transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease; /* IE10 is actually unprefixed */
    -o-transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;
    transition: background-color 0.5s ease, border-color 0.5s ease, color 0.5s ease;

    -webkit-appearance: none;
}

button[type=submit],
a.submit {
    color: #FFF;
    background-color: #0091DC;
    border: 1px solid #0091DC;
}

a.cancel {
    color: #999;
    border: 1px solid transparent;
}

button[type=submit]:hover,
a.submit:hover {
    background-color: #999;
    border-color: #999;
    cursor: pointer;
}

button[type=submit]:disabled,
a.submit.disabled {
    background-color: #CCC;
    cursor: default;
}

a.cancel:hover {
    background-color: #EEE;
    color: #000;
    border-color: #D1D1D1;
}

/*button.cancel {
    border-radius: 4px;
    color: #c12130;
    padding: 8px 20px;
    line-height: 18px;
    text-decoration: none;
    background: linear-gradient( #f0f0f0, #cfcfcf);
    text-align: center;
    text-transform: uppercase;
    cursor: pointer;
    min-height: 18px;
    margin: 15px;
}*/

/*
a.cancel {
    font-family: 'Open Sans', sans-serif;
    font-size: 14px;
    line-height: 24px;
    padding: 5px 20px;
    height: 36px;
    text-transform: uppercase;
    color: #999;
    text-decoration: none;
    display: inline-block;
    cursor: pointer;
    margin: 0 10px;
    border: 1px solid transparent;

    box-sizing: border-box;

    -webkit-transition: background-color 0.5s ease, border 0.5s ease;
    -moz-transition: background-color 0.5s ease, border 0.5s ease;
    -ms-transition: background-color 0.5s ease, border 0.5s ease;
    -o-transition: background-color 0.5s ease, border 0.5s ease;
    transition: background-color 0.5s ease, border 0.5s ease;
}
*/

select option { padding: 6px; }

/* custom select */
.mgSelect {
    position: relative;
    display: inline-block;
}

.mgReadOnly {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
}

.mgSelect input[type=text] {
    background-image: url(../svg/arrow-down.svg);
    background-size: 28px 28px;
    background-repeat: no-repeat;
    background-position: right center;
    padding: 4px 30px 4px 6px;
}

.mgSelect .mgSList {
    display: none;
    opacity: 0;
    position: absolute;
    margin-top: 2px;
    background-color: #fff;
    border: 1px solid #999;
    min-width: 100%;
    box-sizing: border-box;

    max-height: 300px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    overflow-x: hidden;
    overflow-y: auto;
}

.mgSelect .mgSList a {
    display: block;
    padding: 5px 10px;
    text-decoration: none;
    cursor: pointer;
}

.mgSelect .mgSList a img {
    vertical-align: middle;
    padding-right: 10px;
}

.mgSelect .mgSList a:hover,
.mgSelect .mgSList a.current {
    color: #FFF;
    background-color: #008ADB;
}

.mgSelect .mgSList div {
    position: sticky;
    top: 0;
    background-color: #FFF;
    padding: 7px 30px 5px 10px;
    white-space: nowrap;
}
/* *** */

/* checkbox */
label.checkbox {
    line-height: 16px;
    /*white-space: nowrap;*/
    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;
    color: #555;
}

label.checkbox input { display: none;}

label.checkbox span {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #0091DC;
    border-radius: 3px;
    content: ' ';
    vertical-align: bottom;
    margin-right: 6px;
    margin-left: -30px;
}

label.checkbox:hover span { border-color: #0091DC;}

label.checkbox input:checked + span {
    background-color: #0091DC;
    background-image: url(../svg/check.svg);
    background-position: center;
}

@media all and (max-width: 470px) {
    label.checkbox { display: block; }
}
/* checkbox END */

.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 */

/* mobile */
@media all and (max-width: 520px) {
    section.form {
        padding: 30px 20px 40px 20px;
/*        margin-top: 40px;
        background-color: #f8f8f8;
        border-top: 1px solid #d1d1d1;
        border-bottom: 1px solid #d1d1d1;*/
    }
}

/* desktop */
@media all and (min-width: 521px) {
    section.form {
        max-width: 350px;
        padding: 20px 40px;
        margin: 40px auto;
        background-color: #f8f8f8;
        border: 1px solid #d1d1d1;
        border-radius: 10px;
    }
}

/* retina display */
@media only screen and (-webkit-min-device-pixel-ratio: 1.5),
only screen and (-o-min-device-pixel-ratio: 3/2),
only screen and (min--moz-device-pixel-ratio: 1.5),
only screen and (min-device-pixel-ratio: 1.5) {
    input[type=text],
    input[type=email],
    input[type=tel],
    input[type=number],
    input[type=url],
    input[type=password],
    textarea,
    select {
        font-size: 18px;
        line-height: 28px;
        height: 38px;
    }

    button[type=submit],
    a.submit,
    a.cancel {
        font-size: 18px;
        line-height: 28px;
    }
}
