/* The vend explainer's 3D stage (window.OsemVx, osem-vx.js next to this file): the real cabinet in CSS 3D and the flat layer of
   labels over it. Shared by the dashboard's Machine tab and failed-vend pop-up (/vending-diagnostics/) and the public
   /how-it-works/ page. It uses the page's own tokens: --surface, --surface-sunk, --rule, --rule-soft, --shadow, --ink, --ink-3,
   --ok, --crit, --warn and the --body, --mono and --disp fonts. Only transform and opacity ever move. */
/* the stage: a soft floor in the page's own colours, in either theme; the scene is built at 1 px per mm and the camera scales it */
.x3 { position: relative; height: clamp(360px, 34vw, 430px); overflow: hidden; overflow: clip; border-radius: 10px; isolation: isolate; contain: layout paint;
  background: radial-gradient(70% 55% at 50% 22%, color-mix(in srgb, var(--surface) 70%, transparent), transparent 72%),
    linear-gradient(180deg, var(--surface-sunk) 0%, color-mix(in srgb, var(--surface-sunk) 78%, var(--rule)) 100%);
  box-shadow: inset 0 0 0 1px var(--rule-soft); }
.x3-scene { position: absolute; inset: 0; pointer-events: none; }
.x3-cam { position: absolute; left: 0; top: 0; width: 1260px; height: 1808px; transform-style: preserve-3d; transform-origin: 0 0; }
.x3-cam div, .x3-cam i, .x3-cam b { box-sizing: border-box; }
.x3-f { position: absolute; display: block; }
.x3-3d { position: absolute; left: 0; top: 0; width: 0; height: 0; transform-style: preserve-3d; }
.x3-pk { background-repeat: no-repeat; background-size: 100% 100%; display: flex; align-items: center; justify-content: center;
  font: 800 15px/1 var(--disp); color: #FFFFFF; font-style: normal; }
.x3-packs > i { position: absolute; display: block; }
.x3-rings > i, .x3-ring { border-radius: 50%; border: 4px solid #B9C0C7; box-shadow: 0 0 0 1.5px #1A1B1E, inset 0 0 0 1.5px #1A1B1E; }
.x3-rings > i { position: absolute; display: block; }
.x3-ring i { position: absolute; left: 50%; top: -9px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: #FFCB05; box-shadow: 0 0 0 2px #181012, 0 0 10px 3px rgba(255,203,5,.7); }
.x3-sled { position: absolute; left: 50%; top: 50%; width: 16px; height: 16px; margin: -8px 0 0 -8px; border-radius: 50%; background: #3A1512; }
.x3-sled.ok { background: #8BE29A; box-shadow: 0 0 16px 8px rgba(139,226,154,.9); }
.x3-sled.bad { background: #FF6B5E; box-shadow: 0 0 16px 8px rgba(255,107,94,.9); }
/* the six green "ready to collect" lights above the flap: dark lenses, and their lit layers faded in by pose() (opacity only) */
.x3-pled { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 2px; background: radial-gradient(circle at 40% 35%, #4A6B52, #1A3322 75%); box-shadow: 0 0 0 1px rgba(0,0,0,.3); }
.x3-pled.on { opacity: 0; background: radial-gradient(circle at 45% 40%, #F2FFF2, #7CF08E 45%, #22A83C 90%); box-shadow: 0 0 0 1px rgba(0,0,0,.2), 0 0 7px 3px rgba(124,240,142,.8); }
/* the touchscreen in VendSys's layout (status bar, notice band, product grid, footer) and what it shows at each step; mm units */
.x3-scr { background: #07090E; border-radius: 3px; overflow: hidden; box-shadow: 0 0 0 5px #1A1A1C; }
.x3-scr > i { position: absolute; display: block; font-style: normal; }
.x3-scr .bar { left: 0; right: 0; top: 0; height: 12px; background: #000000; }
.x3-scr .band { left: 0; right: 0; top: 12px; height: 129px; background: #000000 url(/vending-diagnostics/machine/screen-band.webp) 0 0 / 100% 100% no-repeat; }
.x3-scr .logo { left: 3px; top: 14.6px; width: 28.8px; height: 28.8px; background: url(/vending-diagnostics/machine/screen-logo.webp) 0 0 / 100% 100% no-repeat; }
.x3-scr .card { left: 6px; right: 6px; top: 147px; bottom: 14px; border-radius: 14px 14px 0 0; padding: 38px 8px 0; overflow: hidden;
  background: linear-gradient(180deg, #F2F6EF 0, #F2F6EF 35px, rgba(242,246,239,0) 35px),
    linear-gradient(160deg, #B9A6F2 0%, #E3E9F8 30%, #BCE7DD 55%, #D9C4F5 80%, #B39CEB 100%);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; align-content: start; }
.x3-scr .card::before { content: "WELCOME TO OSEMVAULT"; position: absolute; left: 0; right: 0; top: 8px; text-align: center; font: 700 12px/1 var(--disp, Poppins, sans-serif); color: #111111; }
.x3-scr .card::after { content: "STEP 1 : TAP & BUY"; position: absolute; left: 0; right: 0; top: 23px; text-align: center; font: 600 8px/1 var(--disp, Poppins, sans-serif); color: #7A2BD8; }
.x3-scr .card > i { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 0; padding: 4px 2px 3px; border-radius: 7px; background: #FFFFFF; }
.x3-scr .card .im { display: block; width: 100%; height: 36px; background: center / contain no-repeat; border-radius: 2px; color: #FFFFFF; font: 700 7px/36px var(--disp, Poppins, sans-serif); text-align: center; }
.x3-scr .card [data-out] .im { opacity: .4; }
.x3-scr .card .no { display: block; width: 78%; border-radius: 999px; background: linear-gradient(90deg, #9330FF, #C35CFF); color: #FFFFFF; font: 700 6.5px/9.5px var(--disp, Poppins, sans-serif); text-align: center; }
.x3-scr .card .pr { display: block; font: 700 6.5px/1 var(--disp, Poppins, sans-serif); color: #111111; white-space: nowrap; }
.x3-scr .card [data-out] .pr { color: #C0172B; }
.x3-scr .foot { left: 0; right: 0; bottom: 0; height: 14px; padding: 0 8px; background: #1E1036; display: flex; align-items: center; justify-content: space-between;
  color: #FFFFFF; font: 600 5.5px/1 var(--body, Poppins, sans-serif); }
.x3-scr .foot i { font-style: normal; }
.x3-scr .foot i + i { padding: 2px 6px; border-radius: 999px; background: #E8394A; }
.x3-scr .pane { left: 14px; right: 14px; top: 148px; height: 268px; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; text-align: center; font: 800 34px/1.05 var(--disp); }
.x3-scr .pane small { font: 600 22px/1.1 var(--disp); }
.x3-scr .pane .ic { width: 96px; height: 96px; border-radius: 50%; display: grid; place-items: center; font: 700 60px/1 var(--body); color: #FFFFFF; }
.x3-scr .qr { width: 132px; height: 132px; display: block; }
.x3-phone { border-radius: 12px; background: #2B2324; box-shadow: 0 0 0 2px #B9B1AC, 0 10px 18px rgba(0,0,0,.4); }
.x3-phone > i { position: absolute; left: 7px; right: 7px; top: 16px; bottom: 22px; border-radius: 4px; background: #3A5BA8; display: block; }
.x3-phone > i.ok { background: #2E7D32; } .x3-phone > i.bad { background: #B3261E; }
/* the moving parts start hidden (that is also the still picture); pose() sets each one's opacity for the moment on show */
.x3 .vx-s1, .x3 .vx-s1ok, .x3 .vx-s1x, .x3 .vx-phone, .x3 .vx-phoneok, .x3 .vx-phonex, .x3 .vx-s2, .x3 .vx-s5, .x3 .vx-sok, .x3 .vx-sbad, .x3 .vx-cbad,
.x3 .vx-mbad, .x3 .vx-led, .x3 .vx-bfail, .x3 .vx-bhi, .x3 .x3-pkt, .x3 .x3-st > span, .x3 .x3-st, .x3 .vx-fshade { opacity: 0; }
/* the flat layer over it: labels pinned to the parts they name (a dot, a leader, a title and what's happening there), the
   drive board and its cable to the screen, and the messages on that cable */
.x3-ov { position: absolute; inset: 0; pointer-events: none; font-family: var(--body); }
.x3-cable { position: absolute; left: 0; top: 0; width: 100%; height: 100%; overflow: visible; }
.x3-cable path { fill: none; stroke: var(--ink-3); stroke-width: 1.4; stroke-dasharray: 4 3; }
.x3-lab { position: absolute; left: 0; top: 0; width: 0; height: 0; will-change: transform, opacity; }
.x3-dot { position: absolute; left: -4.5px; top: -4.5px; width: 9px; height: 9px; border-radius: 50%; background: #FFCB05; box-shadow: 0 0 0 1.5px #181012, 0 0 0 3px rgba(255,255,255,.7); }
.x3-lead { position: absolute; left: 0; top: -.75px; width: 1px; height: 1.5px; background: #181012; transform-origin: 0 50%; opacity: .75; }
/* the first line (the part's name, else what's happening) sits level with the dot; more lines go under it */
.x3-pills { position: absolute; top: -11px; display: flex; flex-direction: column; gap: 3px; }
.x3:not([data-narrow]) .x3-lab:has(.x3-ti small) .x3-pills { top: -19px; }
.x3[data-narrow] .x3-pills { top: -10px; }
.x3-lab[data-side="l"] .x3-pills { right: 0; align-items: flex-end; text-align: right; }
.x3-lab[data-side="r"] .x3-pills { left: 0; align-items: flex-start; text-align: left; }
/* a label turned round to stay on the stage reads the other way */
.x3-lab[data-side="l"][data-flip] .x3-pills { align-items: flex-start; text-align: left; }
.x3-lab[data-side="r"][data-flip] .x3-pills { align-items: flex-end; text-align: right; }
/* what's happening there: one pill per message, all in one cell (they take turns), each as wide as its own words */
.x3-st { display: grid; justify-items: start; }
.x3-lab[data-side="l"]:not([data-flip]) .x3-st, .x3-lab[data-side="r"][data-flip] .x3-st { justify-items: end; }
.x3-bst .x3-st { justify-items: center; }
.x3-ti, .x3-st > span { display: block; padding: 3px 8px 3px; border-radius: 7px; background: var(--surface); border: 1px solid var(--rule); box-shadow: var(--shadow);
  white-space: nowrap; font: 600 12px/1.3 var(--body); color: var(--ink); }
.x3-ti small { display: block; font: 400 11px/1.3 var(--body); color: var(--ink-3); }
.x3-ti.y { background: #FFCB05; border-color: #B38E00; color: #181012; font-family: var(--mono); font-weight: 600; }
.x3-st > span { grid-area: 1 / 1; }
.x3-st [data-tone="ok"] { color: var(--ok); } .x3-st [data-tone="bad"] { color: var(--crit); } .x3-st [data-tone="q"] { color: var(--warn); }
.x3[data-narrow] .x3-ti:not(.y) { display: none; }
.x3[data-narrow] .x3-ti, .x3[data-narrow] .x3-st > span { font-size: 11px; padding: 2px 6px; }
.x3-board { position: absolute; left: 0; top: 0; display: grid; grid-template-columns: auto auto; align-items: center; gap: 1px 8px; padding: 6px 11px 6px 9px;
  border-radius: 8px; background: #0F3D2A; border: 1px solid #3FA36B; color: #E9F7EE; box-shadow: var(--shadow); white-space: nowrap; isolation: isolate; will-change: transform; }
.x3-board b { font: 600 12.5px/1.2 var(--body); }
.x3-board small { grid-column: 2; font: 400 11px/1.25 var(--mono); color: #A8D8B9; }
.x3[data-narrow] .x3-board { grid-template-columns: auto auto auto; padding: 4px 9px 4px 7px; }
.x3[data-narrow] .x3-board b { font-size: 11.5px; } .x3[data-narrow] .x3-board small { grid-column: auto; font-size: 11px; }
.x3-led { grid-row: span 2; width: 9px; height: 9px; border-radius: 50%; background: #1E5C3F; position: relative; }
.x3[data-narrow] .x3-led { grid-row: auto; }
.x3-led i { position: absolute; inset: 0; border-radius: 50%; background: #8BE29A; box-shadow: 0 0 6px 2px rgba(139,226,154,.85); }
.x3-bfail { position: absolute; inset: -1px; border-radius: inherit; background: #7A1A14; border: 1.5px solid #FF6B5E; z-index: -1; }
.x3-bhi { position: absolute; inset: -5px; border-radius: 12px; box-shadow: 0 0 0 2px #FFCB05, 0 0 16px 2px rgba(255,203,5,.55); }
.x3-bst { position: absolute; left: 50%; bottom: calc(100% + 7px); transform: translateX(-50%); }
.x3-pkt { position: absolute; left: -6px; top: -6px; width: 12px; height: 12px; border-radius: 50%; background: #FFCB05; box-shadow: 0 0 0 1.5px #6E0810, 0 0 8px rgba(255,203,5,.8);
  will-change: transform, opacity; }
.x3-pkt.ok { background: #8BE29A; box-shadow: 0 0 0 1.5px #1E5C3F, 0 0 8px rgba(139,226,154,.8); }
.x3-pkt.bad, .x3-pkt.lost { background: #FF8A80; box-shadow: 0 0 0 1.5px #6E0810, 0 0 8px rgba(255,107,94,.8); }
.x3-pkt.lost { width: 16px; height: 16px; left: -8px; top: -8px; background: #B3261E; color: #FFFFFF; font: 700 11px/16px var(--body); text-align: center; }
