.b2b-styled-form {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid #e6e6e6;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: #222;
    box-sizing: border-box;
}

.b2b-styled-form .b2b_label {
    display: inline-block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #333;
    font-size: 0.95rem;
}

.b2b-styled-form .b2b_form_input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ccd0d5;
    border-radius: 6px;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: border-color .12s ease, box-shadow .12s ease;
}

.b2b-styled-form .b2b_form_input:focus {
    outline: none;
    border-color: #6aa1ff;
    box-shadow: 0 0 0 3px rgba(106,161,255,0.12);
}

.b2b_form_row {
    display: flex;
    gap: 12px;
}

.b2b_form_name_row .b2b_form_field {
    flex: 1;
}

/* Buttons */
.b2b_form_button {
    background: linear-gradient(180deg,#3b82f6,#2563eb);
    color: #fff;
    border: none;
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 6px 18px rgba(37,99,235,0.18);
}
.b2b_form_button:hover { opacity: 0.98; transform: translateY(-1px); }

/* Headings inside form */
.b2b-styled-form h5 {
    margin: 12px 0;
    font-size: 1rem;
    color: #444;
}

/* Conditional wrapper spacing */
.conditional-wrapper { margin-top: 8px; }

/* Small helper for required fields: show asterisk via CSS */
.b2b_label:after {
    content: "";
    display: inline-block;
    margin-left: 6px;
    color: #d00;
    font-weight: 700;
}
.b2b_form_input[required] + .note { display: inline-block; }

/* Mobile styles */
@media (max-width: 600px) {
    .b2b_form_row { flex-direction: column; }
    .b2b-styled-form { padding: 16px; border-radius: 6px; }
    .b2b-styled-form .b2b_label { font-size: 0.92rem; }
    .b2b_form_button { width: 100%; padding: 12px; }
}

.b2b_form_field.b2b_form_checkbox {
  display: flex;
  flex-direction: column; /* label on top, checkbox below */
  align-items: flex-start; /* left-align both items */
  gap: 0.35rem;
  padding: 0;
  text-align: left;
}

.b2b_form_field.b2b_form_checkbox .b2b_label,
.b2b_form_field.b2b_form_checkbox .b2b_label_inline {
  display: block;
  margin: 0;
  line-height: 1.2;
}

/* Ensure the checkbox itself is flush left under the label */
.b2b_form_field.b2b_form_checkbox input[type="checkbox"],
#b2b_agree_monitor {
  margin: 0;
  align-self: flex-start;
  vertical-align: middle;
  width: auto;
  height: auto;
}

#b2b-foster-form-message { display:inline-block; margin-left:12px; font-size:0.95rem; vertical-align:middle; }
#b2b-foster-form-message.b2b-submitting { color:#0a66c2; }
#b2b-foster-form-message.b2b-error { color:#d00; }