/* ===== GRAVITY FORMS - THEME STYLES
   Gravity Forms' own CSS is disabled (markup.php). Fields carry the theme's
   .form-row / .input-txt classes, so most styling comes from dist/css; this
   file only covers GF-specific structure. Plain CSS so it doesn't depend on
   each site's Sass build.
   ================================================================================ */

.ww-form .gform_fields {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    column-gap: 10px;
    margin: 0;
    padding: 0;
}

.ww-form .gfield {
    grid-column: span 12;
    min-width: 0;
    text-align: left;
}

@media (min-width: 640px) {
    .ww-form .gfield--width-half {
        grid-column: span 6;
    }
}

/* Expandable forms (theme JS animates max-height) - keep the grid from
   stretching the first row */
.ww-form .gform_fields.expandable-fields {
    align-content: start;
}

/* Hidden + honeypot fields */
.ww-form .gfield--type-hidden,
.ww-form .gform_hidden,
.ww-form .gform_validation_container,
.ww-form .ww-hide,
.gform_wrapper .gform_validation_container {
    display: none !important;
}

.ww-form .gfield_required {
    color: inherit;
}

.ww-form .ginput_container {
    position: relative;
}

/* Keep floating labels above the (positioned) input container. The main site's
   label styles already set z-index: 2; the landing page styles don't. */
.ww-form .gfield > .gfield_label {
    z-index: 2;
}

/* Section headings (survey / warranty / sash) */
.ww-form .gsection {
    margin: 20px 0 10px;
}

.ww-form .gsection_title {
    font-size: 20px;
    margin: 0;
}

/* Static labels: radios, checkboxes, selects with a question as their label */
.ww-form fieldset.gfield {
    border: 0;
    margin: 0 0 10px;
    padding: 0;
}

.ww-form .label-static .gfield_label,
.ww-form .label-static legend,
.ww-form fieldset.gfield legend {
    position: static;
    display: block;
    font: 500 14px/1.4 'Montserrat', Helvetica, Arial, sans-serif;
    margin-bottom: 8px;
    pointer-events: auto;
}

.ww-form .gchoice label,
.ww-form .gfield_checkbox label,
.ww-form .gfield_radio label {
    position: static;
    display: inline;
    pointer-events: auto;
    line-height: 1.4;
}

.ww-form .gfield_checkbox,
.ww-form .gfield_radio {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.ww-form .gchoice {
    display: flex;
    align-items: center;
    gap: 6px;
}

.ww-form .gfield--type-select .gfield_label {
    z-index: 3;
}

.ww-form .gfield_label .gfield_required_asterisk {
    margin-left: 0;
}

/* Hidden-label fields (consent / newsletter / sash type) */
.ww-form .hidden_label > .gfield_label,
.ww-form .hidden_label > legend {
    position: absolute !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
}

/* Validation */
.ww-form .gfield_error .input-txt,
.ww-form .gfield_error .selector span {
    border-color: #eb0000;
}

.ww-form .gfield_validation_message,
.ww-form .validation_message {
    color: #eb0000;
    font: 500 12px/1.1 'Montserrat', Helvetica, Arial, sans-serif;
    padding: 6px 2px 0;
}

.gform_wrapper .gform_validation_errors {
    color: #eb0000;
    font: 500 14px/1.3 'Montserrat', Helvetica, Arial, sans-serif;
    margin-bottom: 15px;
}

.gform_wrapper .gform_validation_errors h2 {
    font-size: 14px;
    margin: 0;
}

/* Submit row - same as the legacy .submit-row */
.ww-form .gform_footer,
.ww-form .gform_page_footer {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.ww-form .gform_footer button,
.ww-form .gform_page_footer button,
.ww-form .gform_page_footer input[type="button"],
.ww-form .gform_page_footer input[type="submit"] {
    width: 100%;
    min-width: auto !important;
    padding: 13px;
}

.ww-form .gform_ajax_spinner,
.ww-form .gform-loader {
    display: none;
}

/* Stepped LP: GF page steps in place of the legacy .steps-nav (same look) */
.ww-form .gf_page_steps {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 20px;
}

.ww-form .gf_step {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #999;
    font: 700 13px/1 'Montserrat', Helvetica, Arial, sans-serif;
    background: #eaedf1;
}

.ww-form .gf_step:not(:last-child) {
    margin-right: 25px;
}

.ww-form .gf_step:not(:last-child):after {
    content: "";
    position: absolute;
    top: 50%;
    right: -20px;
    width: 15px;
    height: 1px;
    background: #999;
}

.ww-form .gf_step_active {
    color: #fff;
    background: #999;
}

.ww-form .gf_step_label,
.ww-form .gf_step_clear {
    display: none;
}

/* Stepped LP: question labels + choices, as the legacy .label / .checkboxes / .radios */
.ww-form.ww-form-lp-stepped fieldset.gfield legend {
    color: #444;
    font: 700 14px/1.25 'Montserrat', Helvetica, Arial, sans-serif;
    text-align: left;
    padding: 5px;
    margin: 0 0 12px;
}

.ww-form.ww-form-lp-stepped .gfield_error legend {
    color: #eb0000;
    background: rgba(235, 0, 0, 0.1);
    border-radius: 4px;
}

.ww-form.ww-form-lp-stepped .gfield_checkbox,
.ww-form.ww-form-lp-stepped .gfield_radio {
    gap: 0 30px;
    padding-left: 5px;
}

.ww-form.ww-form-lp-stepped .gchoice {
    margin-bottom: 15px;
}

.ww-form.ww-form-lp-stepped .gchoice label {
    cursor: pointer;
    color: #444;
    font: 500 14px/1.25 'Montserrat', Helvetica, Arial, sans-serif;
}

@media screen and (min-width: 640px) {
    .ww-form.ww-form-lp-stepped .gfield--type-radio .gfield_radio {
        justify-content: space-between;
        flex-wrap: nowrap;
        gap: 0 10px;
    }
}

@media screen and (min-width: 960px) {
    .ww-form.ww-form-lp-stepped fieldset.gfield legend {
        font-size: 15px;
    }

    .ww-form.ww-form-lp-stepped .gchoice label {
        font-size: 16px;
    }
}

/* Legacy "Continue >" chevron */
.ww-form.ww-form-lp-stepped .gform_next_button:after {
    content: "";
    display: inline-block;
    width: 6px;
    height: 10px;
    margin: 0 0 -1px 10px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20.09 32'%3E%3Cpolygon fill='white' points='0 27.91 4.09 32 20.09 16 16 11.91 4.09 0 0 4.09 11.91 16 0 27.91'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* Confirmation text (if a form is ever set to a message instead of the theme redirect) */
.gform_confirmation_message {
    padding: 20px 0;
}
