/**
 * GAST CRM website lead form.
 *
 * The form sits on a light "card" that floats on whatever background it is
 * placed on (the dark wine contact section, or a light page via the shortcode).
 * Putting every field on a light card means labels and inputs are always dark
 * ink on a pale ground: maximum readability, and a calm, premium feel with
 * room to breathe. Inherits theme tokens from main.css.
 */

.lead-form {
  width: 100%;
  margin: 0 auto;
  text-align: left;
  background: #fbf3ee;
  border-radius: 20px;
  padding: clamp(1.5rem, 4vw, 2.75rem);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

/* Let the card breathe wider than the 60ch text column of the contact section. */
.contact-inner:has(.lead-form) {
  max-width: 680px;
}

.lead-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem;
}

.lead-form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.lead-form-field label {
  font-size: 0.92rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text, #2c1316);
}

.lead-form-field input,
.lead-form-field textarea {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1.5px solid #e0cec3;
  border-radius: 11px;
  background: #fff;
  color: var(--text, #2c1316);
  font-family: var(--font-body);
  font-size: 1.02rem;
  line-height: 1.5;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.lead-form-field textarea {
  resize: vertical;
  min-height: 7rem;
}

.lead-form-field input::placeholder,
.lead-form-field textarea::placeholder {
  color: #a98f86;
}

.lead-form-field input:hover,
.lead-form-field textarea:hover {
  border-color: var(--accent, #7a1d2a);
}

.lead-form-field input:focus,
.lead-form-field textarea:focus {
  outline: none;
  border-color: var(--accent, #7a1d2a);
  box-shadow: 0 0 0 3px rgba(122, 29, 42, 0.16);
}

/* Honeypot: kept in the layout flow off-screen so bots see a normal field. */
.lead-form-hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.lead-form-consent {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.92rem;
  color: var(--muted, #5a423d);
  line-height: 1.55;
  text-align: left;
}

.lead-form-consent input {
  margin-top: 0.15rem;
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  accent-color: var(--accent, #7a1d2a);
  cursor: pointer;
}

.lead-form-consent a {
  color: var(--accent, #7a1d2a);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-weight: 500;
}

.lead-form-submit {
  align-self: stretch;
  margin-top: 0.4rem;
  padding: 0.95rem 2rem;
  font-size: 1.05rem;
  font-weight: 600;
  background: var(--accent, #7a1d2a);
  color: #fff;
  border: none;
  border-radius: 11px;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease;
}

.lead-form-submit:hover {
  background: #8f2231;
}

.lead-form-submit:active {
  transform: translateY(1px);
}

@media (min-width: 561px) {
  .lead-form-submit {
    align-self: flex-start;
    padding-inline: 2.6rem;
  }
}

/* Flash messages (post-redirect-get result), shown above the card. */
.lead-form-flash {
  width: 100%;
  max-width: 680px;
  margin: 0 auto 1.25rem;
  padding: 0.95rem 1.2rem;
  border-radius: 12px;
  font-size: 1rem;
  line-height: 1.5;
  text-align: left;
}

.lead-form-flash--ok {
  background: #fbf3ee;
  border-left: 4px solid #2e7d4f;
  color: var(--text, #2c1316);
}

.lead-form-flash--err {
  background: #fbf3ee;
  border-left: 4px solid var(--accent, #7a1d2a);
  color: var(--text, #2c1316);
}

@media (max-width: 560px) {
  .lead-form-row {
    grid-template-columns: 1fr;
  }
}

/* Light-page variant (the [gast_lead_form] shortcode): a touch more definition
   so the white-ish card reads against a pale page instead of a dark section. */
.lead-form--light {
  background: #fff;
  border: 1px solid var(--border, #cfb3a6);
  box-shadow: 0 10px 30px rgba(44, 19, 22, 0.08);
}

.lead-form--light .lead-form-field input,
.lead-form--light .lead-form-field textarea {
  background: #fdf8f5;
}
