/* PPDG-3R generator (paperwork/capital_gains) — a four-step wizard:
   Загрузка → Проверка → Расчёт → Готово. It shares the wizard chrome (stepper,
   panels, drop-zone, field-grid, review table, calc blocks, alert, loading,
   next-steps) with the PP-OPO generator: those classes live in pp_opo.css and are
   keyed on `.wizard`, so this page reuses them by wrapping its markup in `.wizard`.
   Only the capital-gains-specific bits (the two summary blocks on step 3) live
   here. */

.ppdg-3r {
  margin: 8px 0 12px;
}

/* The supporting-document name spans the row via the shared .field--wide. */

/* On step 2 the limitations note sits above the trades table, so give the table
   room below it (.wizard__details only carries a top margin). */
.wizard__details + .review {
  margin-top: 16px;
}

/* ===== Skipped-instruments warning (step 2) =========================== */
/* Amber banner (vs. the red .wizard__alert): the parse succeeded, but some
   non-stock trades were skipped and must be declared manually. Hidden via the
   global `.wizard [hidden]` rule until the response reports skipped categories. */
.wizard__warning {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: 0 0 18px;
  padding: 14px 16px;
  background: var(--warn-bg);
  border: 1px solid var(--warn-border);
  border-radius: var(--radius);
}

.wizard__warning-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  border-radius: 50%;
  background: var(--warn);
  color: #fff;
  font-size: 14px;
  font-weight: 800;
}

.wizard__warning p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--warn-text);
}

/* ===== Summary blocks (step 3) ======================================== */
/* Two .calc blocks (styled in pp_opo.css): a profit block with a projected tax
   and, when there are losses, a loss block. A coloured left edge distinguishes
   them, and the loss block is spaced from the profit block above it. */
.calc--profit {
  border-left: 3px solid var(--success);
}

.calc--loss {
  margin-top: 14px;
  border-left: 3px solid var(--danger);
}

.calc + .form-hint {
  margin-top: 14px;
}

/* The gross-profit figure (green) and the summed loss (red). The tax total keeps
   the neutral emphasis from .calc__row--total rather than reading as a gain. */
.calc__val--gain {
  color: var(--success);
}

.calc__val--loss {
  color: var(--danger);
}

.calc--profit .calc__row--total .calc__val {
  color: var(--text);
}

.calc--loss .calc__row--total .calc__val {
  color: var(--danger);
}

/* Carry-forward footnote under the summed loss. */
.calc__note {
  margin: 12px 0 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--muted-2);
}

/* ===== Signed-out nudge =============================================== */
.ppdg-3r .signin-nudge p {
  text-align: left;
  margin-bottom: 0;
}
