/* the wires (js/wires.js, used by the Queue and the admin page): receipts turned sideways in 3D that face you on
   hover, and the receipt brought forward when clicked */
.q-lines { position: relative; }
.q-row + .q-row { margin-top: 26px; }
.q-head { display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 12px; }
.q-head h3 { margin: 0; font: 700 22px var(--font-display); letter-spacing: .14em; text-transform: uppercase; color: var(--color-text-primary); }
.q-count { min-width: 26px; padding: 1px 8px; border-radius: 99px; text-align: center; background: #ff2b3f; color: #fff; font: 700 13px var(--font-mono);
  box-shadow: 0 0 12px rgba(255,43,63,.5); }
.q-head small { font: 500 12px var(--font-mono); color: var(--cyber-chrome-300); }
.q-line { position: relative; height: 230px; }
.q-line.q-long { overflow-x: auto; overflow-y: hidden; overscroll-behavior-x: contain; scrollbar-width: thin; scrollbar-color: #ff2b3f transparent; }   /* more receipts than fit: swipe along the wire */

/* the wire: steel cable with a faint red glow, bolted at both ends */
.q-wire { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.q-wire path { fill: none; stroke-linecap: round; }
.w-shadow { stroke: rgba(0,0,0,.45); stroke-width: 4; transform: translateY(7px); filter: blur(2px); }
.w-metal { stroke: #5a5e6b; stroke-width: 3.2; filter: drop-shadow(0 0 4px rgba(255,43,63,.35)); }
.w-shine { stroke: rgba(255,255,255,.4); stroke-width: 1; transform: translateY(-.8px); }
.bolt { fill: #23252f; stroke: #ff2b3f; stroke-width: 1.6; filter: drop-shadow(0 0 5px rgba(255,43,63,.6)); }
.q-empty { position: absolute; left: 50%; top: 74px; transform: translateX(-50%); white-space: nowrap; font: 500 13px var(--font-mono); color: var(--cyber-chrome-300); }

/* a receipt on the wire: the button sits on the wire point, the clothespin grips the wire, the paper hangs below,
   turned on its clothespin so its right edge comes toward you (seen from a little above, like pupD's sketch) */
.q-ticket { position: absolute; width: 116px; margin: -10px 0 0 -58px; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; z-index: 1;
  perspective: 620px; perspective-origin: 50% -140px; transition: left .3s cubic-bezier(.3,.8,.3,1), top .3s cubic-bezier(.3,.8,.3,1);
  pointer-events: none; }                                     /* only the paper itself (as you see it, turned) reacts to the mouse */
.q-ticket .q-paper { pointer-events: auto; }
.q-ticket:hover, .q-ticket:focus-visible { z-index: 5; outline: none; }
.q-pin { position: absolute; left: 50%; top: 0; z-index: 2; width: 12px; height: 32px; margin-left: -6px; border-radius: 3px 3px 4px 4px;
  background: linear-gradient(90deg, #8f1020, #ff2b3f 45%, #c4142b); box-shadow: 0 3px 5px rgba(0,0,0,.5);
  transform: rotate(var(--tilt, 0rad)); transform-origin: 50% 10px; }
.q-pin::before { content: ""; position: absolute; left: -2px; right: -2px; top: 12px; height: 5px; border-radius: 3px; background: linear-gradient(#e4e6ee, #8d909c); }   /* the spring */
.q-pin::after { content: ""; position: absolute; left: 50%; top: 18px; bottom: 2px; width: 1px; background: rgba(0,0,0,.45); }                                     /* the split between the jaws */
.q-paper { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 16px; padding: 12px 8px 12px;
  background: linear-gradient(90deg, rgba(40,30,20,.22), transparent 60%), #ece8df;   /* the far edge is in shadow */
  color: #1c1c23; font: 600 9px/1.3 var(--font-mono); letter-spacing: .06em; box-shadow: 0 10px 18px rgba(0,0,0,.45);
  transform: rotateY(-68deg); transform-origin: 50% 0; transition: transform .45s ease, scale .35s ease, box-shadow .25s;   /* -68deg: same as TURN in js/wires.js */
  animation: sway 6.5s ease-in-out infinite; animation-delay: calc(var(--i, 0) * -1.9s); }
/* hanging there, it turns a few degrees back and forth (on its own rotate, so the hover turn below is never held up by it) */
@keyframes sway { 0%, 100% { rotate: .1 1 0 -3deg; } 50% { rotate: -.1 1 0 5deg; } }
/* hover (or keyboard focus): it turns all the way to face you and comes a little closer, so you can read it */
.q-ticket:hover .q-paper, .q-ticket:focus-visible .q-paper { transform: rotateY(0deg); scale: 1.14; }
.q-paper::after { content: ""; position: absolute; left: 0; right: 0; bottom: -7px; height: 7px;
  background: linear-gradient(135deg, #ece8df 50%, transparent 50%) 0 0 / 10px 7px repeat-x, linear-gradient(-135deg, #ece8df 50%, transparent 50%) 0 0 / 10px 7px repeat-x; }
.q-id b { color: #c8102a; }
.q-figs { display: flex; justify-content: center; gap: 3px; margin: 4px 0 2px; }
.q-figs .pfig { width: 24px; }
.q-name { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 600 21px/1 "Caveat", cursive; color: #1d2b6b; letter-spacing: 0; }
.q-what { display: flex; flex-direction: column; align-items: center; text-transform: uppercase; color: #3a3a44; letter-spacing: .08em; }
.q-what em { font-style: normal; color: #c8102a; }
.q-date { color: #6e6b66; }
.q-pay { color: #c8102a; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 8px; }
.q-stamp { margin-top: 2px; padding: 0 5px; border: 1.5px solid rgba(200,16,42,.85); border-radius: 3px; color: rgba(200,16,42,.9); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; transform: rotate(-6deg); }
.q-ticket:hover .q-paper, .q-ticket:focus-visible .q-paper { box-shadow: 0 12px 20px rgba(0,0,0,.5), 0 0 20px rgba(255,43,63,.5); }
.q-ticket:focus-visible .q-paper { outline: 2px solid #ff2b3f; outline-offset: 3px; }
.q-paper.swing { animation: swing .9s ease-out; }
@keyframes swing { 0% { rotate: 0 1 0 0deg; } 18% { rotate: .35 1 0 14deg; } 42% { rotate: -.35 1 0 -8deg; } 66% { rotate: .3 1 0 4deg; } 100% { rotate: 0 1 0 0deg; } }
.q-you { position: absolute; top: -7px; right: -9px; z-index: 1; padding: 2px 6px; border-radius: 4px; background: #ff2b3f; color: #fff;
  font: 700 10px var(--font-mono); letter-spacing: .14em; transform: rotate(9deg); box-shadow: 0 0 10px rgba(255,43,63,.6); }
.q-noq { padding: 14px 0; color: #8d8a83; letter-spacing: .12em; text-transform: uppercase; }
.q-ticket.mine .q-paper { box-shadow: 0 10px 18px rgba(0,0,0,.45), 0 0 0 2px #ff2b3f; }
/* clipped on one by one when the queue first scrolls into view */
.q-row .q-ticket { opacity: 0; }
.q-row.in .q-ticket { animation: clip-on .8s cubic-bezier(.3, 1.4, .5, 1) both; animation-delay: calc(var(--i) * .13s + .1s); }
@keyframes clip-on { from { opacity: 0; transform: translateY(-46px) rotate(-8deg); } 35% { opacity: 1; } to { opacity: 1; transform: none; } }
.q-row .q-ticket.q-wait { visibility: hidden; animation: none; }     /* the visitor's receipt, while it flies here */
.q-row .q-ticket.q-here { opacity: 1; animation: none; }
.q-row .q-ticket.q-away { visibility: hidden; }                       /* taken off the wire: it's in front of you */
/* admin: dragging receipts around (the one being dragged leaves a gap; the others slide aside) */
.q-draggable .q-ticket { cursor: grab; }
.q-dnd .q-ticket { transition: left .22s ease, top .22s ease; }
.q-row .q-ticket.q-held { visibility: hidden; }
.q-dnd, .q-dnd * { cursor: grabbing !important; user-select: none; }
.q-dnd .q-ticket .q-paper { pointer-events: none; }        /* while dragging, nothing turns to face you: the others only make way */
.q-ghost { position: fixed; left: 0; top: 0; z-index: 95; pointer-events: none; filter: drop-shadow(0 22px 28px rgba(0,0,0,.6)); }
.q-ghost .q-paper { margin: 0; animation: none; transform: none; pointer-events: none; }
@media (max-width: 600px) { .q-ticket { width: 88px; margin-left: -44px; } .q-paper { padding: 10px 6px; } .q-figs .pfig { width: 20px; } .q-name { font-size: 18px; } }

/* a receipt taken off the wire: it turns to face you in front of a dimmed page; click outside and it goes back */
body.q-front-open { overflow: hidden; }
:root { scrollbar-gutter: stable; }   /* hiding the scrollbar while a receipt is out must not make the page jump sideways */
.q-front { position: fixed; inset: 0; z-index: 90; }
.q-front[hidden] { display: none; }
.qf-back { position: absolute; inset: 0; background: rgba(5,5,7,.86); backdrop-filter: blur(5px); }
.qf-stage { position: absolute; inset: 0; display: flex; overflow-y: auto; padding: 64px 16px 56px; box-sizing: border-box; scrollbar-width: thin; scrollbar-color: #ff2b3f transparent; }
.qf-in { margin: auto; display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: center; gap: 24px; }
.qf-paper { position: relative; flex: none; transform-origin: 50% 0;   /* turns on its top edge, like on the clothespin */
  will-change: transform; }                                    /* kept ready to move, so it leaves the moment you click */
.qf-paper .q-full { box-shadow: 0 30px 50px rgba(0,0,0,.55); }   /* a plain shadow: a filter here would be redrawn every frame */
.qf-blank { position: absolute; inset: 0; background: #ece8df; opacity: 0; pointer-events: none; }   /* plain paper while it flies */
.qf-panel { width: 360px; max-width: 100%; }
.qf-panel[hidden] { display: none; }
.qf-close { position: fixed; top: 16px; right: 16px; z-index: 2; width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; cursor: pointer;
  color: #fff; font: 700 15px var(--font-mono); border: 1.5px solid rgba(255,43,63,.5); background: rgba(13,14,20,.8); text-shadow: 0 0 10px #ff2b3f; }
.qf-close:hover, .qf-close:focus-visible { border-color: #ff2b3f; background: rgba(255,43,63,.2); box-shadow: 0 0 16px rgba(255,43,63,.5); outline: none; }
.qf-cap { position: fixed; left: 50%; bottom: 14px; transform: translateX(-50%); white-space: nowrap; pointer-events: none; padding: 4px 12px; border-radius: 99px;
  background: rgba(5,5,7,.85); font: 600 12px var(--font-mono); letter-spacing: .2em; color: var(--cyber-chrome-300); }
.q-full { width: 340px; max-width: calc(100vw - 32px); margin: 0; font-size: 13px; }
.q-full .pfig { width: 54px; }
.q-full .hw-desc { min-height: 0; }
.q-full .stamp { top: 262px; left: 71%; font-size: 26px; }
.q-full .stamp.shown { opacity: 1; transform: translate(-50%, -50%) rotate(-14deg) scale(1); }   /* already stamped: no second slam */
   /* the empty space right of REQUEST NOTES (the figure row is always the same height) */
@media (prefers-reduced-motion: reduce) { .q-row .q-ticket { opacity: 1; animation: none; } .q-paper, .q-paper.swing { animation: none; transition: box-shadow .25s; } }
