/* s-receipt.css: the receipt printed from the navbar Download item.
   Reuses .rcpt-stage / .rcpt-tilt / .rcpt-feed / .receipt / .rc-* from home.css (paper, zigzag edge, rcpt-print keyframes). */

.rcpt-root {
  --rcpt-top: calc(var(--header-h, 56px) + var(--sai-t, 0px) - 1px);
  --rcpt-ratio: 2.45;
  --rcpt-w: clamp(280px, min(92vw, 420px, (100svh - var(--rcpt-top) - 40px) / var(--rcpt-ratio)), 420px);
  position: fixed; z-index: 90;
  top: var(--rcpt-top);
  left: var(--rcpt-left, calc(50% - var(--rcpt-w) / 2));
  width: var(--rcpt-w);
  pointer-events: none;
}
.rcpt-root[hidden] { display: none; }
html.rcpt-open.nav-hidden .site-header { transform: none !important; visibility: visible !important; }

/* printer slot: black bar welded to the bottom edge of the navbar */
.rcpt-slot {
  position: relative; z-index: 3; height: 14px;
  background: #000; border: 1px solid rgba(255, 255, 255, 0.22); border-top: 0;
  box-shadow: 0 6px 10px rgba(0, 0, 0, 0.22);
}
.rcpt-slot::after {
  content: ""; position: absolute; left: 10px; right: 10px; bottom: 3px; height: 4px;
  background: #1c1c1e; box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.9), 0 1px 0 rgba(255, 255, 255, 0.12);
}

.rcpt-dialog {
  position: relative; z-index: 1; pointer-events: auto; margin-top: -4px; padding-top: 4px;
  max-height: calc(100svh - var(--rcpt-top) - 14px - 12px);
  overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  outline: none;
}
.rcpt-dialog .rcpt-stage { width: 100%; margin: 0; padding-bottom: 0; }
.rcpt-dialog .rcpt-tilt { transform: none; transition: none; cursor: auto; margin-top: 0; }

/* tight rhythm so the whole receipt is shorter (ratio ~2.4) */
.rcpt-dialog .receipt { line-height: 1.28; padding-block: 1.8em 2em; border-radius: 0; }
.rcpt-dialog .receipt::after, .rcpt-dialog .rc-cv .btn { border-radius: 0; }
.rcpt-dialog .rc-rule { margin: 0.55em 0; }
.rcpt-dialog .rc-items > li + li { margin-top: 0.4em; }
.rcpt-dialog .rc-barcode { height: 2.6em; }
.rcpt-dialog .rc-mail a { padding-block: 0.3em; }
.rcpt-dialog .rc-total .rc-grand { margin-bottom: 0; }
.rcpt-dialog .rc-cv .btn { min-height: 44px; }

/* [CLOSE]: square, 44px, on the paper's top-right corner */
.rcpt-close {
  position: absolute; z-index: 4; top: 4px; right: 0;
  min-width: 44px; min-height: 44px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #000; color: #fff; border: 0; border-radius: 0; cursor: pointer;
  font-family: var(--mono, monospace); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase;
}
.rcpt-close:hover { background: var(--blue, #1f3dff); }
.rcpt-dialog :is(a, button):focus-visible { outline: 2px solid var(--blue, #1f3dff); outline-offset: 2px; }
.rcpt-dialog .rcpt-close:focus-visible { outline-color: #fff; outline-offset: -4px; background: var(--blue, #1f3dff); }

/* print: stepped reveal (home.css rcpt-print) + paper drop + mechanical judder; retract = same, reversed */
.rcpt-root.is-printing .rcpt-tilt { animation: rcpt-judder 0.18s steps(2, end) 10 both; }
.rcpt-root.is-printing .rcpt-feed { animation: rcpt-print 1.8s steps(56, end) forwards; }
.rcpt-root.is-retracting .rcpt-feed { animation: rcpt-print 0.9s steps(36, end) reverse both; }
.rcpt-root.is-retracting .rcpt-tilt { animation: rcpt-judder 0.18s steps(2, end) 5 both; }
.rcpt-root.is-retracting .rcpt-close { visibility: hidden; }
@keyframes rcpt-judder {
  0% { transform: translate(0, 0); }
  50% { transform: translate(0.6px, 1.2px); }
  100% { transform: translate(-0.6px, 0); }
}
.rcpt-root:not(.is-printing):not(.is-retracting):not(.is-ready) .rcpt-feed { clip-path: inset(0 0 100% 0); }

@media (prefers-reduced-motion: reduce) {
  .rcpt-root .rcpt-feed, .rcpt-root .rcpt-tilt { animation: none !important; clip-path: none !important; }
  .rcpt-root .rc-total .rc-grand::after { animation: none !important; opacity: 0; }
}

/* mobile menu: Download CV row above the Start CTA (outlined, not filled) */
.site-menu__cta--cv { background: transparent; color: var(--white); border: 1px solid rgba(255, 255, 255, 0.4); margin-bottom: 8px; }
