/* uTurn Ministry contact form and SMS opt-in. Uses the site's own tokens from theme.css. */

.uf-form {
  display: grid;
  gap: 1.25rem;
  text-align: left;
}

.uf-field {
  display: grid;
  gap: 0.45rem;
}

.uf-field label {
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  font-weight: 600;
  color: var(--slate);
}

.uf-required {
  color: var(--amber);
}

.uf-hint {
  font-weight: 400;
  color: var(--text-light);
}

.uf-form input[type="text"],
.uf-form input[type="email"],
.uf-form input[type="tel"],
.uf-form textarea {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid #DDE3E4;
  border-radius: 10px;
  background: var(--warm-white);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px; /* 16px keeps iOS from zooming when a field is focused */
  line-height: 1.5;
  color: var(--text);
  transition: border-color .2s ease, box-shadow .2s ease;
}

.uf-form textarea {
  resize: vertical;
  min-height: 140px;
}

.uf-form input:focus,
.uf-form textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(26, 107, 90, .15);
}

.uf-form input:focus-visible,
.uf-form textarea:focus-visible,
.uf-form button:focus-visible,
.uf-consent input:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 2px;
}

/* The SMS agreement: the wording carriers require, with the tick box beside it */
.uf-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 1.1rem 1.2rem;
  border: 1px solid #DDE3E4;
  border-left: 3px solid var(--teal);
  border-radius: 10px;
  background: var(--pearl);
}

.uf-consent input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  accent-color: var(--teal);
  flex: none;
}

.uf-consent label {
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--text-light);
}

.uf-consent a {
  color: var(--teal);
  font-weight: 600;
}

/* Hidden from people, visible to the bots that fill in everything */
.uf-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.uf-form button[type="submit"] {
  justify-self: start;
  border: none;
  cursor: pointer;
}

.uf-form button[disabled] {
  opacity: .6;
  cursor: progress;
}

.uf-status {
  margin: 0;
  font-family: 'DM Sans', sans-serif;
  font-size: 15px;
  line-height: 1.5;
}

.uf-status[data-state=""] {
  display: none;
}

.uf-status[data-state="success"] {
  padding: 12px 16px;
  border-radius: 10px;
  background: #E8F4F1;
  color: var(--teal);
  font-weight: 600;
}

.uf-status[data-state="error"] {
  padding: 12px 16px;
  border-radius: 10px;
  background: #FDF1E7;
  color: #B4611F;
  font-weight: 600;
}

/* SMS terms of service, linked from the consent wording and given to the carrier */
.uf-terms {
  padding: 1.75rem;
  border-radius: 14px;
  background: var(--pearl);
}

.uf-terms h3 {
  margin-top: 0;
}

.uf-terms ul {
  margin: 0;
  padding-left: 1.2rem;
  color: var(--text-light);
  line-height: 1.7;
}

@media (max-width: 600px) {
  .uf-consent {
    padding: 1rem;
  }

  .uf-form button[type="submit"] {
    justify-self: stretch;
    width: 100%;
    text-align: center;
  }
}
