/* Download PDF button and report layout for the budget and net-worth
   calculators (js/calculator-pdf.js). The report rules mirror
   retirement-pdf.css so all calculator PDFs look the same. */

.tb-pdf-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 12px; }
.tb-pdf-download {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; padding: 0;
  border: 0; border-radius: 7px; background: none;
  color: #2389dc; font-size: 20px; line-height: 1; cursor: pointer;
}
.tb-pdf-download:hover:not(:disabled) { background: #eaf4fd; }
.tb-pdf-download[aria-busy="true"] { cursor: progress; }
.tb-pdf-download:disabled { opacity: .55; cursor: not-allowed; }
.tb-pdf-download:focus-visible { outline: 3px solid #79b8ef; outline-offset: 3px; }
.tb-pdf-status { flex-basis: 100%; margin: 0; text-align: end; font-size: 13px; line-height: 1.4; color: #52647a; }
.tb-pdf-status:empty { display: none; }

.tb-pdf-frame {
  position: absolute; left: -10000px; top: 0; width: 794px; height: 1123px;
  border: 0; pointer-events: none;
}
body.tb-pdf-document { margin: 0; padding: 0 !important; background: white; }
.tb-pdf-document *, .tb-pdf-document *::before, .tb-pdf-document *::after {
  box-sizing: border-box; animation: none !important; transition: none !important;
}
.tb-pdf-document .tb-pdf-sheet {
  position: absolute; left: 0; top: 0; width: 794px; height: 1123px;
  margin: 0; padding: 28px 32px; background: white; overflow: hidden;
}
.tb-pdf-heading { min-width: 0; }
.tb-pdf-brand { color: #1889e8; font-size: 15px; font-weight: 650; margin-bottom: 6px; }
.tb-pdf-heading h1 { color: #0c153e; font-size: 28px; font-weight: 650; line-height: 1.25; letter-spacing: -.7px; margin: 0 0 6px; }
.tb-pdf-heading p { font-size: 13px; line-height: 1.45; color: #83858a; margin: 0; }
.tb-pdf-meta { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 14px; color: #83858a; font-size: 12px; }
.tb-pdf-meta p { margin: 0; font-size: 12px; }
.tb-pdf-currency { display: inline-block; padding: 7px 12px; border: 1px solid #e0e4ea; border-radius: 7px; color: #21262f; font-size: 13px; font-weight: 600; }
.tb-pdf-body { position: absolute; bottom: 44px; left: 32px; right: 32px; }
.tb-pdf-cards { display: flex; flex-direction: column; gap: 20px; min-width: 0; min-height: 0; }
.tb-pdf-cards > * { flex: 0 0 auto; width: 100%; margin: 0 !important; }
.tb-pdf-staging { width: 730px; }
.tb-pdf-card-fit { position: relative; }
.tb-pdf-card-fit > * { position: absolute !important; top: 0 !important; left: 0; }
.tb-pdf-footer { position: absolute; bottom: 15px; left: 32px; right: 32px; font-size: 11px; color: #83858a; }

/* Screen-only behaviour that does not belong in a static report. */
.tb-pdf-cards > *:not(.tb-pdf-card-fit) { position: relative !important; top: auto !important; }
.tb-pdf-document .section-card, .tb-pdf-document .result-panel { box-shadow: none !important; }

.tb-pdf-notes { padding: 18px 20px; border: 1px solid #e8ebf0; border-radius: 14px; background: white; }
.tb-pdf-notes h2 { font-size: 16px; font-weight: 650; color: #21262f; margin: 0 0 10px; }
.tb-pdf-notes p { font-size: 13px; line-height: 1.5; color: #7c828d; margin: 0 0 10px; }
.tb-pdf-notes p:last-child { margin: 0; }

.tb-pdf-icon-fallback { display: inline-flex; align-items: center; justify-content: center; font-size: 22px; line-height: 1; color: #30343b; }
/* Budget donut: the PDF draws the segments on a canvas because html2canvas
   cannot render conic-gradient. The ::after hole and centre text stay. */
.tb-pdf-donut-canvas { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; }
/* html2canvas fails on gradient backgrounds thinner than one canvas pixel
   (it creates a zero-height pattern). Hairline dividers become 1px in PDFs. */
.tb-pdf-document .summary-sub::before { height: 1px !important; }
