/* Bootstrap 5 validation styles adapted to Safkon's .cta-input fields.
   Loaded AFTER the theme styles on pages that opt in (currently contact.php). */

/* Invalid state (red border + soft red glow) */
.was-validated .cta-input:invalid,
.cta-input.is-invalid {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.12);
}

/* Valid state (green border + soft green glow) */
.was-validated .cta-input:valid,
.cta-input.is-valid {
  border-color: #198754;
  box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.12);
}

/* Keep the blue focus ring while typing after a failed submit */
.was-validated .cta-input:invalid:focus {
  border-color: #dc3545;
  box-shadow: 0 0 0 4px rgba(220, 53, 69, 0.15);
}
.was-validated .cta-input:valid:focus {
  border-color: #198754;
  box-shadow: 0 0 0 4px rgba(25, 135, 84, 0.15);
}

/* Feedback messages */
.cta-form .invalid-feedback {
  display: none;
  margin-top: 6px;
  font-size: 12.5px;
  font-weight: 500;
  color: #dc3545;
}
.was-validated .cta-input:invalid ~ .invalid-feedback {
  display: block;
}

/* CAPTCHA image */
.captcha-img {
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  user-select: none;
}
.captcha-refresh {
  background: none;
  border: none;
  color: var(--primary, #0066cc);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}
.captcha-refresh:hover {
  text-decoration: underline;
}
