/* SwebForm — Front-end styles */
:root {
  --swbf-accent:       #0073aa;
  --swbf-accent-hover: #005f8c;
  --swbf-error:        #b32d2e;
  --swbf-success:      #1e6e2e;
  --swbf-border:       #ddd;
  --swbf-radius:       4px;
  --swbf-font:         inherit;
}

.swbf-form-wrap { font-family: var(--swbf-font); }

.swbf-form { max-width: 640px; }

/* ── Fields ────────────────────────────────────────────────────────────── */
.swbf-field { margin-bottom: 18px; }

.swbf-label {
  display: block;
  margin-bottom: 5px;
  font-weight: 600;
  font-size: .9em;
  color: inherit;
}

.swbf-required { color: var(--swbf-error); margin-left: 2px; }

.swbf-input,
.swbf-textarea,
.swbf-select {
  display: block;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--swbf-border);
  border-radius: var(--swbf-radius);
  font-family: inherit;
  font-size: 1em;
  line-height: 1.5;
  color: inherit;
  background: #fff;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.swbf-input:focus,
.swbf-textarea:focus,
.swbf-select:focus {
  outline: none;
  border-color: var(--swbf-accent);
  box-shadow: 0 0 0 2px rgba(0, 115, 170, .2);
}

.swbf-field.has-error .swbf-input,
.swbf-field.has-error .swbf-textarea,
.swbf-field.has-error .swbf-select {
  border-color: var(--swbf-error);
}

.swbf-textarea { resize: vertical; min-height: 100px; }

/* ── Options (radio/checkbox) ──────────────────────────────────────────── */
.swbf-options { display: flex; flex-direction: column; gap: 6px; }
.swbf-option-label { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: .95em; }
.swbf-option-label input { width: 16px; height: 16px; accent-color: var(--swbf-accent); flex-shrink: 0; }

/* ── reCAPTCHA ─────────────────────────────────────────────────────────── */
.swbf-field-recaptcha { margin-top: 10px; }

/* ── Submit button ─────────────────────────────────────────────────────── */
.swbf-field-submit { margin-top: 6px; }

.swbf-submit-btn {
  display: inline-block;
  padding: 10px 24px;
  background: var(--swbf-accent);
  color: #fff;
  border: none;
  border-radius: var(--swbf-radius);
  font-family: inherit;
  font-size: 1em;
  font-weight: 600;
  cursor: pointer;
  transition: background .15s, opacity .15s;
}
.swbf-submit-btn:hover:not(:disabled) { background: var(--swbf-accent-hover); }
.swbf-submit-btn:disabled             { opacity: .6; cursor: default; }

/* ── Error messages ────────────────────────────────────────────────────── */
.swbf-error {
  display: block;
  margin-top: 4px;
  font-size: .85em;
  color: var(--swbf-error);
  min-height: 1em;
}

/* ── Response banner ───────────────────────────────────────────────────── */
.swbf-response {
  padding: 12px 16px;
  border-radius: var(--swbf-radius);
  font-weight: 500;
  margin-top: 12px;
}
.swbf-response.is-success { background: #edfaef; color: var(--swbf-success); border: 1px solid #b7e4c0; }
.swbf-response.is-error   { background: #fce8e8; color: var(--swbf-error);   border: 1px solid #f5c0c0; }

/* ── Loading state ─────────────────────────────────────────────────────── */
.swbf-form.is-sending .swbf-submit-btn { opacity: .7; cursor: wait; }
