/*
Supplemental styles for the contact form on contact_en.php / contact_es.php.
Base input/button styling comes from css/templatemo-style.css (.form-control,
.btn-secondary, .tm-btn-submit); this file only adds validation and honeypot styles.
*/

.tm-form-container .form-group {
  position: relative;
  margin-bottom: 25px;
}

.contact-field-error {
  display: block;
  min-height: 1.2em;
  font-size: 0.8rem;
  color: #b3261e;
  margin-top: 4px;
}

.form-control.is-invalid {
  border-color: #b3261e;
}

.contact-alert {
  padding: 12px 18px;
  margin-bottom: 20px;
  border-radius: 4px;
  font-size: 0.95rem;
}

.contact-alert--success {
  background-color: #e6f4ea;
  color: #1e4620;
  border: 1px solid #b6dfc0;
}

.contact-alert--error {
  background-color: #fdecea;
  color: #7a1c14;
  border: 1px solid #f3b8b3;
}

/* Honeypot field: hidden from sighted and screen-reader users, but present in
   the DOM/tab order removed so most bots that blindly fill every input trip it. */
.contact-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* "Are you a human?" check: real protection is the server-issued token this
   button fetches on click, not the checkbox appearance itself. */
.tm-human-check-box {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  background-color: #fff;
  border: 1px solid #cfd0d1;
  border-radius: 4px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #5f6061;
  cursor: pointer;
  transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tm-human-check-box:hover {
  border-color: #669999;
}

.tm-human-check-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  border: 2px solid #98999a;
  border-radius: 4px;
  position: relative;
}

.tm-human-check-box.is-checking .tm-human-check-icon {
  border-color: #669999;
  border-top-color: transparent;
  animation: tm-human-check-spin 0.7s linear infinite;
}

.tm-human-check-box.is-verified {
  border-color: #2e7d32;
  background-color: #e6f4ea;
  cursor: default;
}

.tm-human-check-box.is-verified .tm-human-check-icon {
  border-color: #2e7d32;
  background-color: #2e7d32;
}

.tm-human-check-box.is-verified .tm-human-check-icon:after {
  content: "";
  position: absolute;
  left: 5px;
  top: 1px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.tm-human-check-box.is-verified .tm-human-check-label {
  color: #1e4620;
}

@keyframes tm-human-check-spin {
  to { transform: rotate(360deg); }
}
