/* Shared styling for native inline forms (2026-07-28), replacing third-party
   embeds (JotForm etc.) - submits via wp-content/nhanya-forms.js to the
   existing forms Lambda API. Reuses Nhanya's brand palette. */

.nhanya-form {
  width: 100%;
  box-sizing: border-box;
  margin: 32px auto;
  padding: 32px 40px 40px;
  background: #ffffff;
  border: 1px solid #e7d5bb;
  border-radius: 16px;
  box-shadow: 0 5px 18px rgba(70, 19, 16, 0.08);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 28px;
}

.nhanya-form-row {
  grid-column: span 1;
  margin-bottom: 20px;
  min-width: 0;
}

.nhanya-form-row-full {
  grid-column: 1 / -1;
}

.nhanya-form > .nhanya-form-row:last-child {
  margin-bottom: 0;
}

.nhanya-form label {
  display: block;
  margin-bottom: 6px;
  color: #2C2C2C;
  font-weight: 600;
  font-size: 15px;
}

.nhanya-form .nhanya-form-required {
  color: #E85D4A;
}

/* Shown per-field on submit when a form uses custom validation (see
   wp-content/nhanya-forms.js) instead of the browser's native one-at-a-time
   validation bubble, so every invalid field can be highlighted at once and
   the message scrolls naturally with its field. */
.nhanya-field-error {
  margin: 6px 0 8px;
  color: #E85D4A;
  font-size: 13px;
  font-weight: 600;
}

.nhanya-form input[type="text"],
.nhanya-form input[type="email"],
.nhanya-form input[type="tel"],
.nhanya-form select,
.nhanya-form textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1px solid #d8c7ad;
  border-radius: 8px;
  background: #fbf6ee;
  color: #2C2C2C;
  font-size: 15px;
  font-family: inherit;
}

.nhanya-form input:focus,
.nhanya-form select:focus,
.nhanya-form textarea:focus {
  outline: none;
  border-color: #E8933E;
  box-shadow: 0 0 0 3px rgba(232, 147, 62, 0.18);
}

.nhanya-form.nhanya-form-was-validated input:invalid,
.nhanya-form.nhanya-form-was-validated select:invalid,
.nhanya-form.nhanya-form-was-validated textarea:invalid {
  border-color: #E85D4A;
}

.nhanya-form textarea {
  min-height: 120px;
  max-height: 320px;
  resize: vertical;
  overflow-y: auto;
}

.nhanya-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.nhanya-form-consent input[type="checkbox"] {
  margin-top: 4px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nhanya-form-consent label {
  margin-bottom: 0;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
}

.nhanya-form-radio-group {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.nhanya-form-radio-option {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nhanya-form-radio-option input[type="radio"] {
  width: 18px;
  height: 18px;
  margin: 0;
}

.nhanya-form-radio-option label {
  margin-bottom: 0;
  font-weight: 400;
  font-size: 15px;
}

.nhanya-form-fieldset {
  border: none;
  padding: 0;
  margin: 0 0 20px;
}

.nhanya-form-fieldset legend {
  padding: 0;
  margin-bottom: 6px;
  color: #2C2C2C;
  font-weight: 600;
  font-size: 15px;
}

.nhanya-form-checkbox-group {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}

.nhanya-form-checkbox-option {
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.nhanya-form-checkbox-option input[type="checkbox"] {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.nhanya-form-checkbox-option label {
  margin-bottom: 0;
  font-weight: 400;
  font-size: 15px;
}

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

.nhanya-form-section {
  grid-column: 1 / -1;
  margin: 4px 0 20px;
  padding-top: 20px;
  border-top: 1px solid #e7d5bb;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 28px;
}

.nhanya-form-section-title {
  grid-column: 1 / -1;
  margin: 0 0 16px;
  color: #E8933E;
  font-size: 16px;
  font-weight: 700;
}

.nhanya-form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nhanya-form-hint {
  margin-top: 6px;
  color: #6b5f52;
  font-size: 13px;
}

.nhanya-form button[type="submit"] {
  margin-top: 6px;
  padding: 13px 32px;
  border: none;
  border-radius: 999px;
  background: #E85D4A;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.nhanya-form button[type="submit"]:hover:not(:disabled) {
  background: #E8933E;
}

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

.nhanya-form-status {
  margin-top: 16px;
  font-weight: 600;
}

@media (max-width: 640px) {
  .nhanya-form,
  .nhanya-form-section {
    grid-template-columns: 1fr;
  }

  .nhanya-form {
    padding: 22px 20px 26px;
  }
}
