/* The print page's Generate PDF controls. Every Generate PDF control — the
   reader toolbar's, a source reader's in its breadcrumb row, and this page's
   own button — is a page action, drawn once by site.css (`.page-action`,
   guidance/corpus-browser-vision.md, "Page actions", 2026-11-17); this file
   adds only the print page's layout and its states: busy, ready, status and
   progress. Colours, focus and sizes come from the site's role tokens and the
   page's section colour. The fallbacks only cover a page opened outside the
   site. */
.native-print-actions { border-block: 1px solid var(--hairline, var(--line, #b8b0a3)); padding-block: 1rem; margin-block: 1rem; }
.native-print-actions__controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .375rem;
  margin-block: .75rem 0;
}
/* The finished PDF is the one filled control: the result, not another choice. */
.native-print-actions .native-print-actions__download {
  --page-action-surface: var(--section-ink, var(--rubric-dark, #6f2831));
  border-color: var(--section-ink, var(--rubric-dark, #6f2831));
  color: #fff;
}
.native-print-actions .native-print-actions__download:hover:not(:disabled) {
  --page-action-surface: var(--ink, #302d29);
  border-color: var(--ink, #302d29);
  color: #fff;
}
.native-print-actions [hidden] { display: none !important; }
.native-print-actions [data-native-print-status] { min-height: 1.5em; margin-block: .5rem 0; }
/* An empty status leaves no gap; the live region stays in place for later messages. */
.native-print-actions [data-native-print-status]:empty { min-height: 0; margin: 0; }
.native-print-progress { margin-block: .25rem 0; color: var(--muted, #6a635a); font-size: .9em; font-variant-numeric: tabular-nums; }
.native-print-progress:empty { display: none; }
.native-print-archive { font-size: .9em; margin-block: .75rem 0; }

/* The small popover a print link opens beside itself while it generates in
   place. The root never sets `display`, which would override the closed
   popover's (or the `hidden` fallback's) `display: none`. */
.native-print-popover {
  position: fixed;
  inset: auto;
  z-index: 1000;
  box-sizing: border-box;
  width: min(19rem, calc(100vw - 16px));
  margin: 0;
  padding: .4rem .45rem .5rem .65rem;
  border: 1px solid var(--line, #d2c8ba);
  border-radius: .3rem;
  background: var(--surface, #f8f5ef);
  box-shadow: 0 .4rem 1.2rem rgba(63, 52, 42, .16);
  color: var(--ink, #302d29);
  font: .8125rem/1.4 var(--font-ui, sans-serif);
  overflow: visible;
}
.native-print-popover__head { display: flex; align-items: center; gap: .5rem; }
.native-print-popover__status { flex: 1 1 auto; min-width: 0; margin: 0; }
.native-print-popover__amount {
  color: var(--muted, #6a635a);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.native-print-popover__amount:empty { display: none; }
.native-print-popover__action {
  color: var(--rubric-dark, #6f2831);
  font-weight: 600;
  white-space: nowrap;
}
.native-print-popover__action[hidden] { display: none; }
.native-print-popover__close {
  flex: none;
  width: 1.5rem;
  height: 1.5rem;
  padding: 0;
  border: 0;
  border-radius: .2rem;
  background: transparent;
  color: var(--muted, #6a635a);
  font: 1.15rem/1 var(--font-ui, sans-serif);
  cursor: pointer;
}
.native-print-popover__close:hover { color: var(--ink, #302d29); background: var(--line, #d2c8ba); }
.native-print-popover :is(a, button):focus-visible { outline: 2px solid var(--focus-ring, #1f5d8b); outline-offset: 1px; }
.native-print-popover__bar {
  height: 4px;
  margin-top: .3rem;
  border-radius: 2px;
  background: var(--line, #d2c8ba);
  overflow: hidden;
}
.native-print-popover__fill {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--rubric-dark, #6f2831);
  transition: width .3s ease-out;
}
.native-print-popover[data-progress="indeterminate"] .native-print-popover__fill {
  width: 35%;
  animation: native-print-sweep 1.3s ease-in-out infinite;
}
@keyframes native-print-sweep {
  from { transform: translateX(-100%); }
  to { transform: translateX(290%); }
}
.native-print-popover[data-state="error"] .native-print-popover__bar { display: none; }
.native-print-popover__hint { margin: .3rem 0 0; color: var(--muted, #6a635a); font-size: .75rem; }
.native-print-popover:not([data-state="preparing"]) .native-print-popover__hint { display: none; }
@media (prefers-reduced-motion: reduce) {
  .native-print-popover__fill { transition: none; }
  .native-print-popover[data-progress="indeterminate"] .native-print-popover__fill {
    width: 100%;
    animation: none;
    opacity: .35;
  }
}

@media (forced-colors: active) {
  .native-print-popover { border-color: CanvasText; }
  .native-print-popover__bar { border: 1px solid CanvasText; }
  .native-print-popover__fill { background: Highlight; }
  .native-print-popover :is(a, button):focus-visible { outline-color: Highlight; }
}
@media print { :is(.native-print-actions, .native-print-popover, .print-actions, .native-print-action) { display: none !important; } }
