/* ==========================================================================
   Poticaj za neovisne — print. Loaded with media="print".
   Forces the light tokens on plain paper, hides the app chrome, A4 margins.
   Helpers: .nz-print-only (shown only when printing) and .nz-no-print.
   Documented exception to "colours come from tokens.css": paper is printed with
   literal Aning ink-ramp greys (#0E0E0E, #3A3A40, #5C5C66, #B5B5BD), white and
   Aning red #8B1A1A, whatever theme is on screen (tests/skin.test.mjs).
   ========================================================================== */

@page {
  size: A4;
  margin: 16mm 15mm 18mm;
}

/* Light tokens regardless of the chosen theme; white paper, no tints. The slate
   footer band prints as plain paper too (its tokens are re-pointed here). */
:root,
html.theme-dark,
html.theme-light,
html.theme-auto {
  color-scheme: light;
  --ink: #ffffff;
  --ink-deep: #ffffff;
  --paper: #0e0e0e;
  --paper-dim: #3a3a40;
  --muted: #5c5c66;
  --rule: #b5b5bd;
  --rule-strong: #b5b5bd;
  --panel: #ffffff;
  --red: #8b1a1a;
  --red-deep: #8b1a1a;
  --text: #0e0e0e;
  --text-dim: #3a3a40;
  --red-text: #8b1a1a;
  --red-fill: #8b1a1a;
  --focus: #8b1a1a;
  --red-soft: transparent;
  --ok-text: #3a3a40;
  --surface: #ffffff;
  --code-bg: #ffffff;
  --field-bg: #ffffff;
  --band: #ffffff;
  --on-band: #0e0e0e;
  --on-band-dim: #3a3a40;
  --band-red: #8b1a1a;
  --band-rule: #b5b5bd;
  --logo-on-dark: none;
  --logo-on-light: inline-block;
}

html,
body {
  background: #ffffff !important;
  color: #0e0e0e;
  font-size: 10.5pt;
  line-height: 1.45;
}

*,
*::before,
*::after {
  box-shadow: none !important;
  text-shadow: none !important;
  animation: none !important;
  transition: none !important;
}

/* Plain backgrounds: no panels, gradients or blurs on paper. */
.nz-card,
.nz-callout,
.nz-accent,
.nz-tile,
.nz-modal__dialog,
.nz-band {
  background: #ffffff !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}

/* Hide the app chrome */
.nz-skip,
.nz-nav,
.nz-tabbar,
.nz-theme,
.nz-masthead__meta,
.nz-footer__base,
.nz-modal__backdrop,
.nz-modal__actions,
.nz-no-print,
button.nz-btn,
.nz-btn--ghost {
  display: none !important;
}

.nz-print-only {
  display: revert !important;
}

/* Keep only a slim brand line on top of the first page. */
.nz-masthead__inner {
  min-height: 0;
  padding-block: 0 8mm;
}
.nz-brand__logo img {
  height: 16px;
}
.nz-brand__name {
  font-size: 15pt;
}

.nz-main {
  min-height: 0;
  padding: 0 !important;
}

.nz-container {
  max-width: none;
  padding-inline: 0;
}

/* The footer prints only its disclaimer and facts, as a closing note. */
.nz-footer {
  padding: 0 !important;
  margin-top: 8mm;
  break-inside: avoid;
}
.nz-footer__inner {
  padding-block: 6mm 0;
}
.nz-footer__disclaimer {
  font-size: 11pt;
}

.nz-display-xl {
  font-size: 30pt;
}
.nz-display-lg {
  font-size: 22pt;
}

h1,
h2,
h3,
h4 {
  break-after: avoid;
}
table,
.nz-row,
.nz-tile,
.nz-card,
.nz-callout,
figure {
  break-inside: avoid;
}
thead {
  display: table-header-group;
}
.nz-table-wrap {
  overflow: visible !important;
}

/* External links print their address. */
.nz-prose a[href^='http']::after {
  content: ' (' attr(href) ')';
  font-size: 0.85em;
  color: #3a3a40;
  overflow-wrap: anywhere;
}

/* A modal that is open when printing prints alone, full width. */
html.nz-lock #nz-app {
  display: none !important;
}
.nz-modal {
  position: static !important;
  padding: 0 !important;
}
.nz-modal__dialog {
  width: 100% !important;
  max-height: none !important;
  border: 0 !important;
  opacity: 1 !important;
  transform: none !important;
}
.nz-modal__body {
  overflow: visible !important;
  padding: 0 !important;
}
