/**
 * Gravity Forms overrides
 *
 * Undo the Gravity Forms theme styles on the theme's forms so the original
 * .form-wrap / .calc-contact styles (assets/scss/elements/_form.scss) show through.
 */

/* ---------- Consultation forms (.form-wrap) ---------- */

.form-wrap .gform_wrapper.gravity-theme {
    margin: 0;
    padding: 0;
}

.form-wrap .gform_wrapper.gravity-theme .gform_fields {
    display: block;
}

/* Matches the spacing of the original .form-group wrapper */
.form-wrap .gform_wrapper.gravity-theme .gform_body {
    margin-bottom: 12px;
}

.form-wrap .gform_wrapper.gravity-theme .gfield {
    margin: 0;
    padding: 0;
}

.form-wrap .gform_wrapper.gravity-theme .gfield_label {
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: 400;
    line-height: 16px;
    margin: 0 0 17px;
    padding: 0;
}

.form-wrap .gform_wrapper.gravity-theme .gfield_required {
    color: inherit;
    font-size: inherit;
    margin: 0;
    padding: 0;
}

.form-wrap .gform_wrapper.gravity-theme .gfield input.form-input,
.form-wrap .gform_wrapper.gravity-theme .gfield textarea.form-input {
    display: block;
    width: 100%;
    height: 50px;
    min-height: 0 !important;
    margin: 0 0 28px;
    padding: 1px 15px;
    border: 0;
    border-radius: 0;
    background-color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5);
    color: #000000;
    font-family: sans-serif;
    font-size: 16px;
    line-height: 1 !important;
}

.form-wrap .gform_wrapper.gravity-theme .gfield textarea.form-input {
    display: inline-block;
    height: 90px;
    padding-top: 15px;
    line-height: 1.15 !important;
    resize: vertical;
}

.form-wrap .gform_wrapper.gravity-theme .gfield .form-input::placeholder {
    color: #9a9b9b;
}

.form-wrap .gform_wrapper.gravity-theme .gform_footer {
    display: block;
    margin: 0;
    padding: 0;
}

.form-wrap .gform_wrapper.gravity-theme .gform_footer .button-wrap .btn {
    margin: 0;
}

/*
 * Style the submit button directly as well, since Gravity Forms 3.x outputs
 * its own <button> and may skip the gform_submit_button markup filter.
 * Mirrors .btn + .btn-std + .form-wrap .button-wrap .btn.
 */
.form-wrap .gform_wrapper.gravity-theme .gform_footer .gform_button {
    display: inline-block;
    width: 100%;
    margin: 0;
    padding: 29px 0 23px;
    border: 0;
    border-radius: 100px;
    background-color: #ffffff;
    box-shadow: none;
    color: #007ea7;
    cursor: pointer;
    font-family: sans-serif;
    font-size: 18px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    text-transform: uppercase;
}

.main-form .form-wrap .gform_wrapper.gravity-theme .gform_footer .gform_button {
    padding: 28px 0 24px;
    font-size: 20px;
}

.form-wrap .gform_wrapper.gravity-theme .gform_footer .gform_button:hover {
    color: #007ea7 !important;
    background-color: #eaf6ff;
}

@media (max-width: 1199px) {
    .form-wrap .gform_wrapper.gravity-theme .gfield_label {
        margin-bottom: 12px;
    }

    .form-wrap .gform_wrapper.gravity-theme .gfield input.form-input,
    .form-wrap .gform_wrapper.gravity-theme .gfield textarea.form-input {
        margin-bottom: 17px;
    }
}

@media (max-width: 767px) {
    .form-wrap .gform_wrapper.gravity-theme .gfield input.form-input,
    .form-wrap .gform_wrapper.gravity-theme .gfield textarea.form-input {
        margin-bottom: 25px;
    }
}

/* Validation */

.form-wrap .gform_wrapper.gravity-theme .gform_validation_errors {
    margin: 0 0 20px;
    padding: 12px 15px;
    border: 0;
    border-radius: 0;
    background: #ffffff;
    box-shadow: none;
}

.form-wrap .gform_wrapper.gravity-theme .gform_validation_errors > h2 {
    color: #c02b0a;
    font-size: 15px;
    margin: 0;
}

.form-wrap .gform_wrapper.gravity-theme .gform_validation_errors > h2 .gform-icon {
    display: none;
}

.form-wrap .gform_wrapper.gravity-theme .gfield_error .gfield_label {
    color: #ffffff;
}

.form-wrap .gform_wrapper.gravity-theme .gfield_error input.form-input,
.form-wrap .gform_wrapper.gravity-theme .gfield_error textarea.form-input {
    border: 0;
    box-shadow: inset 0 0 0 2px #ffdd57, inset 0 1px 3px rgba(0, 0, 0, 0.5);
    margin-bottom: 6px;
}

.form-wrap .gform_wrapper.gravity-theme .gfield_validation_message {
    margin: 0 0 20px;
    padding: 0;
    border: 0;
    background: none;
    color: #ffdd57;
    font-size: 14px;
}

/* ---------- Calculator contact form (.calc-contact) ---------- */

.calc-contact .gform_wrapper.gravity-theme {
    margin: 0;
}

.calc-contact .gform_wrapper.gravity-theme .gform_fields {
    grid-column-gap: 0;
    grid-row-gap: 0;
}

.calc-contact .gform_wrapper.gravity-theme .gfield {
    padding: 0 15px;
}

.calc-contact .gform_wrapper.gravity-theme .gfield input[type="text"],
.calc-contact .gform_wrapper.gravity-theme .gfield input[type="email"] {
    position: inherit;
    display: block;
    width: 300px;
    max-width: 100%;
    min-height: 0;
    margin: 5px 20px 30px;
    padding: 14px 14px 11px;
    border: none;
    border-radius: 0;
    font-family: sans-serif;
    font-size: 14px;
    line-height: normal;
}

.calc-contact .gform_wrapper.gravity-theme .gfield--type-text input[type="text"] {
    margin-left: auto;
}

.calc-contact .gform_wrapper.gravity-theme .gform_required_legend {
    display: none;
}

.calc-contact .gform_wrapper.gravity-theme .gform_footer .gform_button {
    display: inline-block;
    margin: 0;
    padding: 15px 47px;
    border: 0;
    border-radius: 100px;
    background-color: #007ea7;
    box-shadow: none;
    color: #ffffff;
    cursor: pointer;
    font-family: sans-serif;
    font-size: 16px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    text-transform: uppercase;
}

.calc-contact .gform_wrapper.gravity-theme .gform_footer .gform_button:hover {
    color: #ffffff;
    background-color: #078fbb;
}

.calc-contact .gform_wrapper.gravity-theme .gform_footer {
    justify-content: center;
    margin: 0;
    padding: 0 0 24px;
}

.calc-contact .gform_wrapper.gravity-theme .gfield_validation_message {
    width: 300px;
    margin: -25px 20px 15px;
    padding: 0;
    border: 0;
    background: none;
}

.calc-contact .gform_wrapper.gravity-theme .gfield--type-text .gfield_validation_message {
    margin-left: auto;
}

@media (max-width: 991px) {
    .calc-contact .gform_wrapper.gravity-theme .gfield {
        grid-column: span 12;
    }

    .calc-contact .gform_wrapper.gravity-theme .gfield input[type="text"],
    .calc-contact .gform_wrapper.gravity-theme .gfield input[type="email"],
    .calc-contact .gform_wrapper.gravity-theme .gfield .gfield_validation_message {
        margin: 5px auto 20px;
    }
}

.calc-contact .calculator-contact-submit {
    width: auto;
    text-align: center;
}
