/* =====================================================================
   TandT Forms — front-end styles.
   Uses the TandT LLC theme's CSS custom properties when available (with
   sensible fallbacks), so forms match the site automatically when the
   theme is active, and still look clean on any other theme.
   ===================================================================== */

.tandt-forms-wrap {
  --_primary: var(--tandt-primary, #146C94);
  --_navy: var(--tandt-navy, #0F4C64);
  --_border: var(--tandt-border, #D3E3EA);
  --_text: var(--tandt-text, #1F2937);
  --_radius: var(--tandt-radius-sm, 4px);
  --_error: #C0392B;
  --_success-bg: #E8F5EE;
  --_success-text: #1E5A3A;
  --_error-bg: #FCEAEA;
  max-width: 640px;
}

.tandt-forms-notice {
  padding: 0.9em 1.1em;
  border-radius: var(--_radius);
  margin-bottom: 1.2em;
  font-size: 0.95rem;
}
.tandt-forms-notice--success { background: var(--_success-bg); color: var(--_success-text); border: 1px solid #B7E0C7; }
.tandt-forms-notice--error { background: var(--_error-bg); color: var(--_error); border: 1px solid #F2C2C2; }

.tandt-forms-field { margin-bottom: 1.1em; }
.tandt-forms-field label {
  display: block;
  font-weight: 600;
  font-size: 0.92rem;
  margin-bottom: 0.4em;
  color: var(--_text);
}
.tandt-forms-field input[type="text"],
.tandt-forms-field input[type="email"],
.tandt-forms-field input[type="tel"],
.tandt-forms-field select,
.tandt-forms-field textarea {
  width: 100%;
  padding: 0.75em 1em;
  border: 1px solid var(--_border);
  border-radius: var(--_radius);
  font-family: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--_text);
}
.tandt-forms-field input:focus,
.tandt-forms-field select:focus,
.tandt-forms-field textarea:focus {
  outline: 3px solid var(--_primary);
  outline-offset: 1px;
}
.tandt-forms-checkbox-label { display: flex; align-items: flex-start; gap: 0.6em; font-weight: 400; }
.tandt-forms-checkbox-label input { margin-top: 0.25em; }

.tandt-forms-field.has-error input,
.tandt-forms-field.has-error select,
.tandt-forms-field.has-error textarea { border-color: var(--_error); }
.tandt-forms-field-error {
  display: block;
  color: var(--_error);
  font-size: 0.85rem;
  margin-top: 0.35em;
}

/* Honeypot — visually hidden but not display:none (some bots skip
   display:none fields specifically), kept out of tab order. */
.tandt-forms-honeypot {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
}

.tandt-forms-submit {
  background: var(--_primary);
  color: #fff;
  border: 2px solid var(--_primary);
  border-radius: var(--_radius);
  padding: 0.85em 1.8em;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 160ms ease, transform 160ms ease;
}
.tandt-forms-submit:hover { background: var(--_navy); border-color: var(--_navy); transform: translateY(-1px); }
.tandt-forms-submit:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.tandt-forms-admin-note {
  background: #FFF6DA;
  border: 1px solid #F0DDA0;
  color: #7A5B00;
  padding: 0.8em 1em;
  border-radius: 4px;
  font-size: 0.9rem;
}
