/* Contact form (page-contact.php). Uses the theme's design tokens. */

.nx-contact-form {
  scroll-margin-top: 7rem;
}

.nx-contact-form .nx-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.nx-notice {
  position: relative;
  margin-top: 1.5rem;
  padding: 0.85rem 1rem;
  border: 1px solid;
  border-radius: var(--radius-xl);
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.45;
}

.nx-notice--success {
  background: rgb(25 198 180 / 0.1);
  border-color: rgb(25 198 180 / 0.35);
  color: #0f8f84;
}

.nx-notice--error {
  background: #fff1f1;
  border-color: #fecaca;
  color: #b42318;
}

.nx-fields {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 640px) {
  .nx-fields {
    grid-template-columns: 1fr 1fr;
  }
  .nx-field--full {
    grid-column: 1 / -1;
  }
}

.nx-field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-navy-900);
}

.nx-field .nx-req {
  color: var(--color-blue);
}

.nx-field .nx-opt {
  font-weight: 400;
  color: var(--color-ink-muted);
}

.nx-field input,
.nx-field textarea {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-xl);
  background: var(--color-mist);
  color: var(--color-navy-900);
  font: inherit;
  font-size: 0.9375rem;
  line-height: 1.4;
  transition:
    border-color 0.2s ease,
    box-shadow 0.2s ease,
    background-color 0.2s ease;
}

.nx-field textarea {
  min-height: 7rem;
  resize: vertical;
}

.nx-field input::placeholder,
.nx-field textarea::placeholder {
  color: var(--color-ink-muted);
  opacity: 0.7;
}

.nx-field input:hover,
.nx-field textarea:hover {
  border-color: rgb(55 125 255 / 0.4);
}

.nx-field input:focus,
.nx-field textarea:focus {
  outline: none;
  border-color: var(--color-blue);
  background: #fff;
  box-shadow: 0 0 0 3px rgb(55 125 255 / 0.15);
}

.nx-contact-form:not(:focus-within) .nx-field input:user-invalid,
.nx-field input:user-invalid {
  border-color: #f04438;
}

.nx-contact-form button[type="submit"] {
  cursor: pointer;
  border: 0;
}
