/* Order confirmation cost calculator (/tools/confirmation-cost/), linked only on that page.
   Builds on the profit calculator's .calc styles in styles.css; everything here is scoped to .cf or .cf-report. */

.cf { scroll-margin-top: 96px; } /* "Load the worked example" scrolls here, clear of the sticky nav */
.cf .calc__box:not(.has-unit) .calc__zero { inset-inline-end: 14px; }
/* The keyword H1 is long: a smaller floor keeps it to two lines on phones. */
.cf-page .calc-page__title { font-size: clamp(27px, 7vw, 108px); }
.cf-page .tools-page__lead, .cf-page .calc-guide li, .cf__cta p { text-wrap: balance; }
/* Empty result: placeholders already say "nothing yet", so keep full contrast instead of dimming. */
.calc.cf.is-empty .calc__card, .calc.cf.is-empty .cf__pair, .calc.cf.is-empty .cf__scroll { opacity: 1; }
.cf-page .calc-guide p { text-wrap: balance; }
/* "The method you use now": three pill radios (no select, so no native arrow) */
.cf__current { display: grid; gap: 8px; border: 0; margin: 0; padding: 0; min-width: 0; }
.cf__current legend { padding: 0 0 8px; font-weight: 500; }
.cf__opts { display: flex; flex-wrap: wrap; gap: 8px; }
.cf__opt { position: relative; display: inline-flex; }
.cf__opt input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; }
.cf__opt span { display: inline-flex; align-items: center; min-height: 44px; padding: 0 18px; border: 1px solid var(--rule-strong); border-radius: 999px; background: var(--paper); color: var(--ink); font-weight: 500; }
.cf__opt input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.cf__opt input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.cf__gnote { clear: both; margin: -6px 0 18px; padding: 10px 14px; border-inline-start: 3px solid var(--blue); background: var(--paper-2); color: var(--ink-2); font-size: 14px; line-height: 1.5; text-wrap: balance; }

/* verdict: one line, only what the numbers show */
.cf__verdict { padding-bottom: 18px; font-size: clamp(19px, 1.7vw, 23px); font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; text-wrap: balance; }
.cf__verdict:empty { display: none; }
.cf__verdict[data-state="needBase"], .cf__verdict[data-state="needMethod"] { font-size: 16px; font-weight: 500; color: var(--on-dark-muted); }
[dir="rtl"] .cf__verdict { letter-spacing: 0; line-height: 1.6; }
.cf__verdict bdi { font-variant-numeric: tabular-nums; }

/* net effect per method */
.cf .cf__pair { border-top: 1px solid var(--line-d); }
.cf .cf__card { border-top: 0; }
.cf .cf__card .calc__n[data-sign="pos"] { color: var(--pos); }

/* comparison table: rows are results, columns are methods */
.cf__scroll { overflow-x: auto; border-top: 1px solid var(--line-d); padding-block: 14px 8px; margin-bottom: 4px; }
.cf__table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
.cf__table caption { caption-side: top; text-align: start; padding-bottom: 8px; color: var(--on-dark-muted); font-size: 12.5px; }
.cf__table th, .cf__table td { padding: 8px 0; border-bottom: 1px dashed var(--line-d); vertical-align: baseline; }
.cf__table thead th { font-size: 12.5px; font-weight: 600; color: var(--on-dark); border-bottom: 1px solid var(--line-d); vertical-align: bottom; }
.cf__table thead th.is-off { color: var(--on-dark-muted); }
.cf__table tbody th { text-align: start; font-weight: 400; color: var(--on-dark-muted); line-height: 1.35; padding-inline-end: 10px; text-wrap: balance; }
.cf__table tbody td, .cf__table thead th { text-align: end; white-space: nowrap; padding-inline-start: 10px; width: 1%; } /* number columns shrink to fit, labels take the rest */
.cf__table td { font-weight: 600; color: var(--on-dark); }
.cf__row--net th, .cf__row--net td { border-bottom: 0; padding-top: 12px; }
.cf__row--net th { color: var(--on-dark); font-weight: 600; }
.cf__row--net td { font-size: 16px; }
.cf__table td[data-sign="pos"] { color: var(--pos); }
.cf__table td[data-sign="neg"] { color: var(--neg); }
@media (max-width: 480px) {
  .cf__table { font-size: 13px; }
  .cf__table tbody td, .cf__table thead th { padding-inline-start: 6px; }
  .cf__table thead th[data-col] { white-space: normal; } /* phones: "No confirmation" may take two lines so labels keep room */
  .cf .cf__pair { grid-template-columns: minmax(0, 1fr); }
}

.cf__cta { margin-top: clamp(32px, 5vw, 56px); }
.cf__cta .ico--wa { width: 18px; height: 18px; fill: currentColor; }

/* PDF report (print only; shell and band styles come from .calc-report in styles.css) */
@media print {
  .cf-report__results { display: grid; gap: 10px; padding: 14px 16px; border: 1.5px solid var(--ink); border-radius: 10px; }
  .cf-report__results .cf__verdict { padding: 0; font-size: 13pt; color: var(--ink); }
  .cf-report__pair { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
  .cf-report__pair .calc__card { padding: 0; border: 0; }
  .cf-report__pair .calc__n { font-size: 18pt; }
  .cf-report__table .cf__table { font-size: 8.5pt; }
  .cf-report__table .cf__table th, .cf-report__table .cf__table td { padding: 3px 0 3px 8px; color: var(--ink); }
  .cf-report__table .cf__table caption { color: var(--muted); font-size: 8pt; }
  .cf-report__table .cf__table tbody th { color: #3a3a3f; }
  .calc-report .cf__table td[data-sign="pos"] { color: var(--pos); }
  .calc-report .cf__table td[data-sign="neg"] { color: var(--neg); }
}
