/* Red Light Blue Light | the road, the hud, the big pedal button and the attendance slip. Builds on the shared game styles. */
.vv-road { position: relative; max-width: 420px; margin: 8px auto 12px; border: 3px solid #1c1c1f; border-radius: 6px; overflow: hidden; background: #7d6b4f; aspect-ratio: 6 / 7; }
.vv-canvas { display: block; width: 100%; height: 100%; touch-action: none; }
.vv-hud { position: absolute; left: 0; right: 0; top: 0; display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: linear-gradient(rgba(0,0,0,.7), rgba(0,0,0,0)); color: #fff; font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.vv-hud[hidden] { display: none; }
.vv-time b { font-size: 22px; font-variant-numeric: tabular-nums; margin-left: 4px; letter-spacing: 0; }
.vv-prog { flex: 1; height: 8px; background: rgba(255,255,255,.3); border-radius: 4px; overflow: hidden; }
.vv-prog i { display: block; height: 100%; background: #4caf50; transform-origin: left; transform: scaleX(0); }
.vv-msg { position: absolute; left: 12px; right: 12px; top: 50%; transform: translateY(-50%); margin: 0; padding: 14px; text-align: center; color: #fff; background: rgba(0,0,0,.62); border-radius: 6px; font-family: var(--sans); font-size: clamp(14px, 3.8vw, 17px); line-height: 1.45; }
.vv-msg[hidden] { display: none; }
.vv-note { margin-top: 6px; }

/* the one button: hold to drive, let go to stop. It flashes red and blue while a convoy is about */
.vv-pedal { appearance: none; display: grid; place-items: center; margin: 12px auto 6px; width: min(300px, 100%); height: 120px; border: 6px solid #0f3d21; border-radius: 60px; cursor: pointer; color: #fff;
  background: radial-gradient(circle at 50% 30%, #4cd964 0%, #1c8a3a 60%, #146b2b 100%); box-shadow: 0 9px 0 #0f3d21, 0 14px 20px rgba(0,0,0,.25);
  font-family: var(--sans); font-weight: 900; font-size: clamp(20px, 6.4vw, 28px); letter-spacing: .08em; text-transform: uppercase; text-shadow: 0 2px 0 rgba(0,0,0,.35); line-height: 1.15; padding: 0 16px;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; transition: transform .04s, box-shadow .04s; }
.vv-pedal.on { transform: translateY(7px); box-shadow: 0 2px 0 #0f3d21, 0 4px 8px rgba(0,0,0,.25); background: radial-gradient(circle at 50% 30%, #7dff94 0%, #25a845 60%, #1a8132 100%); }
.vv-pedal.alert { animation: vvflash .22s steps(1) infinite; border-color: #fff; }
.vv-pedal:disabled { filter: grayscale(.6) brightness(.8); cursor: default; }
.vv-pedal:focus-visible { outline: 4px solid #1b4fd0; outline-offset: 4px; }
.vv-pedal[hidden] { display: none !important; }
@keyframes vvflash { 0% { background: radial-gradient(circle at 50% 30%, #ff6a5c, #d4141c 70%); box-shadow: 0 9px 0 #7a0009, 0 0 26px #ff2a2a; } 50% { background: radial-gradient(circle at 50% 30%, #6a9bff, #1f4fd4 70%); box-shadow: 0 9px 0 #0f2a7a, 0 0 26px #2a6bff; } }

/* the result: a thermal slip from the office punching machine */
.vv-slip { position: relative; max-width: 330px; margin: 4px auto 14px; padding: 18px 16px 14px; text-align: left; background: #fdfdfb; color: #1b1b1b; font-family: "Courier New", ui-monospace, monospace; font-size: 13px; line-height: 1.5;
  box-shadow: 0 6px 16px rgba(0,0,0,.18); clip-path: polygon(0 0, 100% 0, 100% calc(100% - 8px), 96% 100%, 92% calc(100% - 8px), 88% 100%, 84% calc(100% - 8px), 80% 100%, 76% calc(100% - 8px), 72% 100%, 68% calc(100% - 8px), 64% 100%, 60% calc(100% - 8px), 56% 100%, 52% calc(100% - 8px), 48% 100%, 44% calc(100% - 8px), 40% 100%, 36% calc(100% - 8px), 32% 100%, 28% calc(100% - 8px), 24% 100%, 20% calc(100% - 8px), 16% 100%, 12% calc(100% - 8px), 8% 100%, 4% calc(100% - 8px), 0 100%); }
.vv-l { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.vv-l.h { font-weight: 900; text-align: center; font-size: 14px; }
.vv-l.s { text-align: center; font-weight: 700; }
.vv-l.r { color: #888; overflow: hidden; white-space: nowrap; }
.vv-l.q { font-style: italic; text-align: center; padding: 2px 6px 4px; }
.vv-l.t { text-align: center; font-weight: 900; margin-top: 6px; letter-spacing: .08em; }
.vv-slip.bad .vv-l.t, .vv-slip.bad .vv-l:nth-child(5) { color: #a3121f; }
.vv-barcode { height: 34px; margin: 8px 6px 2px; background: repeating-linear-gradient(90deg, #111 0 2px, transparent 2px 4px, #111 4px 5px, transparent 5px 8px, #111 8px 11px, transparent 11px 13px, #111 13px 14px, transparent 14px 17px); }
