.bfb-wrap {
  --bfb-primary: #2563eb; --bfb-btn-text: #fff; --bfb-bg: #fff; --bfb-label: #1f2937;
  --bfb-input-bg: #fff; --bfb-input-border: #d1d5db; --bfb-input-text: #111827;
  --bfb-radius: 8px; --bfb-font-size: 15px; --bfb-max-width: 640px; --bfb-padding: 24px; --bfb-gap: 16px; --bfb-label-weight: 600;
  position: relative; max-width: var(--bfb-max-width); margin: 0 auto 24px; padding: var(--bfb-padding);
  background: var(--bfb-bg); color: var(--bfb-label); font-size: var(--bfb-font-size); line-height: 1.7;
  border-radius: calc(var(--bfb-radius) + 4px); box-sizing: border-box;
}
.bfb-wrap *, .bfb-wrap *::before, .bfb-wrap *::after { box-sizing: border-box; }
.bfb-wrap.bfb-border { border: 1px solid var(--bfb-input-border); }
.bfb-wrap.bfb-shadow { box-shadow: 0 10px 30px rgba(0, 0, 0, .08); }
.bfb-title { margin: 0 0 18px; font-size: 1.3em; color: var(--bfb-label); }

.bfb-fields { display: flex; flex-wrap: wrap; margin: 0 calc(var(--bfb-gap) / -2); }
.bfb-field { width: 100%; padding: 0 calc(var(--bfb-gap) / 2); margin-bottom: var(--bfb-gap); }
.bfb-field[hidden] { display: none !important; }
.bfb-w-75 { width: 75%; } .bfb-w-66 { width: 66.6667%; } .bfb-w-50 { width: 50%; }
.bfb-w-33 { width: 33.3333%; } .bfb-w-25 { width: 25%; }
@media (max-width: 600px) { .bfb-field { width: 100% !important; } }

.bfb-label { display: block; margin-bottom: 6px; font-weight: var(--bfb-label-weight); color: var(--bfb-label); }
.bfb-star { color: #dc2626; }
.bfb-label-hidden .bfb-label-main { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.bfb-input, .bfb-select, .bfb-textarea {
  display: block; width: 100%; padding: .65em .9em; font: inherit; line-height: 1.5;
  color: var(--bfb-input-text); background: var(--bfb-input-bg);
  border: 1px solid var(--bfb-input-border); border-radius: var(--bfb-radius);
  transition: border-color .15s, box-shadow .15s; box-shadow: none; margin: 0;
}
.bfb-textarea { resize: vertical; min-height: 110px; }
.bfb-input:focus, .bfb-select:focus, .bfb-textarea:focus {
  outline: none; border-color: var(--bfb-primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--bfb-primary) 25%, transparent);
}
.bfb-input::placeholder, .bfb-textarea::placeholder { color: #9ca3af; }
.bfb-file { padding: .5em .7em; }

.bfb-options { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.bfb-option { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-weight: 400; }
.bfb-option input { accent-color: var(--bfb-primary); width: 1.1em; height: 1.1em; margin: 0; }
.bfb-consent { align-items: flex-start; }
.bfb-consent input { margin-top: .3em; }

.bfb-heading { margin: 8px 0 0; padding-bottom: 8px; font-size: 1.15em; color: var(--bfb-label); border-bottom: 2px solid var(--bfb-primary); }
.bfb-paragraph { color: var(--bfb-label); opacity: .85; }
.bfb-paragraph p { margin: 0 0 .6em; }
.bfb-help, .bfb-hint { display: block; margin-top: 5px; font-size: .85em; color: #6b7280; }

.bfb-field-error { display: block; margin-top: 5px; font-size: .85em; color: #dc2626; }
.bfb-field-error:empty { display: none; }
.bfb-has-error .bfb-input, .bfb-has-error .bfb-select, .bfb-has-error .bfb-textarea { border-color: #dc2626; }

.bfb-messages:empty { display: none; }
.bfb-success, .bfb-error, .bfb-notice { padding: 12px 16px; margin-bottom: 16px; border-radius: var(--bfb-radius); }
.bfb-success { background: #ecfdf5; color: #065f46; border: 1px solid #a7f3d0; }
.bfb-error { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.bfb-notice { background: #f9fafb; color: #374151; border: 1px solid #e5e7eb; }

.bfb-actions { display: flex; justify-content: flex-start; }
.bfb-align-center .bfb-actions { justify-content: center; }
.bfb-align-end .bfb-actions { justify-content: flex-end; }
.bfb-align-full .bfb-submit { width: 100%; }
.bfb-submit {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: .8em 2.2em; font: inherit; font-weight: 700; cursor: pointer;
  color: var(--bfb-btn-text); background: var(--bfb-primary); border: 0; border-radius: var(--bfb-radius);
  transition: filter .15s, transform .05s;
}
.bfb-submit:hover { filter: brightness(1.08); }
.bfb-submit:active { transform: translateY(1px); }
.bfb-submit[disabled] { opacity: .65; cursor: not-allowed; }
.bfb-spinner { display: none; width: 1em; height: 1em; border: 2px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: bfb-spin .7s linear infinite; }
.bfb-loading .bfb-spinner { display: inline-block; }
@keyframes bfb-spin { to { transform: rotate(360deg); } }

.bfb-hp { position: absolute !important; left: -9999px !important; top: -9999px !important; width: 0; height: 0; overflow: hidden; opacity: 0; }
