/* Form Title */
.sf-form-title {
  font-size: 22px; font-weight: 700; color: #111827;
  margin: 0 0 20px; padding-bottom: 12px;
  border-bottom: 2px solid #e5e7eb; line-height: 1.3;
}

/* Form Wrapper */
.sf-form-wrapper { width: 100%; box-sizing: border-box; }
.sf-form-wrapper *, .sf-form-wrapper *::before, .sf-form-wrapper *::after { box-sizing: border-box; }

.sf-form { display: flex; flex-wrap: wrap; gap: 0; }

/* Column widths */
.sf-col-100 { width: 100%; padding: 0 0 18px; }
.sf-col-50 { width: 50%; padding: 0 8px 18px 0; }
.sf-col-50:nth-child(even) { padding: 0 0 18px 8px; }
.sf-col-33 { width: 33.333%; padding: 0 8px 18px 0; }

@media (max-width: 600px) {
  .sf-col-50, .sf-col-33 { width: 100%; padding: 0 0 18px; }
}

/* Labels */
.sf-label {
  display: block; margin-bottom: 6px;
  font-size: 14px; font-weight: 600; color: #374151; line-height: 1.4;
}
.sf-required { color: #dc2626; margin-left: 2px; }

/* Inputs */
.sf-input, .sf-textarea, .sf-select {
  width: 100%; padding: 10px 14px;
  border: 1.5px solid #d1d5db; border-radius: 6px;
  font-size: 15px; color: #111827; background: #fff;
  transition: border-color .2s, box-shadow .2s;
  font-family: inherit; line-height: 1.5;
  -webkit-appearance: none; appearance: none;
}
.sf-input:focus, .sf-textarea:focus, .sf-select:focus {
  outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12);
}
.sf-input::placeholder, .sf-textarea::placeholder { color: #9ca3af; }
.sf-textarea { resize: vertical; min-height: 120px; }
.sf-select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
  padding-right: 40px; cursor: pointer;
}

/* Fieldset / Radio / Checkbox */
.sf-fieldset { border: none; padding: 0; margin: 0; }
.sf-fieldset legend.sf-label { margin-bottom: 10px; }
.sf-radio-label, .sf-checkbox-label {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: #374151; padding: 6px 0; cursor: pointer;
}
.sf-radio, .sf-checkbox {
  width: 18px; height: 18px; border: 2px solid #d1d5db; border-radius: 50%;
  appearance: none; -webkit-appearance: none; cursor: pointer;
  flex-shrink: 0; background: #fff; transition: all .15s; position: relative;
}
.sf-checkbox { border-radius: 4px; }
.sf-radio:checked, .sf-checkbox:checked {
  background: #2563eb; border-color: #2563eb;
}
.sf-radio:checked::after {
  content: ''; position: absolute; width: 7px; height: 7px;
  background: #fff; border-radius: 50%; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
}
.sf-checkbox:checked::after {
  content: ''; position: absolute; width: 10px; height: 7px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  top: 2px; left: 2px; transform: rotate(-45deg);
}
.sf-radio:focus, .sf-checkbox:focus { outline: none; box-shadow: 0 0 0 3px rgba(37,99,235,.15); }

/* Field hint */
.sf-field-hint {
  display: block; font-size: 12px; color: #9ca3af; margin-top: 5px;
}

/* Error */
.sf-field-error {
  display: block; font-size: 12px; color: #dc2626; margin-top: 5px; font-weight: 500;
}
.sf-input.sf-has-error, .sf-textarea.sf-has-error, .sf-select.sf-has-error {
  border-color: #dc2626; box-shadow: 0 0 0 3px rgba(220,38,38,.1);
}

/* Section Break */
.sf-section { padding: 8px 0 4px; border-bottom: 2px solid #e5e7eb; }
.sf-section-title { font-size: 18px; font-weight: 700; color: #111827; margin: 0 0 4px; }
.sf-section-desc { font-size: 14px; color: #6b7280; margin: 0; }

/* HTML Block */
.sf-html-block { padding: 4px 0; }

/* Submit Button */
.sf-submit-wrap { display: flex; align-items: center; padding-top: 4px; }
.sf-submit-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border: none; border-radius: 7px;
  font-size: 15px; font-weight: 600; color: #fff;
  cursor: pointer; transition: all .2s; font-family: inherit;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.sf-submit-btn:hover { filter: brightness(1.1); transform: translateY(-1px); box-shadow: 0 4px 10px rgba(0,0,0,.15); }
.sf-submit-btn:active { transform: translateY(0); }
.sf-submit-btn:disabled { opacity: .7; cursor: not-allowed; transform: none; }

/* Spinner */
.sf-spin { animation: sf-pub-spin .7s linear infinite; }
@keyframes sf-pub-spin { to { transform: rotate(360deg); } }

/* Messages */
.sf-messages {
  width: 100%; padding: 12px 16px; border-radius: 7px;
  font-size: 14px; font-weight: 500; margin-top: 4px;
}
.sf-messages.sf-success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }
.sf-messages.sf-error { background: #fef2f2; color: #dc2626; border: 1px solid #fca5a5; }

/* reCAPTCHA spacing */
.sf-recaptcha-wrap { padding-bottom: 16px; }

/* Disabled state after success */
.sf-form.sf-submitted .sf-input,
.sf-form.sf-submitted .sf-textarea,
.sf-form.sf-submitted .sf-select,
.sf-form.sf-submitted .sf-submit-btn { pointer-events: none; opacity: .6; }
