/* Lead form (#contact): phone hint, ALTCHA captcha, status line, honeypot.
   Base form styles live in style.css (.contact-form, .consent-box, .submit-btn). */

.contact-form .lead-field {
  min-width: 0;
}

.contact-form .lead-field input[aria-invalid="true"] {
  box-shadow: 0 0 0 3px var(--color-dark);
}

.lead-field__error {
  margin: 0.5rem 0 0;
  padding: 0.375rem 0.75rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius-sm);
  color: #b3261e;
  font-size: 0.875rem;
  line-height: 1.4;
}

/* Preferred messengers (between the name/phone row and the message). */
.lead-messengers {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin: -0.5rem 0 1.5rem;
  padding: 0;
  border: 0;
  min-width: 0;
}

.lead-messengers__legend {
  float: left; /* lets the legend sit inline with the options */
  margin-right: 0.25rem;
  padding: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.95);
}

.lead-messengers__option {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.875rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  color: var(--color-black);
  font-size: 0.9375rem;
  cursor: pointer;
}

.contact-form .lead-messengers__option input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  flex-shrink: 0;
  accent-color: var(--color-primary);
  cursor: pointer;
}

.lead-messengers__option:focus-within {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.4);
}

/* Honeypot: off-screen, not display:none (some bots skip hidden inputs). */
.lead-hp {
  position: absolute !important;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* Captcha box, visually paired with .consent-box right above it. */
.lead-captcha {
  margin: -0.75rem 0 1.5rem;
  min-height: 3.5rem; /* reserve space before the widget script loads (no layout shift) */
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  color: var(--color-black);
}

.lead-captcha altcha-widget {
  display: block;
  --altcha-max-width: 100%;
  --altcha-border-width: 0;
  --altcha-border-radius: 8px;
  --altcha-padding: 1rem;
  --altcha-color-base: transparent;
  --altcha-color-base-content: var(--color-black);
  --altcha-color-primary: var(--color-primary);
  --altcha-color-primary-content: #fff;
  --altcha-color-success: #1e7e34;
  --altcha-color-error: #b3261e;
  --altcha-color-neutral: #ccc;
  --altcha-color-neutral-content: var(--color-gray-600);
  --altcha-checkbox-size: 20px;
  --altcha-checkbox-border-radius: 4px;
  --altcha-checkbox-border-color: #888;
  --altcha-spinner-color: var(--color-primary);
  --altcha-checkbox-outline-color: var(--color-primary);
  font-size: 0.9375rem;
  color-scheme: light;
}

.lead-captcha__note {
  margin: 0;
  padding: 1rem;
  font-size: 0.9375rem;
}

/* Status / hint line under the submit button. */
.lead-form__status {
  margin: 0.75rem 0 0;
  text-align: center;
  font-size: 0.9375rem;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.95);
}

.lead-form__status--error {
  padding: 0.625rem 0.875rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  color: #b3261e;
  font-weight: 600;
}

@media (max-width: 480px) {
  .lead-messengers__legend {
    float: none;
    width: 100%;
    margin: 0 0 0.5rem;
  }
}

@media (max-width: 768px) {
  .lead-captcha {
    margin-top: -0.5rem;
  }

  .lead-captcha altcha-widget {
    --altcha-padding: 0.875rem;
    font-size: 0.875rem;
  }
}

.lead-form__status a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: 2px;
}
