/* Lead capture & tracking UI: multi-step form, consent, sticky call bar, thank-you page. */

/* ---------- Sticky mobile action bar (call · text · quote) ---------- */
.cs-sticky-bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 120;
  display: none;
  grid-template-columns: repeat(3, 1fr);
  background: var(--charcoal);
  border-top: 2px solid var(--accent);
  box-shadow: 0 -8px 24px rgba(0,0,0,.22);
}
.cs-sticky-bar a {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 8px; min-height: 52px;
  color: #fff !important; text-decoration: none !important;
  font-family: var(--font-display); text-transform: uppercase;
  letter-spacing: 1px; font-size: .95rem;
  border-right: 1px solid rgba(255,255,255,.12);
}
.cs-sticky-bar a:last-child { border-right: 0; }
.cs-sticky-bar a.cs-bar-call { background: var(--accent); }
.cs-sticky-bar a:active { opacity: .85; }
@media (max-width: 780px) {
  .cs-sticky-bar { display: grid; }
  body { padding-bottom: 56px; }
}

/* ---------- Multi-step form ---------- */
.form-error {
  background: rgba(179, 58, 58, .1);
  border: 1px solid #b33a3a;
  color: #8f2f2f;
  border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 14px; font-weight: 600;
}
html.js .cs-steps [data-cs-step="2"] { display: none; }
html.js .cs-steps [data-cs-step="2"].is-active { display: grid; }
html.js .cs-step-next { display: inline-flex; }
html:not(.js) .cs-step-next { display: none; }
.cs-steps .field label .req { color: #b33a3a; }
.cs-consent { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; line-height: 1.45; }
.cs-consent input { margin-top: 4px; }
.cs-lead-form .field input:invalid:not(:placeholder-shown) { border-color: #b33a3a; }
.cs-form-progress { height: 3px; background: var(--line); border-radius: 3px; overflow: hidden; margin: 0 0 18px; }
.cs-form-progress span { display: block; height: 100%; width: 50%; background: var(--accent); transition: width .35s ease; }
.cs-step-back {
  background: none; border: 0; color: var(--text-soft); font: inherit;
  text-decoration: underline; cursor: pointer; padding: 0; margin-right: auto;
}
html:not(.js) .cs-step-back { display: none; }

/* ---------- Thank-you page ---------- */
.cs-thanks { text-align: center; padding-block: clamp(56px, 9vw, 110px); }
.cs-thanks .cs-tick {
  width: 84px; height: 84px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-dark);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2.2rem; margin-bottom: 22px;
}
.cs-thanks h1 { margin-bottom: .3em; }
.cs-thanks .cs-next-steps {
  max-width: 720px; margin: 30px auto 0; text-align: left;
}
.cs-thanks .cs-next-steps li { padding: 8px 0; }
.cs-thanks .btn-row { justify-content: center; }

/* ---------- Lead magnet capture (used by guide pages) ---------- */
.cs-magnet {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: clamp(22px, 3vw, 34px); box-shadow: var(--shadow);
}
.cs-magnet form { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.cs-magnet .field--full { grid-column: 1 / -1; }
@media (max-width: 720px) { .cs-magnet form { grid-template-columns: 1fr; } }

/* ---------- Guides ---------- */
.cs-guide-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.cs-guide-card .checklist { margin-bottom: 18px; }
.cs-guide-body { max-width: 880px; }
.cs-guide-body h2 { margin-top: 44px; font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.cs-guide-body table.compare { margin: 20px 0 8px; }
.cs-guide-body .process-simple { padding-left: 1.2em; }
.cs-guide-body .process-simple li { padding: 6px 0; }
.cs-guide-cta { margin-top: 48px; padding-top: 34px; border-top: 1px solid var(--line); }
.cs-magnet--unlocked { border-left: 3px solid var(--accent); }
.cs-magnet--compact h3 { font-size: 1.15rem; }
@media (max-width: 1080px) { .cs-guide-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 720px) { .cs-guide-grid { grid-template-columns: 1fr; } }

/* ---------- ICF calculator ---------- */
.cs-calc { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 3vw, 30px); }
.cs-calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cs-calc-out { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 22px; }
.cs-calc-band { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; flex-wrap: wrap; }
.cs-calc-label { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 1.6px; color: var(--text-soft); font-size: .85rem; }
.cs-calc-band strong { font-family: var(--font-display); font-size: clamp(1.6rem, 3.4vw, 2.4rem); color: var(--accent-dark); }
.cs-calc-facts { display: flex; flex-wrap: wrap; gap: 10px 26px; margin: 16px 0 4px; color: var(--text-soft); font-size: .95rem; }
.cs-calc-facts b { color: var(--ink); }
@media (max-width: 720px) { .cs-calc-grid { grid-template-columns: 1fr 1fr; } }

/* ---------- Chat capture bubble (fallback when no chat embed) ---------- */
.cs-chat-bubble { position: fixed; right: 18px; bottom: 76px; z-index: 130; }
@media (min-width: 781px) { .cs-chat-bubble { bottom: 18px; } }
.cs-chat-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--charcoal); color: #fff; border: 0; cursor: pointer;
  border-radius: 999px; padding: 12px 18px; box-shadow: var(--shadow);
  font-family: var(--font-display); text-transform: uppercase; letter-spacing: 1px; font-size: .9rem;
}
.cs-chat-toggle:hover { background: var(--accent); }
.cs-chat-panel {
  position: absolute; right: 0; bottom: 58px; width: min(300px, 84vw);
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; box-shadow: var(--shadow-lg);
}
.cs-chat-panel p { margin: 0 0 10px; }
.cs-chat-panel .btn { display: flex; margin-bottom: 8px; justify-content: center; }

/* ---------- Print styles for guides ---------- */
@media print {
  .site-header, .topbar, .site-footer, .cs-sticky-bar, .cs-guide-cta, .btn-row, .cs-progress { display: none !important; }
  .cs-guide-body { max-width: none; }
  body { background: #fff; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: .8em; color: #666; }
}
