/* ROI calculator for automation 04 (Lead Generation Scraper), section #roi.
   Shared .roi-* rules come from roi.css. Every rule here is scoped under #roi. */

#roi .roi-sw-b,
#roi .roi-seg-b {
  background: var(--bone-50);
}

#roi .roi-legend {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
}

#roi .roi-legend li {
  white-space: nowrap;
}

#roi .roi-dock {
  background: var(--ink);
}

/* Wide slider: the leads row spans both columns on desktop */
#roi .lg-roi-row--wide {
  grid-column: 1 / -1;
}

/* Second line under the yearly figure: sales calls and the new pipeline they make */
#roi .lg-roi-calls {
  margin: 12px 0 0;
  font-size: 16.5px;
  line-height: 1.5;
  color: var(--bone-70);
}

/* ---------- Table: fixed layout, so the numbers never move sideways when a slider changes ---------- */

#roi .roi-table {
  table-layout: fixed;
}

#roi .roi-table thead th.roi-num,
#roi .roi-table td.roi-num {
  width: 22%;
  font-variant-numeric: tabular-nums;
}

#roi .roi-table td.roi-num {
  text-align: right;
}

/* Every "how" line reserves two lines, so the total row keeps its place when a sentence wraps */
#roi .roi-how {
  min-height: 3em;
}

/* ---------- 359px and narrower: the CTA may wrap; the yearly figure stays inside its card ---------- */

@media (max-width: 359px) {
  #roi .roi-cta .btn {
    white-space: normal;
    max-width: 100%;
    height: auto;
    padding-block: 0.75rem;
    text-align: center;
  }

  #roi .roi-year {
    font-size: 1.25rem;
    overflow-wrap: anywhere;
  }

  #roi .roi-big-n {
    font-size: 2.5rem;
    overflow-wrap: anywhere;
  }
}

/* Phones: the two numeric columns need room for "~1,440 hours" and the yearly header */
@media (max-width: 479px) {
  #roi .roi-table thead th.roi-num,
  #roi .roi-table td.roi-num {
    width: 30%;
    white-space: normal;
  }

  #roi .roi-table td.roi-num small {
    display: block;
    margin-left: 0;
  }
}

/* 359px and narrower: the docked total drops its unit so the figure is not clipped */
@media (max-width: 359px) {
  #roi .roi-dock-u {
    display: none;
  }
}

/* ---------- Layout fixes (fix round 1) ---------- */

/* The disclaimer sits under the whole calculator, as a caption no wider than 70ch, so the left
   column ends with its sliders (04-visual-08) */
#roi .roi-foot--under {
  margin-top: 24px;
  padding: 0;
  border-top: 0;
}

#roi .roi-foot--under .roi-fine {
  max-width: 70ch;
  margin-top: 0;
}

/* Results table: the two number columns keep 112px and a 24px gap from the label, so
   "~$3,450" and "~$41,400" never run into each other (04-visual-07) */
@media (min-width: 480px) {
  #roi .roi-table thead th.roi-num,
  #roi .roi-table td.roi-num {
    width: 112px;
    padding-left: 24px;
  }
}


/* The CTA sits at the foot of the inputs column, on the same line as the results panel's
   bottom edge, so the empty space under the sliders holds the next step (04-visual-08) */
#roi .roi-inputs > .roi-cta {
  margin-top: auto;
  padding: 24px 20px 28px;
  border-top: 1px solid var(--line);
}

@media (min-width: 768px) {
  #roi .roi-inputs > .roi-cta {
    padding: 28px 32px 32px;
  }
}
