.bf-wrap {
    --bf-primary: #ff6b3d;
    --bf-button: #ff6b3d;
    --bf-button-text: #ffffff;
    --bf-heading: #090d32;
    --bf-surface: #edf3f8;
    max-width: 820px;
    margin: 0 auto;
    color: #172033;
    font-size: 16px;
}

.bf-form {
    display: grid;
    gap: 24px;
}

.bf-wrap [hidden] {
    display: none !important;
}

.bf-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
}

.bf-step,
.bf-message {
    background: #fff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    padding: 24px;
}

.bf-compact-form .bf-step {
    padding: 18px;
}

.bf-compact-form .bf-step-heading h2 {
    font-size: 28px;
    line-height: 1.1;
    margin-bottom: 10px;
}

.bf-form-heading {
    border-bottom: 1px solid #e7edf3;
    margin-bottom: 22px;
    padding-bottom: 16px;
}

.bf-form-heading h2 {
    letter-spacing: -0.025em;
    margin-bottom: 0;
}

.bf-compact-form .bf-form-heading h2 {
    margin-bottom: 0;
}

.bf-form-subtitle {
    color: #596579;
    font-size: 15px;
    line-height: 1.5;
    margin: 6px 0 0;
    max-width: 620px;
}

.bf-page-progress {
    align-items: center;
    display: flex;
    gap: 8px;
    justify-content: center;
    position: static;
}

.bf-page-dot {
    background: #d8e0e8;
    border-radius: 999px;
    height: 8px;
    transition: background-color 160ms ease, transform 160ms ease;
    width: 8px;
}

.bf-page-dot.is-active {
    background: var(--bf-primary);
    transform: scale(1.35);
}

.bf-page-heading {
    grid-column: 1 / -1;
    margin: 0 auto 24px;
    max-width: 680px;
    padding: 0 12px;
    text-align: center;
}

.bf-page-title {
    color: var(--bf-heading);
    font-size: 22px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.25;
    margin: 0 0 5px;
}

.bf-page-introduction {
    color: #596579;
    font-size: 15px;
    line-height: 1.5;
    margin: 0;
}

.bf-page-actions {
    align-items: center;
    display: flex;
    gap: 12px;
    grid-column: 1 / -1;
    justify-content: center;
    margin-top: 10px;
    position: relative;
}

.bf-page-back,
.bf-page-next {
    border: 1px solid #c6d2e0;
    border-radius: 6px;
    cursor: pointer;
    font: inherit;
    min-height: 44px;
    padding: 10px 18px;
}

.bf-page-back { background: #fff; color: #27344b; }
.bf-page-back:disabled { background: #f4f7fa; border-color: #e0e7ef; color: #94a3b8; cursor: default; }
.bf-page-next { background: var(--bf-button); border-color: var(--bf-button); color: var(--bf-button-text); }

.bf-page-actions .bf-submit-row { margin: 0; }
.bf-page-actions .bf-submit { min-height: 44px; }

.bf-page-final-content {
    align-items: center;
    display: flex;
    gap: 12px;
    margin-left: 0;
}

.bf-page-final-content .bf-consent { margin: 0; }

.bf-compact-form .bf-field {
    margin-bottom: 12px;
}

.bf-wrap .bf-compact-form input,
.bf-wrap .bf-compact-form select,
.bf-wrap .bf-compact-form textarea {
    min-height: 42px;
}

.bf-compact-form .bf-submit {
    min-height: 44px;
    padding: 10px 18px;
}

.bf-step-heading h2,
.bf-wrap h3 {
    color: var(--bf-heading);
    margin: 0 0 12px;
}

.bf-form-heading h2,
.bf-wrap .bf-page-title {
    margin: 0;
}

.bf-wrap .bf-page-title + .bf-page-introduction {
    margin-top: 5px;
}

.bf-row {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bf-field {
    align-content: start;
    align-self: start;
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.bf-basic-form .bf-step {
    display: grid;
    gap: 0 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bf-basic-form .bf-step-heading,
.bf-basic-form .bf-field-full,
.bf-basic-form .bf-consent,
.bf-basic-form .bf-submit,
.bf-basic-form .bf-submit-row,
.bf-basic-form .bf-section-break {
    grid-column: 1 / -1;
}

.bf-basic-form .bf-field-half {
    grid-column: span 1;
}

/*
 * Field width is an authoring choice. Some WordPress themes apply broad grid,
 * max-width, or select rules that can otherwise make a saved full-width field
 * appear as a half-width control. Keep the public layout authoritative for
 * every field type, including controls rendered inside conditional groups.
 */
.bf-basic-form .bf-field[data-bf-field-width="full"] {
    grid-column: 1 / -1 !important;
    min-width: 0;
    width: 100% !important;
}

.bf-basic-form .bf-field[data-bf-field-width="half"] {
    grid-column: span 1 !important;
    min-width: 0;
    width: auto !important;
}

.bf-basic-form .bf-field[data-bf-field-width="full"] > select,
.bf-basic-form .bf-field[data-bf-field-width="full"] > textarea,
.bf-basic-form .bf-field[data-bf-field-width="full"] > input:not([type="checkbox"]):not([type="radio"]),
.bf-basic-form .bf-field[data-bf-field-width="full"] > .bf-input-affix,
.bf-basic-form .bf-field[data-bf-field-width="full"] > .bf-choice-list,
.bf-basic-form .bf-field[data-bf-field-width="full"] > .bf-name-grid {
    max-width: none !important;
    width: 100% !important;
}

.bf-upload-dropzone {
    align-items: center;
    background: #f8fbff;
    border: 2px dashed #9dbdff;
    border-radius: 12px;
    color: var(--bf-heading);
    cursor: pointer;
    display: grid;
    gap: 6px;
    justify-items: center;
    min-height: 132px;
    overflow: hidden;
    padding: 16px;
    position: relative;
    text-align: center;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.bf-upload-dropzone:hover,
.bf-upload-dropzone:focus-within,
.bf-upload-dropzone.is-dragging {
    background: #edf4ff;
    border-color: var(--bf-primary);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--bf-primary) 14%, transparent);
}

.bf-upload-dropzone.is-dragging { transform: translateY(-1px); }

.bf-upload-input {
    cursor: pointer;
    inset: 0;
    opacity: 0;
    position: absolute;
    z-index: 1;
}

.bf-upload-dropzone-icon {
    align-items: center;
    background: #e8f0ff;
    border-radius: 14px;
    color: #2563eb;
    display: inline-flex;
    font-size: 24px;
    font-weight: 700;
    height: 46px;
    justify-content: center;
    line-height: 1;
    width: 46px;
}

.bf-upload-dropzone strong { font-size: 16px; line-height: 1.3; }
.bf-upload-dropzone small { color: #5d6c84; font-size: 13px; line-height: 1.45; max-width: 420px; }

.bf-consent,
.bf-checkbox-field,
.bf-check-grid label {
    align-items: flex-start;
    display: flex;
    gap: 8px;
}

.bf-consent {
    margin-bottom: 10px;
}

.bf-consent input[type="checkbox"],
.bf-checkbox-field input[type="checkbox"],
.bf-check-grid input[type="checkbox"],
.bf-choice-list input[type="checkbox"],
.bf-choice-list input[type="radio"] {
    accent-color: var(--bf-primary);
    appearance: auto;
    box-sizing: border-box;
    flex: 0 0 auto;
    height: 18px !important;
    margin: 0;
    max-height: 18px;
    max-width: 18px;
    min-height: 18px !important;
    min-width: 18px;
    padding: 0;
    width: 18px !important;
}

.bf-check-grid {
    display: grid;
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bf-choice-list {
    display: grid;
    gap: 8px;
}

.bf-choice-list label {
    align-items: center;
    background: #fff;
    border: 1px solid transparent;
    border-radius: 6px;
    box-sizing: border-box;
    cursor: pointer;
    display: flex;
    gap: 8px;
    line-height: 1.4;
    min-height: 42px;
    padding: 8px 10px;
    transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.bf-choice-list label:hover {
    background: #f8fafc;
    border-color: #c9d3df;
}

.bf-choice-list label:has(input:checked) {
    background: color-mix(in srgb, var(--bf-primary), #fff 94%);
    border-color: var(--bf-primary);
    box-shadow: 0 0 0 2px color-mix(in srgb, var(--bf-primary), transparent 84%);
}

.bf-choice-list label:has(input:focus-visible) {
    outline: 2px solid var(--bf-primary);
    outline-offset: 2px;
}

.bf-choice-inline {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
}

.bf-choice-columns {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bf-choice-presentation {
    gap: 12px;
}

.bf-choice-presentation.bf-choice-stacked {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bf-choice-presentation label {
    align-items: center;
    border-color: #d8e0e8;
    font-size: 17px;
    min-height: 76px;
    padding: 14px 16px;
}

.bf-choice-presentation label:hover {
    border-color: color-mix(in srgb, var(--bf-primary), #fff 50%);
}

.bf-name-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(12, minmax(0, 1fr));
}

.bf-address-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
}

.bf-address-grid label {
    display: grid;
    gap: 7px;
    color: var(--bf-heading);
    font-weight: 600;
}

.bf-address-line_1,
.bf-address-line_2 { grid-column: 1 / -1; }
.bf-address-city,
.bf-address-state,
.bf-address-postal { grid-column: span 2; }
.bf-address-country { grid-column: span 3; }

@media (max-width: 640px) {
    .bf-address-grid { grid-template-columns: 1fr; }
    .bf-address-grid label { grid-column: 1 / -1; }
}

.bf-name-count-1 .bf-name-width-auto,
.bf-name-width-full {
    grid-column: span 12;
}

.bf-name-count-2 .bf-name-width-auto,
.bf-name-width-half {
    grid-column: span 6;
}

.bf-name-count-3 .bf-name-width-auto,
.bf-name-width-third {
    grid-column: span 4;
}

.bf-name-grid label {
    display: grid;
    gap: 5px;
}

.bf-name-grid span,
.bf-field-help {
    color: #596579;
    font-size: 13px;
}

.bf-field-help {
    margin: 0;
}

.bf-field-counter {
    color: #596579;
    font-size: 12px;
    justify-self: end;
}

.bf-textarea-affix {
    align-items: flex-start;
}

.bf-textarea-affix textarea {
    flex: 1 1 auto;
    min-width: 0;
}

.bf-choice-select-all {
    border-bottom: 1px solid #d7dee8;
    font-weight: 700;
    padding-bottom: 8px;
}

.bf-choice-other input[type="text"]:disabled {
    opacity: 0.6;
}

.bf-label-left,
.bf-label-right {
    align-items: start;
    grid-template-columns: minmax(120px, 0.35fr) minmax(0, 1fr);
}

.bf-label-left > label,
.bf-label-left > [id$="-label"] {
    grid-column: 1;
}

.bf-label-left > :not(label):not([id$="-label"]):not(.bf-field-help) {
    grid-column: 2;
}

.bf-label-right > label,
.bf-label-right > [id$="-label"] {
    grid-column: 2;
}

.bf-label-right > :not(label):not([id$="-label"]):not(.bf-field-help) {
    grid-column: 1;
    grid-row: 1;
}

.bf-label-left > .bf-field-help,
.bf-label-right > .bf-field-help {
    grid-column: 1 / -1;
}

.bf-choice-other {
    flex-wrap: wrap;
}

.bf-choice-other input[type="text"] {
    min-height: 38px;
}

.bf-input-affix {
    align-items: stretch;
    display: flex;
}

.bf-input-affix > span {
    align-items: center;
    background: var(--bf-surface);
    border: 1px solid #d8e0e8;
    display: flex;
    padding: 0 10px;
}

.bf-input-affix > span:first-child {
    border-radius: 8px 0 0 8px;
    border-right: 0;
}

.bf-input-affix > input:not(:first-child) {
    border-radius: 0 8px 8px 0;
}

.bf-input-affix > input:not(:last-child) {
    border-radius: 8px 0 0 8px;
}

.bf-input-affix > input:not(:first-child):not(:last-child) {
    border-radius: 0;
}

.bf-input-affix > span:last-child {
    border-left: 0;
    border-radius: 0 8px 8px 0;
}

.bf-section-break {
    border-top: 1px solid #d8e0e8;
    margin-top: 8px;
    padding-top: 18px;
}

.bf-section-break h2,
.bf-section-break h3,
.bf-section-break h4 {
    margin: 0;
}

.bf-submit-row {
    display: flex;
}

.bf-submit-stretch .bf-submit {
    width: 100%;
}

.bf-submit-center {
    justify-content: center;
}

.bf-submit-right {
    justify-content: flex-end;
}

.bf-visually-hidden {
    clip: rect(0 0 0 0);
    clip-path: inset(50%);
    height: 1px;
    overflow: hidden;
    position: absolute;
    white-space: nowrap;
    width: 1px;
}

.bf-wrap input[type="text"],
.bf-wrap input[type="email"],
.bf-wrap input[type="tel"],
.bf-wrap input[type="url"],
.bf-wrap input[type="number"],
.bf-wrap select,
.bf-wrap textarea {
    background: #fff;
    border: 1px solid #d8e0e8;
    border-radius: 8px;
    box-sizing: border-box;
    color: #172033;
    min-height: 46px;
    padding: 10px 12px;
    width: 100%;
}

.bf-wrap textarea {
    min-height: 100px;
}

.bf-wrap select:not([multiple]) {
    appearance: none;
    background-image: linear-gradient(45deg, transparent 50%, #596579 50%), linear-gradient(135deg, #596579 50%, transparent 50%);
    background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
    background-repeat: no-repeat;
    background-size: 5px 5px, 5px 5px;
    padding-right: 38px;
}

.bf-wrap input:not([type="checkbox"]):focus,
.bf-wrap select:focus,
.bf-wrap textarea:focus {
    border-color: var(--bf-primary);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--bf-primary), transparent 68%);
    outline: none;
}

.bf-wrap input[type="checkbox"]:focus,
.bf-wrap input[type="radio"]:focus {
    outline: 2px solid color-mix(in srgb, var(--bf-primary), transparent 35%);
    outline-offset: 2px;
}

.bf-disclaimer {
    color: #596579;
    font-size: 14px;
}

.bf-section-help {
    color: #596579;
    margin-top: -4px;
}

.bf-required,
.bf-optional {
    border-radius: 999px;
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    margin-left: 6px;
    padding: 2px 7px;
    vertical-align: middle;
}

.bf-required {
    background: #fff1eb;
    color: #c2410c;
}

.bf-optional {
    background: #edf3f8;
    color: #596579;
}

.bf-submit {
    background: var(--bf-button);
    border: 0;
    border-radius: 6px;
    color: var(--bf-button-text);
    cursor: pointer;
    font-weight: 700;
    min-height: 48px;
    padding: 12px 20px;
}

.bf-message-success {
    border-color: #63a96b;
}

.bf-message-error {
    border-color: #c03;
    color: #8a001f;
}

.bf-message:focus {
    outline: 3px solid color-mix(in srgb, var(--bf-primary), transparent 55%);
    outline-offset: 2px;
}

@media (max-width: 720px) {
    .bf-page-actions { gap: 8px; }
    .bf-page-final-content { max-width: 100%; }
    .bf-plan-grid,
    .bf-row,
    .bf-basic-form .bf-step,
    .bf-check-grid,
    .bf-choice-columns,
    .bf-name-grid,
    .bf-estimate {
        grid-template-columns: 1fr;
    }

    .bf-choice-presentation.bf-choice-stacked {
        grid-template-columns: 1fr;
    }

    .bf-basic-form .bf-field-half,
    .bf-basic-form .bf-field[data-bf-field-width="half"] {
        grid-column: 1 / -1 !important;
    }

    .bf-label-left,
    .bf-label-right {
        grid-template-columns: 1fr;
    }

    .bf-label-left > *,
    .bf-label-right > * {
        grid-column: 1 !important;
        grid-row: auto !important;
    }

    .bf-name-grid > label {
        grid-column: 1 / -1;
    }

    .bf-step,
    .bf-conditional,
    .bf-message {
        padding: 18px;
    }
}
