/* ORVO -- THE ONE DOOR FOR SCANNING PAPER: its face (shared/js/orvo-doc-scan.js, OrvoDocScan.capture), Mon 5 Oct 2026.
   Loaded by every my. page that asks the door (first: my/hygiene-registers.html, Scan paper). Needs my.css beside it (.btn,
   .btn-group, .orvo-dots). Nothing here is a new button, switch, field, badge, modal or colour.

   MOVED HERE WORD FOR WORD from my/css/hygiene-sheet-scan.css v=2 (the camera of Scan paper, SHEETFIX1 included) when the
   capture became one door; only the face's own class names changed with it (.hs-scan -> .odsc, .hs-pages -> .odsc-pages,
   .hs-inbox -> .odsc-inbox), so the face is the same to the pixel. THE CAMERA IS THE HYGIENE APP'S OWN, WORN AS IT SHIPS, each
   rule held inside the face's own scope (.odsc) so nothing on the page around it can change:
     cloud/css/cloud.css      :1119-1130 .ot-scan-overlay, :1153-1155 .ot-scan-frame, :1190 .ot-scan-hint
     cloud/css/hygiene.css    PR2 :164, :166-172 and :176-177 (.hy-cam, .hy-cam-probe, .hy-cam-wait), :189-190 and :226-228
                              (.hy-thumb, the stage's own picture), HS2 :427-432 and D :435 and :490-492 (.hy-acts, the foot)
     cloud/css/till-expo.css  :78-80 .px-hd (the head: the name and its small pill)
   The door's own layout (HS10 of the Scan paper drawing, Documentation/mockups/2026-10-05_hygiene_sheet_builder_more): the stage
   one page tall (3 by 4, a paper is taller than it is wide), the pages taken down its left edge over the picture; the camera a
   black screen of its own; on a computer the same face IN the page's own box. The app's own scanner (inside the ORVO App) draws
   its own screen; its pages then stand on this stage like chosen photos. */

/* ---- SHIPPING: the till's camera overlay (cloud.css) ---- */
.odsc.ot-scan-overlay {
    position: fixed; inset: 0; z-index: 1500;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 18px; background: rgba(0,0,0,.92);
    padding: 24px; padding-bottom: calc(24px + var(--orvo-bottom-inset, 0px));
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity .18s ease, visibility 0s linear .18s;
}
.odsc.ot-scan-overlay.is-open {
    opacity: 1; visibility: visible; pointer-events: auto;
    transition: opacity .18s ease, visibility 0s linear 0s;
}
.odsc .ot-scan-frame { position: relative; width: min(78vw, 360px); aspect-ratio: 1; border-radius: 18px; overflow: hidden; background: #0b0b0b; border: 1px solid #2a2a2a; display: block; }
.odsc .ot-scan-frame video { width: 100%; height: 100%; object-fit: cover; display: block; opacity: 0; transition: opacity .3s ease; }
.odsc .ot-scan-frame.is-live video { opacity: 1; }
.odsc .ot-scan-hint { color: #cfcfcf; font-size: 16px; text-align: center; max-width: min(78vw, 360px); line-height: 1.4; min-height: 45px; }

/* ---- SHIPPING: the Hygiene app's camera (hygiene.css PR2, PR3, HS2, D) ---- */
.odsc .ot-scan-frame.is-wide { width: min(92vw, 640px); aspect-ratio: 4 / 3; }
.odsc .hy-cam { width: min(92vw, 640px); display: flex; flex-direction: column; gap: 14px; }
.odsc .hy-cam .px-hd b { font-size: 20px; }
.odsc .hy-cam .ot-scan-hint { height: 22px; min-height: 22px; line-height: 22px; max-width: none; text-align: center; margin: 0; }
.odsc .hy-cam-probe { flex: none; display: flex; align-items: center; gap: 8px; height: 34px; font-size: 13px; font-weight: 600; color: #8a9396; }
.odsc .hy-cam-probe svg { width: 16px; height: 16px; flex: none; stroke: #9aa3a5; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.odsc .hy-cam-probe b { color: #cfcfcf; font-weight: 700; }
.odsc .hy-cam-wait { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 12px; padding-bottom: 28px; background: linear-gradient(to top, rgba(0,0,0,.78), rgba(0,0,0,0) 46%); font-size: 20px; font-weight: 800; color: #fff; }
.odsc .hy-cam-wait .orvo-dots { color: #73D1DE; }
.odsc .ot-scan-frame.is-wide > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.odsc .ot-scan-frame.is-still > img { filter: brightness(.8); }
.odsc .hy-thumb { flex: none; overflow: hidden; border: 1px solid #333; border-radius: 6px; background: #111; padding: 0; }
.odsc .hy-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.odsc .hy-acts { flex: none; padding-top: 0; }
@media (max-width: 760px) {
    .odsc .hy-acts { flex-direction: column-reverse; }
    .odsc .hy-acts .btn { width: 100%; min-width: 0; }
}
@media (min-width: 761px) {
    .odsc .hy-acts .btn { flex: 0 1 160px; min-width: 0; }
}

/* ---- SHIPPING: the head, the name and its small pill (till-expo.css) ---- */
.odsc .px-hd { display: flex; align-items: center; gap: 8px; min-width: 0; }
.odsc .px-hd b { font-size: 17px; font-weight: 800; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.odsc .px-hd .px-grp { margin-left: auto; flex: none; font-size: 11px; color: #888; border: 1px solid #333; border-radius: 5px; padding: 2px 6px; white-space: nowrap; }

/* ---- FIX 1: the camera's screen is black all through, as the app's own (hygiene-camlab.html :53), never see-through ---- */
.odsc.ot-scan-overlay { background: #000; }

/* ---- PROPOSED HS10: the stage one page tall, the pages down its left edge, the phone foot as three rows ---- */
.odsc .ot-scan-frame.is-wide.is-page { width: min(84vw, 300px); aspect-ratio: 3 / 4; align-self: center; }
.odsc .ot-scan-frame.is-page > img { object-fit: contain; background: #0b0b0b; }   /* a chosen or a scanned page is shown whole */
.odsc-pages { position: absolute; left: 8px; top: 8px; display: flex; flex-direction: column; gap: 6px; }
.odsc-pages .hy-thumb { position: relative; width: 34px; height: 45px; border-radius: 4px; }
.odsc .ot-scan-frame.is-still .odsc-pages img { filter: none; }

/* ---- FIX 2: ON A COMPUTER, IN THE BOX -- the stage, the line and the pages line centred in the box's body; the four keys are the
   box's own foot (.modal-actions), Cancel first ---- */
.odsc.odsc-inbox { min-height: 100%; display: flex; flex-direction: column; justify-content: center; }
.odsc.odsc-inbox .hy-cam { width: 100%; align-items: center; }
.odsc.odsc-inbox .hy-cam .ot-scan-hint { width: 100%; }

/* ---- SHEETFIX1 (his 14:4x: "why when the camera opens on the hygiene / my orvo does it open small then resize.. can it open
   more gracefully"): THE CAMERA OPENS AT ITS FINAL SIZE. The stage's height is set outright -- what its 3 by 4 gives, from the
   screen's width alone -- never left to the picture, and the picture stands in it out of the flow, so nothing the camera sends
   (no picture yet, a picture of another shape, a phone held upright) can move the stage or the keys under it. Until the first
   frame the stage is black and holds the house dots (.orvo-dots, my.css) in the till's own wait (cloud/css/cloud.css :1160-1161,
   copied as it ships but for the dots); then the picture fades in over .2 s as the dots fade out, and the dots go
   (shared/js/orvo-doc-scan.js). With reduced motion the picture simply appears and the dots stand still. ---- */
.odsc .ot-scan-frame.is-wide.is-page { flex: none; height: calc(min(84vw, 300px) * 4 / 3); }
.odsc .ot-scan-frame > video { position: absolute; inset: 0; transition-duration: .2s; }
.odsc .ot-scan-wait { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 1; transition: opacity .22s ease; pointer-events: none; }
.odsc .ot-scan-frame.is-live .ot-scan-wait { opacity: 0; }
.odsc .ot-scan-wait .orvo-dots { color: #188796; }
@media (prefers-reduced-motion: reduce) {
    .odsc .ot-scan-frame > video, .odsc .ot-scan-wait { transition: none; }
    .odsc .ot-scan-wait .orvo-dots .dot { animation: none; }
}

/* ---- WHAT THE DOOR SAYS IS SEEN (his 16:2x: the error stood behind the black camera face). A read that did not go is said on the
   face's own line (shared/js/orvo-doc-scan.js back()); and while the face is up (html.odsc-up) the house toasts (my.css
   .toast-container, z-index 1001) stand above the overlay (1500), so a warning the door raises -- the camera did not open, a photo
   ORVO cannot read, more pages than fit -- is never hidden either. ---- */
html.odsc-up .toast-container { z-index: 1501; }

/* HYGFIX8 (8 Oct 2026): ON A COMPUTER THE EMPTY BOX SAYS WHICH DEVICE TAKES THE PHOTOS -- the hint line's own words (.ot-scan-hint,
   above: its colour, size and weight), one line in the middle of the empty stage. Only the place is said here. */
.odsc .hy-cam .ot-scan-frame > .ot-scan-hint.odsc-nocam { position: absolute; left: 24px; right: 24px; top: 50%; transform: translateY(-50%); width: auto; height: auto; min-height: 0; line-height: 1.4; white-space: normal; }

/* SCANUPLOAD (18 Oct 2026, v=3; his "can we also upload a photo etc to scan the nutrition info"): a face that asks for Upload
   (opts.upload: the pack scan) draws Upload and the take key in one wrapper, .odsc-pair (shared/js/orvo-doc-scan.js keysHtml).
   Not there to the layout anywhere (display: contents: on a tablet the keys stay one row of the .btn-group, as they were); on a
   phone, where the keys stack, the pair is the top row, half and half, Upload left and the take key right, with the
   .btn-group's own 10px gap -- so the face is no taller than the four-key face. A face without Upload has no wrapper. */
.odsc .odsc-pair { display: contents; }
@media (max-width: 760px) {
    .odsc .hy-acts .odsc-pair { display: flex; gap: 10px; }
    .odsc .hy-acts .odsc-pair .btn { flex: 1 1 0; width: auto; }
}
