/* THE WAITING ROOM — take a number. it will not be called. */

:root {
  --wr-wall: #cfc4a0;
  --wr-floor-a: #8f8460;
  --wr-floor-b: #7c7250;
  --wr-ink: #34301f;
}

body.waiting {
  background: var(--wr-wall);
  color: var(--wr-ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 4rem 1.5rem 14rem;
  position: relative;
  overflow-x: hidden;
}

.waiting h1 {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: 1.6rem;
  text-align: center;
}

.waiting .sub {
  max-width: 34ch;
  text-align: center;
  font-size: 0.8rem;
  opacity: 0.8;
  margin-top: 0.5rem;
}

/* the ticket dispenser */
.dispenser {
  margin: 2.5rem auto;
  background: #26241a;
  border-radius: 8px;
  padding: 1.5rem 2rem;
  box-shadow: inset 0 0 20px rgba(0,0,0,0.5), 0 10px 30px rgba(0,0,0,0.3);
  text-align: center;
}

.dispenser .now-serving {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #9c9270;
  margin-bottom: 0.5rem;
}

.dispenser { cursor: pointer; }
.dispenser.dispenser-punch .led {
  animation: punch 0.35s ease-out;
}
@keyframes punch {
  0%   { transform: scale(1); color: #ff5533; }
  30%  { transform: scale(1.15); color: #fff; text-shadow: 0 0 16px #fff; }
  100% { transform: scale(1); color: #ff5533; }
}

.dispenser .led {
  font-family: "Courier New", monospace;
  font-variant-numeric: tabular-nums;
  font-size: 2.4rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #ff5533;
  text-shadow: 0 0 10px rgba(255, 85, 51, 0.8), 0 0 24px rgba(255, 85, 51, 0.4);
}

/* three actual benches, standing directly on the same moving floor
   pattern everything else sits on — not a separate static strip bolted
   on above it. nested inside .chair-floor, pinned to its near (bottom)
   edge — the pattern pivots from the bottom, so that's the near,
   undistorted end the benches actually belong on. */
.benches {
  position: absolute;
  bottom: 18%;
  left: 50%;
  /* further from the near edge should also read a little smaller — the
     benches are a flat overlay, not part of the floor's own 3D
     transform, so size has to be faked separately here */
  transform: translateX(-50%) scale(0.82);
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  flex-wrap: wrap;
  /* an absolutely positioned box with `left` set and no explicit width
     shrink-to-fits against the space from that `left` offset to the
     containing block's edge — here that's only half of .chair-floor's
     width, which was quietly wrapping the row a bench early. pin it to
     its actual content width instead. */
  width: max-content;
  max-width: calc(100% - 2rem);
  /* the benches are close in tone to the busy dot floor they're sitting
     on and were disappearing into it — drop-shadow (unlike box-shadow,
     it follows the actual rendered silhouette of every child div, not
     just each one's own box) builds a light halo + a real shadow so
     they read as objects sitting on the floor, not part of its print */
  filter:
    drop-shadow(1px 0 0 var(--wr-wall))
    drop-shadow(-1px 0 0 var(--wr-wall))
    drop-shadow(0 1px 0 var(--wr-wall))
    drop-shadow(0 -1px 0 var(--wr-wall))
    drop-shadow(0 5px 5px rgba(0, 0, 0, 0.5));
  padding-top: 0.5rem;
}

.bench {
  width: 130px;
  height: 78px;
  position: relative;
}

.bench .back {
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 26px;
  height: 34px;
  background: repeating-linear-gradient(
    90deg,
    var(--wr-floor-a) 0 9px,
    var(--wr-ink) 9px 11px,
    var(--wr-floor-a) 11px 20px,
    #5a5030 20px 22px
  );
  border-radius: 3px 3px 0 0;
  box-shadow: inset 0 2px 0 rgba(255,255,255,0.1);
}

.bench .seat {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 20px;
  height: 12px;
  background: linear-gradient(180deg, #8f8460, #6b6038);
  border-radius: 2px;
  box-shadow: 0 3px 4px rgba(0,0,0,0.35);
}

.bench .leg {
  position: absolute;
  bottom: 0;
  width: 7px;
  height: 22px;
  background: linear-gradient(180deg, #6b6038, #443c22);
}
.bench .leg.l { left: 14px; }
.bench .leg.r { right: 14px; }

/* roller wheels — this is understood to prevent the bench from moving,
   not cause it to */
.bench .leg::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 50%;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #e2dabf 0%, #8f8460 45%, #4a4326 80%, #2c2814 100%);
  border: 1px solid #241f10;
  box-shadow: 0 1px 1px rgba(0,0,0,0.4);
  /* the bench itself is still drawn flat/front-on, but it's resting on
     a floor tilted away in perspective (see .chair-floor .rows) — a
     wheel actually touching that plane wouldn't read as a full circle
     anymore, it'd be foreshortened into an ellipse lying nearly flat.
     rotateX (not a literal 90°, but the same idea) sells the contact. */
  transform: translateX(-50%) rotateX(65deg);
}

.bench::after {
  /* contact shadow on the floor beneath it */
  content: '';
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -6px;
  height: 10px;
  background: radial-gradient(ellipse at center, rgba(0,0,0,0.4) 0%, transparent 75%);
}

/* the endless floor of chairs, tiled + perspective, same trick as the entry
   hall's carpet — different pattern, same bones */
.chair-floor {
  position: relative;
  width: min(100%, 900px);
  height: 40vh;
  overflow: hidden;
  margin-top: 0;
}

.chair-floor .rows {
  position: absolute;
  inset: 0;
  background-color: var(--wr-floor-b);
  background-image:
    /* seat back, offset up and slightly darker */
    repeating-radial-gradient(circle at 30% 32%, var(--wr-ink) 0 5px, transparent 6px 100%),
    /* seat cushion */
    repeating-radial-gradient(circle at 30% 55%, var(--wr-floor-a) 0 11px, transparent 12px 100%),
    /* aisle bands every third row */
    repeating-linear-gradient(to bottom, transparent 0 88px, rgba(0,0,0,0.18) 88px 96px);
  background-size: 60px 60px, 60px 60px, 100% 96px;
  transform: perspective(500px) rotateX(58deg) scale(1.6);
  /* back to the original pivot — bottom is the near/undistorted edge,
     the pattern recedes away *upward*, toward the dispenser above.
     the benches sit at the bottom of .chair-floor to match. */
  transform-origin: bottom center;
  animation: recede 2.4s linear infinite;
}

@keyframes recede {
  from { background-position: 0 0, 0 0, 0 0; }
  to { background-position: 0 60px, 0 60px, 0 96px; }
}

.chair-floor::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--wr-wall) 0%, transparent 15%, transparent 80%, var(--wr-wall) 100%);
}

.waiting .placard.hint {
  max-width: 34ch;
  text-align: center;
  font-size: 0.75rem;
  opacity: 0.7;
  margin-top: 1.5rem;
}
