/* LBSA UI kit - print. Link it last; it changes nothing on screen. Needs lbsa-tokens.css.
   Paper is light whatever the screen theme: the first block puts every token that the dark theme overrides back to its light value (the list is
   checked against lbsa-tokens.css by PrintTokensTests, so a token added to the dark block fails the test run until its :root line is copied here). Then: no shell, no controls, table headers repeat on every
   page, cards and rows do not break, and external links show their address. .lb-print-only shows only on paper; .lb-no-print hides on paper. */

.lb-print-only { display: none; }

@media print {
  :root, :root[data-theme], :root[data-theme="dark"] {
    color-scheme: light;
    --lb-bg: #f3f5f8;
    --lb-surface: #ffffff;
    --lb-surface-2: #f8fafc;
    --lb-surface-3: #eef2f6;
    --lb-sunken: #eaeef3;
    --lb-text: #0b1017;
    --lb-text-2: #2b3544;
    --lb-muted: #5a6576;
    --lb-dim: #606b7c;
    --lb-border: #e2e7ee;
    --lb-border-2: #d3dae4;
    --lb-border-3: #b9c3d0;
    --lb-accent-text: #ad4c08;
    --lb-accent-soft: rgba(255, 138, 31, .12);
    --lb-accent-soft-2: rgba(255, 138, 31, .2);
    --lb-success: #1f9d63;
    --lb-success-ink: #136b42;
    --lb-success-soft: #e3f5ec;
    --lb-warning: #d98a00;
    --lb-warning-ink: #8a5300;
    --lb-warning-soft: #fdf2dc;
    --lb-danger: #d64545;
    --lb-danger-ink: #a12a2a;
    --lb-danger-soft: #fbe6e6;
    --lb-info: #1f7fd1;
    --lb-info-ink: #175f9e;
    --lb-info-soft: #e3f0fb;
    --lb-neutral-soft: #eef1f5;
    --lb-price: #d9600b;
    --lb-overlay: rgba(9, 13, 20, .46);
    --lb-shadow-1: 0 1px 2px rgba(11, 16, 23, .05), 0 1px 1px rgba(11, 16, 23, .03);
    --lb-shadow-2: 0 1px 2px rgba(11, 16, 23, .04), 0 8px 24px -14px rgba(11, 16, 23, .22);
    --lb-shadow-3: 0 2px 6px rgba(11, 16, 23, .06), 0 24px 48px -22px rgba(11, 16, 23, .38);
    --lb-shadow-pop: 0 12px 32px -12px rgba(11, 16, 23, .32), 0 2px 8px rgba(11, 16, 23, .08);
    --lb-nav-bg: #0b1017;
    --lb-nav-bg-2: #121a25;
    --lb-skeleton: linear-gradient(90deg, #eef1f5 0%, #f7f9fb 50%, #eef1f5 100%);
  }

  @page { margin: 14mm; }
  :root { print-color-adjust: exact; -webkit-print-color-adjust: exact; }
  html, body { background: var(--lb-surface); color: var(--lb-text); }
  .lb-print-only { display: revert; }

  /* no chrome: the page is the document */
  .lb-skip, .lb-shell .lb-shell__side, .lb-shell__drawer, .lb-topbar, .lb-bottombar, .lb-banner, .lb-conn--strip, .lb-routeprogress, .lb-toasts, .lb-envribbon,
  .lb-pagehead__actions, .lb-pagehead__tabs, .lb-section__actions, .lb-toolbar, .lb-sidepanel__handle, .lb-no-print, #blazor-error-ui { display: none; }
  .lb-shell { display: block; background: var(--lb-surface); transition: none; }
  .lb-shell__col, .lb-sidepanel-host { display: block; min-block-size: 0; }
  .lb-page { max-inline-size: none; padding: 0; gap: 12px; animation: none; }
  .lb-pagehead.is-sticky { position: static; margin: 0; padding: 0; border: 0; background: none; }
  .lb-scroll-x, .lb-scroll-y { overflow: visible; max-inline-size: none; max-block-size: none; }
  .lb-sidepanel { position: static; inline-size: auto; max-block-size: none; box-shadow: none; animation: none; }

  /* paper */
  .lb-card, .lb-box, .lb-section, .lb-stat, .lb-state, figure, .lb-split__detail { break-inside: avoid; box-shadow: none; }
  h1, h2, h3, h4 { break-after: avoid; }
  table { inline-size: 100%; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }
  tr, img, svg, canvas { break-inside: avoid; }
  .lb-pop, .lb-dialog, .lb-cmdk { display: none; }
  *, *::before, *::after { animation: none; transition: none; backdrop-filter: none; }

  /* a link to another site shows where it goes; links inside the app and the buttons do not */
  .lb-shell__main a[href^="http"]:not(.lb-btn):not([class*="lb-nav"])::after { content: " (" attr(href) ")"; color: var(--lb-muted); font-size: .85em; overflow-wrap: anywhere; }
}
