/* Matches the site's existing form look (filled pale-green pill inputs,
   solid dark-green button) so these forms read correctly out of the box on
   any page — including image-heavy hero sections where a border-only,
   transparent input is effectively invisible. Still override-friendly:
   everything here is a plain class selector with no !important, so theme
   or page-specific CSS can still win on specificity/source order if needed. */

.dlf-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.dlf-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

/* Labels stay in the DOM (screen readers still announce them and they keep
   the label/input "for" association) but aren't shown visually — the field
   name lives in the placeholder instead, matching the site's existing form.
   Standard visually-hidden pattern: clipped to 1px, not display:none (which
   assistive tech would skip entirely). */
.dlf-field label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.dlf-field input,
.dlf-field select,
.dlf-field textarea {
  padding: 14px 20px;
  border: none;
  border-radius: 999px;
  font-size: 14px;
  font-family: inherit;
  background: #e7f0e4;
  color: #2e3b2e;
}

.dlf-field textarea {
  border-radius: 20px;
  resize: vertical;
}

.dlf-field input::placeholder,
.dlf-field textarea::placeholder {
  color: #6b7a6b;
}

.dlf-field input:focus,
.dlf-field select:focus,
.dlf-field textarea:focus {
  outline: 2px solid #2e7d32;
  outline-offset: 1px;
}

/* Two fields per row on wider screens (matches the site's Phone/Zip pairing)
   — falls back to stacked on narrow viewports via the media query below. */
.dlf-row {
  display: flex;
  gap: 14px;
}

.dlf-row .dlf-field {
  flex: 1;
  min-width: 0;
}

@media (max-width: 420px) {
  .dlf-row {
    flex-direction: column;
  }
}

/* Off-screen rather than display:none — some spam bots specifically skip
   display:none/visibility:hidden fields, defeating the honeypot's purpose. */
.dlf-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.dlf-submit-btn {
  position: relative;
  padding: 16px 24px;
  border: none;
  border-radius: 8px;
  background: #1e5c31;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background-color 0.15s ease;
}

.dlf-submit-btn:hover:not(:disabled) {
  background: #164725;
}

.dlf-submit-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* Button text hides in place (no layout shift) and a centered spinner takes
   over — covers the whole wait, including the invisible-reCAPTCHA check that
   runs before the fetch even starts, which is most of the "quiet" gap. */
.dlf-submit-btn.dlf-submitting {
  color: transparent;
}

.dlf-submit-btn.dlf-submitting::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 16px;
  height: 16px;
  margin: -8px 0 0 -8px;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: dlf-spin 0.6s linear infinite;
}

@keyframes dlf-spin {
  to {
    transform: rotate(360deg);
  }
}

.dlf-status {
  font-size: 13px;
  min-height: 18px;
}

.dlf-status-success {
  color: #1e5c31;
}

.dlf-status-error {
  color: #b91c1c;
}

.dlf-form[data-variant="front"] .dlf-status {
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.dlf-form[data-variant="front"] .dlf-status-success {
  color: #a5d6a7;
}

.dlf-form[data-variant="front"] .dlf-status-error {
  color: #ff8a80;
}
