/**
 * Avanti Contact Form Design v1.1
 * Compact 3-step wizard for Gravity Form ID 1 only.
 */

:root {
    --acfd-blue: #144fc6;
    --acfd-blue-dark: #0d3fa9;
    --acfd-navy: #17345c;
    --acfd-text: #26364c;
    --acfd-muted: #6f7e91;
    --acfd-border: #cfd8e4;
    --acfd-input: #f8fafc;
    --acfd-soft-blue: #f3f7ff;
    --acfd-error: #c92a2a;
}

body #gform_wrapper_1,
body #gform_wrapper_1 *,
body #gform_wrapper_1 *::before,
body #gform_wrapper_1 *::after {
    box-sizing: border-box;
}

/* Keep the host page/card as the main visual container. */
body #gform_wrapper_1.gform_wrapper {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    color: var(--acfd-text);
    font-family: inherit;
}

body #gform_wrapper_1 .gform_title,
body #gform_wrapper_1 .gform_description {
    margin-top: 0;
}

body #gform_wrapper_1 .gform_required_legend {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

/* ---------- Compact wizard header ---------- */
body #gform_wrapper_1 .acfd-wizard-head {
    margin: 0 0 18px;
    outline: none;
}

body #gform_wrapper_1 .acfd-wizard-status {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

body #gform_wrapper_1 .acfd-step-count {
    color: var(--acfd-muted);
    font-size: 11px;
    line-height: 1.2;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
}

body #gform_wrapper_1 .acfd-step-title {
    color: var(--acfd-navy);
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
}

body #gform_wrapper_1 .acfd-progress {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
}

body #gform_wrapper_1 .acfd-progress-segment {
    height: 4px;
    border-radius: 999px;
    background: #dfe6ef;
    transition: background-color 160ms ease;
}

body #gform_wrapper_1 .acfd-progress-segment.is-active {
    background: var(--acfd-blue);
}

body #gform_wrapper_1 .acfd-progress-labels {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 6px;
    color: #8995a5;
    font-size: 9px;
    line-height: 1.2;
    font-weight: 650;
}

body #gform_wrapper_1 .acfd-progress-labels span:nth-child(2) { text-align: center; }
body #gform_wrapper_1 .acfd-progress-labels span:nth-child(3) { text-align: right; }

/* ---------- Step visibility ---------- */
body #gform_wrapper_1.acfd-wizard-enabled .acfd-wizard-field:not(.is-acfd-active) {
    display: none !important;
}

/* Active fields keep their native Gravity Forms display value so conditional logic
   (including the CAPTCHA field) continues to decide whether they are visible. */

body #gform_wrapper_1.acfd-current-1 .gform_footer,
body #gform_wrapper_1.acfd-current-2 .gform_footer,
body #gform_wrapper_1.acfd-current-1 .gform-page-footer,
body #gform_wrapper_1.acfd-current-2 .gform-page-footer {
    display: none !important;
}

/* ---------- Form rhythm ---------- */
body #gform_wrapper_1 .gform_fields {
    row-gap: 14px !important;
    column-gap: 12px !important;
}

body #gform_wrapper_1 .gfield {
    min-width: 0;
    margin: 0;
}

body #gform_wrapper_1 .gfield_label,
body #gform_wrapper_1 .gform-field-label,
body #gform_wrapper_1 legend.gfield_label {
    display: inline-block;
    margin: 0 0 6px;
    color: var(--acfd-navy);
    font-size: 12px;
    line-height: 1.3;
    font-weight: 750;
}

body #gform_wrapper_1 .gfield_required,
body #gform_wrapper_1 .gfield_required_asterisk {
    color: #df3e37;
}

body #gform_wrapper_1 .gfield_description,
body #gform_wrapper_1 .ginput_complex label,
body #gform_wrapper_1 .gform-field-label--type-sub {
    color: var(--acfd-muted);
    font-size: 10px;
    line-height: 1.25;
    font-weight: 550;
}

body #gform_wrapper_1 .ginput_complex {
    gap: 9px 10px;
}

/* ---------- Inputs ---------- */
body #gform_wrapper_1 input[type="text"],
body #gform_wrapper_1 input[type="email"],
body #gform_wrapper_1 input[type="tel"],
body #gform_wrapper_1 input[type="number"],
body #gform_wrapper_1 input[type="url"],
body #gform_wrapper_1 input[type="password"],
body #gform_wrapper_1 select,
body #gform_wrapper_1 textarea {
    width: 100%;
    max-width: 100%;
    margin: 0;
    border: 1px solid var(--acfd-border);
    border-radius: 8px;
    background: var(--acfd-input);
    color: var(--acfd-text);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.35;
    outline: none;
    box-shadow: 0 1px 2px rgba(15, 39, 72, .035) inset;
    transition: border-color 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

body #gform_wrapper_1 input[type="text"],
body #gform_wrapper_1 input[type="email"],
body #gform_wrapper_1 input[type="tel"],
body #gform_wrapper_1 input[type="number"],
body #gform_wrapper_1 input[type="url"],
body #gform_wrapper_1 input[type="password"],
body #gform_wrapper_1 select {
    min-height: 42px;
    padding: 8px 10px;
}

body #gform_wrapper_1 textarea {
    min-height: 96px;
    height: 96px;
    padding: 10px 11px;
    resize: vertical;
}

body #gform_wrapper_1 input:focus,
body #gform_wrapper_1 select:focus,
body #gform_wrapper_1 textarea:focus {
    border-color: var(--acfd-blue);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(20, 79, 198, .11);
}

/* First / last stay side-by-side on desktop. */
body #gform_wrapper_1 #input_1_1 {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px !important;
}

body #gform_wrapper_1 #input_1_1 > span {
    width: auto !important;
    margin: 0 !important;
    padding: 0 !important;
}

/* Compact the address into street + three columns. */
body #gform_wrapper_1 #input_1_6 {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px !important;
}

body #gform_wrapper_1 #input_1_6 > span {
    width: auto !important;
    min-width: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

body #gform_wrapper_1 #input_1_6 .ginput_address_line_1,
body #gform_wrapper_1 #input_1_6 .address_line_1 {
    grid-column: 1 / -1;
}

body #gform_wrapper_1 #input_1_6 .ginput_address_city,
body #gform_wrapper_1 #input_1_6 .address_city,
body #gform_wrapper_1 #input_1_6 .ginput_address_state,
body #gform_wrapper_1 #input_1_6 .address_state,
body #gform_wrapper_1 #input_1_6 .ginput_address_zip,
body #gform_wrapper_1 #input_1_6 .address_zip {
    grid-column: span 2;
}

body #gform_wrapper_1 .ginput_complex span > label,
body #gform_wrapper_1 .ginput_address span > label {
    display: block;
    margin-top: 4px;
}

/* ---------- Verification ---------- */
body #gform_wrapper_1 #field_1_7 {
    margin-top: 2px;
    padding: 11px 12px 12px;
    border: 1px solid #dbe5f3;
    border-radius: 9px;
    background: var(--acfd-soft-blue);
}

body #gform_wrapper_1 #field_1_7 .gfield_label,
body #gform_wrapper_1 #field_1_7 .gform-field-label {
    margin-bottom: 6px;
    font-size: 11px;
}

body #gform_wrapper_1 #field_1_7 input {
    background: #fff;
}

/* ---------- Navigation ---------- */
body #gform_wrapper_1 .acfd-wizard-nav,
body #gform_wrapper_1 .gform_footer,
body #gform_wrapper_1 .gform-page-footer {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 18px 0 0;
    padding: 0;
}

body #gform_wrapper_1 .acfd-nav-button,
body #gform_wrapper_1 input[type="submit"],
body #gform_wrapper_1 button[type="submit"],
body #gform_wrapper_1 .gform_button {
    min-height: 44px;
    margin: 0 !important;
    padding: 10px 16px !important;
    border-radius: 8px !important;
    font-family: inherit !important;
    font-size: 13px !important;
    line-height: 1.2 !important;
    font-weight: 800 !important;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease !important;
}

body #gform_wrapper_1 .acfd-next,
body #gform_wrapper_1 input[type="submit"],
body #gform_wrapper_1 button[type="submit"],
body #gform_wrapper_1 .gform_button {
    flex: 1 1 auto;
    border: 1px solid var(--acfd-blue) !important;
    background: var(--acfd-blue) !important;
    color: #fff !important;
    box-shadow: 0 7px 16px rgba(20, 79, 198, .20);
}

body #gform_wrapper_1 .acfd-next:hover,
body #gform_wrapper_1 input[type="submit"]:hover,
body #gform_wrapper_1 button[type="submit"]:hover,
body #gform_wrapper_1 .gform_button:hover {
    border-color: var(--acfd-blue-dark) !important;
    background: var(--acfd-blue-dark) !important;
    transform: translateY(-1px);
}

body #gform_wrapper_1 .acfd-back {
    flex: 0 0 auto;
    border: 1px solid #d8e0ea;
    background: #fff;
    color: var(--acfd-navy);
    box-shadow: none;
}

body #gform_wrapper_1 .acfd-back:hover {
    background: #f5f7fa;
    border-color: #c3cedc;
}

body #gform_wrapper_1 .acfd-nav-button[hidden] {
    display: none !important;
}

/* On the final step, the native Gravity Forms submit footer becomes the primary action. */
body #gform_wrapper_1.acfd-current-3 .acfd-wizard-nav {
    margin-bottom: 0;
}

body #gform_wrapper_1.acfd-current-3 .gform_footer,
body #gform_wrapper_1.acfd-current-3 .gform-page-footer {
    margin-top: 10px;
}

/* ---------- Validation ---------- */
body #gform_wrapper_1 .gform_validation_errors {
    margin: 0 0 14px;
    padding: 11px 12px;
    border: 1px solid rgba(201, 42, 42, .22);
    border-left: 4px solid var(--acfd-error);
    border-radius: 8px;
    background: #fff7f7;
    box-shadow: none;
}

body #gform_wrapper_1 .gform_validation_errors > h2,
body #gform_wrapper_1 .gform_validation_errors .gform_submission_error {
    margin: 0;
    color: #8f1f1f;
    font-size: 12px;
    line-height: 1.4;
    font-weight: 750;
}

body #gform_wrapper_1 .gfield_error input,
body #gform_wrapper_1 .gfield_error select,
body #gform_wrapper_1 .gfield_error textarea,
body #gform_wrapper_1 .acfd-client-error input,
body #gform_wrapper_1 .acfd-client-error select,
body #gform_wrapper_1 .acfd-client-error textarea {
    border-color: rgba(201, 42, 42, .70) !important;
    box-shadow: 0 0 0 3px rgba(201, 42, 42, .07);
}

body #gform_wrapper_1 .validation_message,
body #gform_wrapper_1 .gfield_validation_message,
body #gform_wrapper_1 .acfd-inline-error {
    margin: 5px 0 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--acfd-error);
    font-size: 10px;
    line-height: 1.35;
    font-weight: 700;
}

/* ---------- Confirmation ---------- */
body #gform_confirmation_wrapper_1,
body #gform_confirmation_message_1 {
    padding: 20px 22px;
    border: 1px solid rgba(20, 79, 198, .14);
    border-radius: 12px;
    background: #fff;
    color: var(--acfd-text);
    box-shadow: 0 14px 36px rgba(4, 31, 72, .12);
    font-family: inherit;
    font-size: 14px;
    line-height: 1.5;
}

body #gform_wrapper_1 .gform_ajax_spinner {
    margin: 8px auto 0;
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
    body #gform_wrapper_1 .acfd-wizard-head {
        margin-bottom: 15px;
    }

    body #gform_wrapper_1 .gform_fields {
        row-gap: 12px !important;
    }

    body #gform_wrapper_1 .gfield,
    body #gform_wrapper_1 .gfield--width-half,
    body #gform_wrapper_1 .gfield--width-third,
    body #gform_wrapper_1 .gfield--width-quarter,
    body #gform_wrapper_1 .gfield--width-five-twelfths,
    body #gform_wrapper_1 .gfield--width-seven-twelfths {
        grid-column: 1 / -1 !important;
    }

    body #gform_wrapper_1 #input_1_1,
    body #gform_wrapper_1 #input_1_6 {
        grid-template-columns: 1fr !important;
        gap: 9px !important;
    }

    body #gform_wrapper_1 #input_1_6 > span,
    body #gform_wrapper_1 #input_1_6 .ginput_address_line_1,
    body #gform_wrapper_1 #input_1_6 .address_line_1,
    body #gform_wrapper_1 #input_1_6 .ginput_address_city,
    body #gform_wrapper_1 #input_1_6 .address_city,
    body #gform_wrapper_1 #input_1_6 .ginput_address_state,
    body #gform_wrapper_1 #input_1_6 .address_state,
    body #gform_wrapper_1 #input_1_6 .ginput_address_zip,
    body #gform_wrapper_1 #input_1_6 .address_zip {
        grid-column: 1 / -1 !important;
    }

    body #gform_wrapper_1 input[type="text"],
    body #gform_wrapper_1 input[type="email"],
    body #gform_wrapper_1 input[type="tel"],
    body #gform_wrapper_1 input[type="number"],
    body #gform_wrapper_1 input[type="url"],
    body #gform_wrapper_1 input[type="password"],
    body #gform_wrapper_1 select,
    body #gform_wrapper_1 textarea {
        font-size: 16px;
    }

    body #gform_wrapper_1 textarea {
        min-height: 92px;
        height: 92px;
    }

    body #gform_wrapper_1 .acfd-wizard-nav,
    body #gform_wrapper_1 .gform_footer,
    body #gform_wrapper_1 .gform-page-footer {
        margin-top: 15px;
    }

    body #gform_wrapper_1 .acfd-back {
        min-width: 88px;
    }
}

@media (prefers-reduced-motion: reduce) {
    body #gform_wrapper_1 *,
    body #gform_wrapper_1 *::before,
    body #gform_wrapper_1 *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}
