form.contacts {
    max-width: 960px;
    margin: 0 auto;
    padding: 0 30px 60px 30px;
}

form.contacts h1 {
    margin-top: 0;
}

form.contacts input,
form.contacts textarea {
    width: 100%;
}

form legend {
    padding: 8px 0 8px 2px;
    color: var(--text);
}

form legend.required::after {
    content: ' *';
    color: var(--red);
}

form input[type=text], /* will only select text fields */
form input[type=email], /* will only select email fields */
form input[type=password], /* will only select password fields */
form textarea,
form select {
    font-family: "Open Sans", sans-serif;
    font-size: 16px;

    margin: 0;
    padding: 6px 10px;
    line-height: 25px;

    border: 1px solid var(--border);
    border-radius: 0;
    background-color: var(--white);
    color: #000;

    box-sizing: border-box;

    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

form textarea {
    height: 120px;
    min-height: 120px;
    resize: vertical;
}

/* remove dropdown arrow on IE from select */
form select::-ms-expand { display: none; }

/* TODO: replace down.svg with ::after -> see label.checkbox */
/* INFO: https://stackoverflow.com/questions/3532649/problem-with-select-and-after-with-css-in-webkit; */
form select {
    background-image: url(../svg/form/down.svg);
    background-size: 28px 28px;
    background-repeat: no-repeat;
    background-position: right center;
    padding: 4px 30px 4px 6px;
}
/* <-- */

form button[type=submit] {
    padding: 15px 40px;
    background-color: var(--beige);
    color: var(--white);
    transition: background-color .3s;
    text-transform: uppercase;
    letter-spacing: 3px;

    border: none;
    font-size: 15px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

form button[type=submit]:hover {
    background-color: var(--dgray);
}

form .w100 input,
form .w100 textarea,
form .w100 select,
form .w100 button,
form .w100 {
    width: 100%;
    box-sizing: border-box;
}

/* Checkbox */
label.checkbox {
    line-height: 19px;
    /*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;
}

label.checkbox input { display: none;}

label.checkbox span {
    display: inline-block;
    width: 18px;
    height: 18px;
    background-color: var(--white);
    border: 1px solid var(--border);
    /*border-radius: 3px;*/
    content: ' ';
    vertical-align: bottom;
    margin-right: 6px;
    margin-left: -30px;
}

label.checkbox:hover span { border-color: var(--beige);}

label.checkbox input:checked + span {
    position: relative;
    background-color: var(--beige);
    border-color: var(--beige);
}

label.checkbox input:checked + span::before {
    position: absolute;
    display: block;
    content: ' ';
    border-bottom: 2px solid var(--white);
    border-right: 2px solid var(--white);
    width: 4px;
    height: 8px;
    top: 3px;
    left: 6px;
    transform: rotate(45deg);
}
/* <<< */

/* LOADER */
form.disabled { position: relative; }

/*form .mgLoader { display: none; } ???*/

form.disabled .mgLoader {
    position: absolute;
    inset: 0;
    background-color: #f8f8f899; /* INFO: body background-color + alpha 99 */

    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;

    opacity: 0;
    transition: opacity 0.5s ease;
}

.mgLoader .circular {
    animation: loaderRotate 2s linear infinite;
    height: 48px;
    position: relative;
    width: 48px;
}

.mgLoader .path {
    stroke-dasharray: 1,200;
    stroke-dashoffset: 0;
    animation: loaderDash 1.5s ease-in-out infinite;
    stroke-linecap: round;
    stroke: var(--beige);
}

@keyframes loaderRotate {
    100%{ transform: rotate(360deg); }
}

@keyframes loaderDash {
    0%{
        stroke-dasharray: 1,200;
        stroke-dashoffset: 0;
    }
    50%{
        stroke-dasharray: 89,200;
        stroke-dashoffset: -35;
    }
    100%{
        stroke-dasharray: 89,200;
        stroke-dashoffset: -124;
    }
}
/* <<<<<< */

/* formerror */
.xErrorTooltip {
    position: absolute;
    max-width: 520px;
    padding: 7px 20px 7px 10px;
    text-align: left;
    border-radius: 4px;
    color: var(--white);
    background-color: var(--beige);
    box-shadow: 1px 1px 3px 0 rgba(0, 0 ,0, 0.35);
    margin-top: 3px;
    z-index: 1;
}

/* INFO: top left arrow */
.xErrorTooltip: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: var(--beige);
    border-width: 7px;
    margin-left: -7px;
}
/* <<<<<< */

/*SUCCESS START*/
svg.success path:first-child {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: success-dash 5s linear forwards;
}

svg.success path:last-child {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: success-dash 5s linear forwards;
    animation-delay: .5s;
}

@keyframes success-dash {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}
/*SUCCESS END*/

/*FAIL START*/
svg.failed path:first-child {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: failed-dash 5s linear forwards;
}

svg.failed path:nth-child(2) {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: failed-dash 5s linear forwards;
    animation-delay: .4s;
}

svg.failed path:last-child {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: failed-dash 5s linear forwards;
    animation-delay: .6s;
}

@keyframes failed-dash {
    from {
        stroke-dashoffset: 1000;
    }
    to {
        stroke-dashoffset: 0;
    }
}
/*FAIL END*/

form.dates input[type="text"].mgDate {
    max-height: 38px;
    padding: 10px;
}