/* === MailerLite embed overrides ==============================
   The freebie form is rendered by MailerLite's universal.js into
   .ml-embedded[data-form]. MailerLite scopes its styles under a
   dynamic #mlb2-NNNN ID with selectors like:
     #mlb2-NNN.ml-form-embedContainer .ml-form-embedWrapper
       .ml-form-embedBody .ml-form-embedSubmit button   → (1,4,1)
   To win we mirror its full descendant chain (under our #freebie
   section ID) so every rule lands at (1,5,1)+ and outranks it.
   Goal: clean stacked form — cream pill input + terra pill button.
============================================================== */
#freebie .ml-embed-wrap { max-width: 100%; margin: 0; }

/* Strip MailerLite's wrapper chrome (backgrounds, borders, padding) */
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedContainer,
#freebie .ml-embed-wrap .ml-embedded .ml-form-align-center,
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper,
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  padding: 0 !important;
  margin: 0 auto !important;
  width: 100% !important;
  max-width: 100% !important;
  text-align: center !important;
}

/* Hide MailerLite's own title/description — we have our own copy above */
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedContent {
  display: none !important;
}

/* Form layout — stacked, centered */
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper form.ml-block-form,
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-formContent {
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
}
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow {
  margin: 0 0 12px 0 !important;
  padding: 0 !important;
  width: 100% !important;
}
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow .ml-field-group {
  width: 100% !important;
}

/* Email input → cream pill */
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input.form-control,
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input[type="email"] {
  width: 100% !important;
  padding: 14px 22px !important;
  border: 1.5px solid var(--line-warm) !important;
  border-radius: 14px !important;
  background: var(--warm-white) !important;
  font-family: inherit !important;
  font-size: 15px !important;
  color: var(--ink) !important;
  font-weight: 400 !important;
  min-height: 50px !important;
  box-shadow: none !important;
  text-align: center !important;
}
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input.form-control:focus {
  outline: none !important;
  border-color: var(--terra) !important;
}
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-fieldRow input.form-control::placeholder {
  color: var(--ink-faint) !important;
}

/* Submit → terra pill button (full width, below input) */
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit {
  margin: 0 !important;
  width: 100% !important;
}
/* Only target button.primary for display — the sibling .loading
   button must keep its inline display:none until submit, so we
   never set `display` on the generic/loading button. */
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button.primary {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;
  padding: 14px 30px !important;
  border-radius: 14px !important;
  background: var(--terra) !important;
  color: #fff !important;
  font-family: inherit !important;
  font-size: 15px !important;
  font-weight: 700 !important;
  border: none !important;
  cursor: pointer !important;
  min-height: 50px !important;
  box-shadow: none !important;
  transition: background 0.18s, transform 0.18s !important;
}
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button.primary:hover {
  background: var(--terra-hover) !important;
  transform: translateY(-1px) !important;
}
/* Loading-state button (spinner shown only while submitting) — brand
   its shape + color, but do NOT set display (preserve inline none). */
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button.loading {
  width: 100% !important;
  padding: 14px 30px !important;
  border-radius: 14px !important;
  background: var(--terra) !important;
  color: #fff !important;
  border: none !important;
  min-height: 50px !important;
  box-shadow: none !important;
  text-align: center !important;
  font-size: 0 !important;
}
/* While submitting, MailerLite swaps the button for this one with a
   spinner. Hide the spinner and show the same label so the click looks
   seamless (no "weird" loading bubble). We never set `display` here —
   MailerLite toggles that inline on submit. */
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button.loading .ml-form-embedSubmitLoad {
  display: none !important;
}
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-embedBody .ml-form-embedSubmit button.loading::after {
  content: "Quiero el ejercicio gratis";
  font-family: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
}

/* Success message (shown if not redirecting) */
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-successBody {
  text-align: center !important;
  padding: 0 !important;
}
#freebie .ml-embed-wrap .ml-embedded .ml-form-embedWrapper .ml-form-successBody .ml-form-successContent h4 {
  font-family: inherit !important;
  color: var(--ink) !important;
}
