/* ============================================
   REKLAIM — Form Styles
   Shared across form pages (apply, intake, index, free-guide)
   ============================================ */

/* Form Sections */
.form-section {
  background: var(--bg-secondary);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.form-section h2 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

/* Form Groups */
.form-group {
  margin-bottom: 1.25rem;
}

.form-group:last-child {
  margin-bottom: 0;
}

/* Labels */
label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.hint {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.375rem;
}

.required {
  color: var(--error);
}

/* Inputs */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
select,
textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  background: var(--bg-primary);
  border: 1px solid var(--border);
  border-radius: 4px;
  color: var(--text-primary);
  transition: border-color 0.2s;
}

/* Focus styles — visible outline for keyboard users */
input:focus,
select:focus,
textarea:focus {
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;
  border-color: var(--text-secondary);
}

/* Keep mouse clicks clean */
input:focus:not(:focus-visible),
select:focus:not(:focus-visible),
textarea:focus:not(:focus-visible) {
  outline: none;
}

input::placeholder,
textarea::placeholder {
  color: var(--text-secondary);
}

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

/* Select */
select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23A0A0A0' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

select option {
  background: var(--bg-primary);
  color: var(--text-primary);
}

/* Inline Fields (2-column grid) */
.inline-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

@media (max-width: 480px) {
  .inline-fields {
    grid-template-columns: 1fr;
  }
}

/* Fieldset / Legend (for radio/checkbox groups) */
fieldset {
  border: none;
  padding: 0;
  margin-bottom: 1.25rem;
}

fieldset:last-child {
  margin-bottom: 0;
}

legend {
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

/* Radio & Checkbox Groups */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: var(--bg-tertiary);
  border: 1px solid var(--border);
  border-radius: 4px;
  cursor: pointer;
  transition: border-color 0.2s;
}

.radio-option:hover,
.checkbox-option:hover {
  border-color: var(--text-secondary);
}

.radio-option input[type="radio"],
.checkbox-option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: var(--text-primary);
}

/* Submit Button */
button[type="submit"] {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--text-primary);
  color: var(--bg-primary);
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: opacity 0.2s;
}

button[type="submit"]:hover {
  opacity: 0.9;
}

button[type="submit"]:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.submit-note {
  text-align: center;
  margin-top: 1rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}

/* Error States */
.error-message {
  color: var(--error);
  font-size: 0.8125rem;
  margin-top: 0.25rem;
}

/* Privacy Note */
.privacy {
  font-size: 0.75rem;
  color: var(--text-secondary);
  text-align: center;
  margin-top: 1rem;
}
