/* VALN Tools — base wrapper styles. Loads on every page that has a [valn_tool] shortcode. */

.valn-tool-wrap {
  /* Ensure sticky descendants work — never set overflow that creates a new context */
  contain: none;
  isolation: auto;
  margin: 24px 0;
  width: 100%;
}

.valn-tool-wrap > * {
  max-width: 100%;
}

/* Defensive: kill any inherited Divi text-align or font weirdness */
.valn-tool-wrap {
  text-align: left;
}

/* Anchor target for jump pills — leave room for fixed header */
.valn-tool-wrap[id] {
  scroll-margin-top: 100px;
}

/* === LEAD CAPTURE — added 2026-04-07 === */

.valn-tool-wrap .vlnLeadCapture {
  margin: 18px 0 0;
  padding: 18px;
  background: linear-gradient(135deg, rgba(11,58,164,.04), rgba(37,99,235,.06));
  border: 1.5px solid rgba(11,58,164,.12);
  border-radius: 18px;
  text-align: center;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
.valn-tool-wrap .vlnLeadCapture h4 {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 950;
  color: #0b3aa4;
  text-align: center;
}
.valn-tool-wrap .vlnLeadCapture p {
  margin: 0 0 12px;
  font-size: 13px;
  color: #475569;
  line-height: 1.6;
  text-align: center;
}
.valn-tool-wrap .vlnLeadCapture .vlnForm-row,
.valn-tool-wrap .vlnLeadCapture .vlnForm-group {
  text-align: left;
}
.valn-tool-wrap .vlnLeadCapture .vlnForm-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}
@media (max-width: 540px) {
  .valn-tool-wrap .vlnLeadCapture .vlnForm-row { grid-template-columns: 1fr; }
}
.valn-tool-wrap .vlnLeadCapture .vlnForm-group { margin-bottom: 10px; }
.valn-tool-wrap .vlnLeadCapture .vlnForm-label {
  display: block;
  font-size: 12px;
  font-weight: 800;
  color: #0f172a;
  margin-bottom: 4px;
}
.valn-tool-wrap .vlnLeadCapture .vlnForm-input {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  background: #fff;
  color: #0f172a;
  font-family: inherit;
  -webkit-appearance: none;
}
.valn-tool-wrap .vlnLeadCapture .vlnForm-input:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37,99,235,.18);
}
.valn-tool-wrap .vlnLeadCapture .vlnForm-error {
  margin: 0 0 8px;
  font-size: 12px;
  color: #b91c1c;
  font-weight: 800;
  min-height: 16px;
  text-align: center;
}
.valn-tool-wrap .vlnLeadCapture .vlnForm-error:empty { display: none; }
.valn-tool-wrap .vlnLeadCapture .vlnForm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 6px;
}

.valn-tool-wrap .vlnLeadCapture .vlnBtn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: 13px;
  font-weight: 900;
  text-decoration: none !important;
  cursor: pointer;
  min-height: 44px;
  white-space: nowrap;
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}
.valn-tool-wrap .vlnLeadCapture .vlnLeadPill {
  background: #fff !important;
  color: #166534 !important;
  -webkit-text-fill-color: #166534 !important;
  border: 1px solid rgba(22,163,74,.95) !important;
}
.valn-tool-wrap .vlnLeadCapture .vlnLeadPill:hover {
  background: #16a34a !important;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
}
.valn-tool-wrap .vlnLeadCapture .vlnBtn-success {
  background: #16a34a;
  border-color: #16a34a;
  color: #fff !important;
  -webkit-text-fill-color: #fff !important;
  box-shadow: 0 6px 16px rgba(15,23,42,.12);
}
.valn-tool-wrap .vlnLeadCapture .vlnBtn-success:hover {
  background: #15803d;
  border-color: #15803d;
}
.valn-tool-wrap .vlnLeadCapture .vlnBtn-success[disabled] {
  opacity: .6;
  cursor: not-allowed;
}
.valn-tool-wrap .vlnLeadCapture .vlnBtn-ghost {
  background: #fff;
  color: #64748b !important;
  -webkit-text-fill-color: #64748b !important;
  border: 1px solid #cbd5e1;
}
.valn-tool-wrap .vlnLeadCapture-note {
  margin: 10px 0 0;
  font-size: 11px;
  color: #64748b;
  font-weight: 700;
  line-height: 1.5;
  text-align: center;
}

.valn-tool-wrap .vlnHpWrap {
  position: absolute !important;
  left: -10000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

.valn-tool-wrap .vlnLeadSuccess {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 14px;
  padding: 22px 18px;
  text-align: center;
  color: #14532d;
  font-size: 14px;
  line-height: 1.55;
}
.valn-tool-wrap .vlnLeadSuccess .vlnLeadSuccess-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #16a34a;
  color: #fff;
  font-size: 28px;
  font-weight: 900;
  margin-bottom: 10px;
}
.valn-tool-wrap .vlnLeadSuccess strong {
  display: block;
  font-size: 16px;
  color: #14532d;
  margin-bottom: 4px;
}
.valn-tool-wrap .vlnLeadSuccess .vlnBtn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 12px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid #cbd5e1;
  background: #fff;
  color: #1d4ed8 !important;
  font-weight: 900;
  font-size: 13px;
  text-decoration: none !important;
}
.valn-tool-wrap .vlnLeadSuccess .vlnBtn-secondary:hover {
  border-color: rgba(37,99,235,.55);
  background: #eff6ff;
}

/* === FIX #3: Force white text on blue primary CTAs (theme leak override) === */
.valn-tool-wrap .vlnBtn-primary,
.valn-tool-wrap a.vlnBtn-primary,
.valn-tool-wrap a.vlnBtn-primary:link,
.valn-tool-wrap a.vlnBtn-primary:visited,
.valn-tool-wrap a.vlnBtn-primary:hover,
.valn-tool-wrap a.vlnBtn-primary:active,
.valn-tool-wrap a.vlnBtn-primary:focus,
.valn-tool-wrap button.vlnBtn-primary,
.valn-tool-wrap .vlnNextLink,
.valn-tool-wrap a.vlnNextLink:link,
.valn-tool-wrap a.vlnNextLink:visited,
.valn-tool-wrap a.vlnNextLink:hover {
  background: #0b3aa4 !important;
  color: #ffffff !important;
  -webkit-text-fill-color: #ffffff !important;
  border-color: #0b3aa4 !important;
  text-decoration: none !important;
}
