/* ── Jauaperi Form v2 — complementa Tailwind, não sobrescreve ─────────────── */

/* Part 2 expansion */
#formPart2 {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
}
#formPart2.expanded {
  max-height: 4000px;
}

/* EN: part 2 always visible */
#formPart2.always-visible {
  max-height: none;
  overflow: visible;
}

/* Divider between part 1 and 2 */
.part2-divider {
  border-top: 1px solid #e5e7eb;
  margin: 24px 0 20px;
}

.part2-title {
  font-size: 1rem;
  font-weight: 700;
  color: #6b7f52;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 20px;
}

/* Field help text */
.field-help {
  font-size: 0.78rem;
  color: #6b7280;
  margin: 2px 0 6px;
  line-height: 1.4;
}

/* Optional / required markers */
.req { color: #dc2626; margin-left: 2px; }
.opt { color: #9ca3af; font-weight: 400; font-size: 0.85em; }

/* Inline error messages */
.error-msg {
  display: none;
  font-size: 0.78rem;
  color: #dc2626;
  margin-top: 4px;
}

/* Error state on inputs */
input.field-error,
select.field-error,
textarea.field-error {
  border-color: #dc2626 !important;
  background-color: #fef2f2 !important;
}

/* Country detecting spinner */
.country-detecting {
  display: inline-block;
  font-size: 0.85rem;
  color: #6b7280;
  padding: 10px 0;
  font-style: italic;
}

/* Radio & checkbox groups */
.radio-group,
.checkbox-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.radio-option,
.checkbox-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  cursor: pointer;
  font-size: 0.9rem;
  color: #374151;
  transition: border-color 0.15s, background-color 0.15s;
  line-height: 1.3;
  min-height: 44px; /* touch target */
}

.radio-option:hover,
.checkbox-option:hover {
  border-color: #6b7f52;
  background-color: #f0f4eb;
}

.radio-option input,
.checkbox-option input {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
  accent-color: #6b7f52;
}

.radio-option input:checked ~ *,
.checkbox-option input:checked ~ * {
  font-weight: 600;
}

/* Primary CTA */
.btn-primary-cta {
  background: #6b7f52;
  color: white;
  border: none;
  font-family: inherit;
  cursor: pointer;
  font-size: 1rem;
  min-height: 52px;
}
.btn-primary-cta:hover { background: #5a6d43; }
.btn-primary-cta:focus-visible { outline: 3px solid #b89968; outline-offset: 2px; }

/* Secondary CTA */
.btn-secondary-cta {
  background: transparent;
  border: 2px solid #25d366;
  color: #1a9e4f;
  font-family: inherit;
  cursor: pointer;
  font-size: 0.95rem;
  min-height: 48px;
  border-radius: 8px;
  transition: background 0.15s, color 0.15s;
}
.btn-secondary-cta:hover { background: #f0fdf4; }
.btn-secondary-cta:focus-visible { outline: 3px solid #25d366; outline-offset: 2px; }

/* Submit detailed */
.btn-submit-detailed {
  background: #6b7f52;
  color: white;
  border: none;
  font-family: inherit;
  cursor: pointer;
  font-size: 1.05rem;
  min-height: 54px;
  border-radius: 8px;
  margin-top: 24px;
  transition: background 0.15s;
}
.btn-submit-detailed:hover:not(:disabled) { background: #5a6d43; }
.btn-submit-detailed:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-submit-detailed:focus-visible { outline: 3px solid #b89968; outline-offset: 2px; }

/* Textarea resize */
textarea.form-input { resize: vertical; min-height: 72px; }

/* Country select */
select#f-country { cursor: pointer; }

/* Flatpickr overrides */
.flatpickr-calendar { font-family: Poppins, sans-serif; border-radius: 12px; box-shadow: 0 8px 32px rgba(0,0,0,0.15); }
.flatpickr-day.flatpickr-disabled { color: #d1d5db !important; cursor: not-allowed; text-decoration: line-through; }
.flatpickr-day.selected,
.flatpickr-day.selected:hover { background: #6b7f52; border-color: #6b7f52; }
.flatpickr-day:hover { background: #f0f4eb; border-color: #6b7f52; }
.flatpickr-months .flatpickr-month { background: #6b7f52; color: white; }
.flatpickr-current-month .flatpickr-monthDropdown-months { background: #6b7f52; }
.flatpickr-weekday { color: #6b7f52; font-weight: 600; }

/* Focus visible global (acessibilidade) */
.form-input:focus-visible {
  outline: 3px solid #6b7f52;
  outline-offset: 1px;
}

@media (max-width: 480px) {
  .radio-option, .checkbox-option { font-size: 0.85rem; padding: 9px 12px; }
  .btn-primary-cta, .btn-submit-detailed { font-size: 0.95rem; }
}
