/* Momentra receipt: paper styles (from the staff receipt) + the printing scene */
.paper { width: min(794px, calc(100% - 24px)); margin: 18px auto 0; background: #fff; color: #1a1a1a; font-size: 13px; line-height: 1.45; box-shadow: 0 10px 40px rgba(0, 0, 0, .5); -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.paper * { box-sizing: border-box; }
.p-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 24px 30px 16px; border-bottom: 3px solid #d4a24c; flex-wrap: wrap; }
.p-logo { display: flex; align-items: center; gap: 12px; }
.p-logo img { height: 44px; width: auto; }
.p-logo b { display: block; font: 700 22px/1 system-ui, sans-serif; letter-spacing: 4px; color: #0d0d0d; }
.p-logo small { display: block; margin-top: 5px; font: 700 11px system-ui, sans-serif; letter-spacing: 1.5px; color: #0d0d0d; }
.p-title { text-align: right; }
.p-title b { display: block; font: 700 24px/1 system-ui, sans-serif; letter-spacing: 5px; color: #0d0d0d; }
.p-title span { display: block; margin-top: 6px; font-size: 12px; color: #555; line-height: 1.5; }
.p-body { padding: 22px 30px 26px; }
.p-meta { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.p-meta > div { flex: 1 1 220px; border: 1px solid #e3d5ae; background: #fbf8ef; border-radius: 6px; padding: 10px 12px; overflow-wrap: anywhere; }
.p-k { font: 600 10px system-ui, sans-serif; letter-spacing: 2px; color: #a47a22; text-transform: uppercase; margin-bottom: 3px; }
.p-tbl { width: 100%; border-collapse: collapse; }
.p-tbl th { font-size: 11px; font-weight: 700; letter-spacing: 1.5px; text-transform: uppercase; color: #0d0d0d; background: #e9cf8e; padding: 9px 8px; border-bottom: 2px solid #d4a24c; text-align: left; }
.p-tbl td { padding: 7px 8px; border-bottom: 1px solid #eee; vertical-align: middle; }
.p-tbl .r { text-align: right; white-space: nowrap; }
.p-tbl .cat td { background: #0d0d0d; color: #d4a24c; font-weight: 600; letter-spacing: 1.5px; font-size: 11px; text-transform: uppercase; border: 0; }
.p-tbl .sub td { color: #666; font-size: 12px; }
.p-tbl .thumb { width: 64px; }
.p-tbl .thumb img { width: 56px; height: 44px; object-fit: cover; border-radius: 3px; }
.p-tbl .qty-big { font-size: 20px; font-weight: 700; text-align: center; width: 70px; }
.p-tot .due td { font-weight: 700; font-size: 17px; border-top: 2px solid #0d0d0d; background: #fbf3dc; }
.p-note { margin: 16px 0 0; font-size: 12px; line-height: 1.5; }
.p-foot { background: #0d0d0d; color: #d4a24c; text-align: center; padding: 14px; font-size: 11px; letter-spacing: 1px; line-height: 1.7; }
.p-tbl .mut { color: #777; font-size: 11px; }

.rc-paper { width: 100%; margin: 0; box-shadow: 0 16px 50px rgba(0,0,0,.55); font-family: system-ui, sans-serif; }
.rc-overlay { position: fixed; inset: 0; z-index: 400; background: #0b0b0b; display: flex; flex-direction: column; align-items: center; opacity: 0; transition: opacity .5s ease; font-family: 'Jost', system-ui, sans-serif; }
.rc-overlay.on { opacity: 1; }
.rc-overlay.out { opacity: 0; }
.rc-overlay::before { content: ""; position: absolute; inset: 0; background: radial-gradient(60% 50% at 50% 30%, rgba(212,162,76,.16), transparent 70%); pointer-events: none; }
.rc-slot { position: relative; z-index: 3; margin-top: max(24px, env(safe-area-inset-top)); width: min(560px, calc(100% - 28px)); height: 30px; border-radius: 15px; background: linear-gradient(#e4e4e4, #9a9a9a 45%, #6f6f6f); box-shadow: 0 6px 18px rgba(0,0,0,.6), inset 0 1px 0 #fff; flex: none; }
.rc-slot::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 5px; height: 7px; border-radius: 4px; background: #050505; box-shadow: inset 0 2px 4px #000; }
.rc-win { position: relative; z-index: 2; width: min(794px, calc(100% - 24px)); flex: 1 1 auto; min-height: 0; margin-top: -9px; overflow: hidden; padding-bottom: 96px; -webkit-overflow-scrolling: touch; }
.rc-sheet { transform: translateY(-101%); will-change: transform; }
.rc-sheet.print { animation: rcPrint 3.6s linear forwards; }
.rc-sheet.printed { transform: none; animation: none; }
.rc-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; display: flex; justify-content: center; gap: 12px; padding: 16px 14px calc(16px + env(safe-area-inset-bottom)); background: linear-gradient(transparent, #0b0b0b 40%); opacity: 0; transform: translateY(14px); pointer-events: none; transition: opacity .5s ease, transform .5s ease; }
.rc-overlay.ready .rc-bar { opacity: 1; transform: none; pointer-events: auto; }
@media (max-width: 560px) { .p-head, .p-body { padding-left: 16px; padding-right: 16px; } .p-title { text-align: left; } .p-tbl .thumb { width: 48px; } .p-tbl .thumb img { width: 42px; height: 34px; } .p-tbl .qty-big { font-size: 16px; width: 44px; } }
@media (prefers-reduced-motion: reduce) { .rc-sheet.print { animation: none; } }
.p-tot { margin-left: auto; }

/* quotation look */
.rc-paper, .rc-paper * { font-family: Helvetica, Arial, 'Liberation Sans', sans-serif; }
.rc-paper { max-width: 660px; margin: 0 auto; width: 100%; }
.rc-paper .p-head { padding: 26px 30px 18px; }
.rc-paper .p-logo b { font-weight: 700; font-size: 20px; letter-spacing: 5px; }
.rc-paper .p-logo small { font-weight: 700; font-size: 10px; letter-spacing: 1.2px; }
.rc-paper .p-title b { font-size: 22px; letter-spacing: 1px; text-align: right; }
.rc-paper .p-title span { font-size: 11px; color: #666; }
.rc-paper .p-meta > div { font-size: 12px; line-height: 1.5; }
.rc-paper .p-meta b { font-weight: 700; }
.rc-paper .p-tbl th { font-size: 10px; letter-spacing: 1.5px; padding: 10px 8px; }
.rc-paper .p-tbl td { padding: 11px 8px; font-size: 12px; border-bottom: 1px solid #eee; }
.rc-paper .p-tbl td.d { font-weight: 700; }
.rc-paper .p-tbl td.a { font-weight: 700; }
.rc-paper .p-tbl td.q { text-align: right; }
.rc-paper .p-tbl .cat td { padding: 8px; font-size: 10px; }
.rc-paper .p-tot .due td { font-size: 14px; }
.rc-slot { width: min(660px, calc(100% - 24px)); }
.rc-win { width: min(660px, calc(100% - 24px)); }
.rc-sheet.print { animation: rcPrint 3.4s cubic-bezier(.45,.05,.35,1) forwards; }
@keyframes rcPrint { from { transform: translateY(-101%); } to { transform: translateY(0); } }
.rc-paper .p-tot { width: 260px; margin: 0 0 0 auto; }
.rc-paper .p-tot td { padding: 10px 8px; }
.rc-paper .p-tot td.r { text-align: right; }

/* slot: metal lip in front, dark opening behind the paper */
.rc-slot { height: 34px; background: none; box-shadow: none; border-radius: 0; z-index: auto; margin-top: max(20px, env(safe-area-inset-top)); }
.rc-slot::before { content: ""; position: absolute; left: -6px; right: -6px; top: 0; height: 26px; z-index: 3; border-radius: 13px; background: linear-gradient(#ececec, #a6a6a6 50%, #6a6a6a); box-shadow: 0 8px 18px rgba(0,0,0,.65), inset 0 1px 0 #fff; }
.rc-slot::after { content: ""; position: absolute; left: 0; right: 0; top: 18px; height: 16px; z-index: 1; background: #000; border-radius: 0 0 6px 6px; bottom: auto; box-shadow: inset 0 4px 6px rgba(0,0,0,.9); }
.rc-win { margin-top: -4px; }
.rc-slot::after { left: -6px; right: -6px; top: 16px; height: 24px; background: #000; border: 1px solid #4a4a4a; border-top: 0; border-radius: 0 0 12px 12px; }
.rc-win { margin-top: 2px; }

/* printer bar, like the reference video */
.rc-slot { width: min(740px, calc(100% - 16px)); height: 46px; margin-top: max(26px, env(safe-area-inset-top)); background: none; border: 0; box-shadow: none; }
.rc-slot::before { left: 0; right: 0; top: 0; height: 46px; border-radius: 12px; background: linear-gradient(180deg, #f4f4f4 0%, #d6d6d6 14%, #b9b9b9 45%, #9d9d9d 80%, #cfcfcf 100%); box-shadow: 0 10px 22px rgba(0,0,0,.7), 0 2px 0 rgba(255,255,255,.18) inset, 0 -3px 5px rgba(0,0,0,.25) inset; }
.rc-slot::after { z-index: 4; left: 36px; right: 36px; top: 38px; bottom: auto; height: 4px; border: 0; border-radius: 2px; background: #151515; box-shadow: 0 2px 3px rgba(0,0,0,.55); }
.rc-win { width: min(668px, calc(100% - 88px)); margin-top: -8px; }
@media (max-width: 560px) { .rc-slot { height: 38px; } .rc-slot::before { height: 38px; border-radius: 10px; } .rc-slot::after { top: 31px; left: 28px; right: 28px; } .rc-win { width: calc(100% - 72px); } }

/* printer: pale body, dark slot, paper with torn edge (as in the new reference video) */
.rc-overlay { background: #0b0c0c; }
.rc-slot { width: min(520px, calc(100% - 20px)); height: 72px; margin-top: max(26px, env(safe-area-inset-top)); }
.rc-slot::before { left: 0; right: 0; top: 0; height: 72px; border-radius: 18px 18px 14px 14px; background: linear-gradient(180deg, #fbfbf9 0%, #e9ebe8 30%, #d3d6d2 78%, #b9bdb8 100%); box-shadow: 0 16px 28px rgba(0,0,0,.65), inset 0 2px 0 #fff, inset 0 -3px 4px rgba(0,0,0,.18); }
.rc-slot::after { z-index: 4; left: 10px; right: 10px; top: 60px; height: 7px; bottom: auto; border: 0; border-radius: 4px; background: linear-gradient(#050505, #1c1c1c); box-shadow: 0 2px 2px rgba(0,0,0,.45), inset 0 1px 2px #000; }
.rc-led { position: absolute; z-index: 5; right: 18px; top: 16px; width: 8px; height: 8px; border-radius: 50%; background: #5ee08a; box-shadow: 0 0 8px #5ee08a, inset 0 -1px 1px rgba(0,0,0,.3); animation: rcLed 1s ease-in-out infinite alternate; }
.rc-overlay.ready .rc-led { animation: none; background: #7a7f7a; box-shadow: none; }
.rc-lbl { position: absolute; z-index: 5; left: 20px; top: 18px; font: 500 10px/1 'Jost', system-ui, sans-serif; letter-spacing: 3px; color: #8d928d; }
@keyframes rcLed { from { opacity: .35; } to { opacity: 1; } }
.rc-win { width: min(420px, calc(100% - 84px)); margin-top: -6px; padding-top: 0; }
.rc-win::before { content: ""; position: sticky; top: 0; display: block; height: 14px; margin-bottom: -14px; z-index: 5; background: linear-gradient(rgba(0,0,0,.55), transparent); pointer-events: none; }
.rc-paper { -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 18px 9px repeat-x; mask: linear-gradient(#000 0 0) top / 100% calc(100% - 9px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 18px 9px repeat-x; padding-bottom: 9px; background: #fff; }
.rc-paper .p-foot { margin-bottom: -9px; }
.rc-sheet.print { animation: rcPrint 4s cubic-bezier(.3,.05,.25,1) forwards; }
@media (max-width: 560px) { .rc-slot { height: 62px; } .rc-slot::before { height: 62px; } .rc-slot::after { top: 50px; } .rc-win { width: calc(100% - 64px); } .rc-lbl { top: 14px; } .rc-led { top: 12px; } }

/* v9: full-size receipt (not shrunk), bigger printer, paper hangs free */
.rc-slot { width: min(820px, calc(100% - 16px)); height: 86px; }
.rc-slot::before { height: 86px; border-radius: 22px 22px 16px 16px; }
.rc-slot::after { top: 72px; height: 9px; left: 14px; right: 14px; }
.rc-lbl { top: 24px; left: 28px; font-size: 12px; letter-spacing: 4px; }
.rc-led { top: 22px; right: 28px; width: 10px; height: 10px; }
.rc-win { width: min(680px, calc(100% - 56px)); margin-top: -8px; scrollbar-width: none; -ms-overflow-style: none; }
.rc-win::-webkit-scrollbar { display: none; }
.rc-sheet { filter: drop-shadow(0 14px 22px rgba(0,0,0,.6)); }
.rc-paper { width: 100%; max-width: none; box-shadow: none; }
.rc-paper .p-foot { background: #fff; color: #7a7a7a; border-top: 1px dashed #c9c2ad; letter-spacing: .5px; }
.rc-sheet.print { animation: rcPrint 3.8s cubic-bezier(.3,.12,.28,1) forwards; }
.rc-overlay:not(.ready) .rc-slot { animation: rcShake .09s linear infinite alternate; }
@keyframes rcShake { from { transform: translateX(-.4px); } to { transform: translateX(.4px); } }
@media (max-width: 560px) { .rc-slot { height: 66px; } .rc-slot::before { height: 66px; } .rc-slot::after { top: 53px; height: 8px; } .rc-lbl { top: 18px; left: 20px; font-size: 10px; } .rc-led { top: 16px; right: 20px; } .rc-win { width: calc(100% - 36px); } }

.rc-paper .p-tbl td.d { display: table-cell; }
.rc-paper .p-tbl td.d .th { width: 56px; height: 42px; object-fit: cover; border-radius: 3px; vertical-align: middle; margin-right: 12px; }
@media (max-width: 560px) { .rc-paper .p-tbl td.d .th { width: 40px; height: 32px; margin-right: 8px; } .rc-paper .p-tbl td { padding: 8px 6px; } }
.rc-paper .p-tbl td.d .th { display: inline-block; }
.rc-bar .btn { white-space: nowrap; }
@media (max-width: 560px) { .rc-bar { gap: 8px; padding-left: 10px; padding-right: 10px; } .rc-bar .btn { padding: 12px 16px; font-size: 14px; letter-spacing: .04em; } }

/* documents: same look as the quotation PDF */
.rc-paper.dp { width: 100%; max-width: none; margin: 0; }
.rc-paper.dp .dp-foot { margin-bottom: 0; }
.rc-paper.dp { padding-bottom: 12px; background: #fff; }
@media (max-width: 400px) { .rc-bar .btn { flex: 1 1 0; min-width: 0; padding: 12px 8px; font-size: 13px; letter-spacing: .02em; white-space: normal; text-align: center; line-height: 1.2; } }

/* printer label: black so the name reads clearly on the pale printer */
.rc-lbl { color: #000; }
