/* ==========================================================================
   FixHire Forms
   Field-level styling for [fixhire_contact_form], [fixhire_newsletter_form],
   and [fixhire_learning_signup_form]. Depends on fixhire-design-system.css
   for tokens. Structural form layout (.fh-form-card / .fh-form-row) lives there.
   ========================================================================== */

.fh-form-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--fh-ink);
}
.fh-form-label .fh-required { color: var(--fh-red); margin-left: 2px; }
.fh-form-optional { font-weight: 400; color: var(--fh-muted); margin-left: 4px; }
.fh-form fieldset { border: 0; margin: 0; padding: 0; }
.fh-form legend { padding: 0; margin-bottom: 10px; }

.fh-form-input,
.fh-form-textarea,
.fh-form-select {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  font-family: var(--fh-font);
  font-size: 15px;
  color: var(--fh-ink);
  background: #fff;
  border: 1px solid var(--fh-border);
  border-radius: var(--fh-radius-xs);
  transition: border-color .18s ease, box-shadow .18s ease;
}
.fh-form-input::placeholder,
.fh-form-textarea::placeholder { color: var(--fh-muted); }

.fh-form-textarea { min-height: 160px; resize: vertical; padding-top: 12px; }

.fh-form-input:focus,
.fh-form-textarea:focus,
.fh-form-select:focus {
  outline: none;
  border-color: var(--fh-accent);
  box-shadow: var(--fh-focus);
}

/* Checkbox / interest groups */
.fh-form-checkbox-group { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.fh-form-checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  color: var(--fh-text);
}
.fh-form-checkbox input { width: 18px; height: 18px; accent-color: var(--fh-accent); }

/* Submit */
.fh-form-submit {
  width: 100%;
  min-height: 52px;
}

/* Honeypot: visually hidden, kept in DOM for bots */
.fh-form-hp {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0; padding: 0; margin: -1px;
}

/* Messages */
.fh-form-message { border-radius: var(--fh-radius-sm); padding: 12px 16px; font-size: 14px; margin-bottom: 16px; }
.fh-form-message--success { background: #EEF8F0; color: var(--fh-success); border: 1px solid color-mix(in srgb, var(--fh-success) 30%, transparent); }
.fh-form-message--error { background: #fff5f6; color: var(--fh-danger); border: 1px solid color-mix(in srgb, var(--fh-danger) 30%, transparent); }

.fh-form-field--error .fh-form-input,
.fh-form-field--error .fh-form-textarea,
.fh-form-field--error .fh-form-select { border-color: var(--fh-danger); }
.fh-form-field__error { font-size: 13px; color: var(--fh-danger); }

@media (max-width: 767px) {
  .fh-form-checkbox-group { grid-template-columns: 1fr; }
}

/* Batch 15H: workflow-aware intake forms. */
.fh-form-card--workflow { position: relative; }
.fh-form-conditional[hidden] { display: none !important; }
.fh-form-help { margin: 6px 0 0; font-size: 13px; line-height: 1.5; color: var(--fh-muted); }
.fh-form-file { padding-top: 13px; }
.fh-form-checkbox { align-items: flex-start; }
.fh-form-checkbox input { margin-top: 2px; }
.fh-form-card--workflow .fh-form-note { font-size: 13px; line-height: 1.6; color: var(--fh-muted); }

html.uc-dark .fh-form-input,
html.uc-dark .fh-form-textarea,
html.uc-dark .fh-form-select {
  background: var(--fh-card, #161c26);
  border-color: rgba(152, 162, 182, 0.28);
  color: var(--fh-ink, #f5f7fb);
}
html.uc-dark .fh-form-input::placeholder,
html.uc-dark .fh-form-textarea::placeholder { color: var(--fh-muted, #98a2b6); }
html.uc-dark .fh-form-label,
html.uc-dark .fh-form-checkbox,
html.uc-dark .fh-form-help,
html.uc-dark .fh-form-card--workflow .fh-form-note { color: var(--fh-text, #d4dae6); }
html.uc-dark .fh-form-message--success { background: rgba(34, 197, 94, 0.10); color: #79C982; }
html.uc-dark .fh-form-message--error { background: rgba(255, 109, 146, 0.10); color: #FF6D92; }

/* Batch 15H.3: compact multi-step controls and conditional other fields. */
.fh-form-other-field[hidden] { display: none !important; }
.fh-form-card--multistep .fh-form-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}
.fh-form-card--multistep .fh-form-nav .fh-btn,
.fh-form-card--multistep .fh-form-submit {
  width: auto;
  min-width: 156px;
  min-height: 46px;
  justify-content: center;
}
@media (max-width: 767px) {
  .fh-form-card--multistep .fh-form-nav {
    flex-direction: column;
    align-items: stretch;
  }
  .fh-form-card--multistep .fh-form-nav .fh-btn,
  .fh-form-card--multistep .fh-form-submit {
    width: 100%;
    min-width: 0;
  }
}
