/* Pinball: what only its table has. The rest comes from /rooms/room.css. */

/* the score display: a dot-matrix panel at the top (drawn dot by dot, dmd.ts) */
.pb-dmd { position: absolute; z-index: 3; top: calc(12px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); pointer-events: none;
  padding: 6px; border-radius: 10px; background: linear-gradient(#2a2a2e, #111114); border: 1px solid #555; box-shadow: 0 8px 24px #000a, inset 0 1px 0 #ffffff22; }
.pb-dmd[hidden] { display: none; }
.pb-dmd-dots { display: block; width: 320px; height: 80px; border-radius: 4px; image-rendering: auto; box-shadow: 0 0 22px #ff7a0033; }
/* the other players, on one screen */
.pb-others { position: absolute; z-index: 3; top: calc(120px + env(safe-area-inset-top, 0px)); left: 50%; transform: translateX(-50%); pointer-events: none;
  display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.pb-others[hidden], .pb-others:empty { display: none; }
.pb-others span { font: 600 12px var(--font); color: #f3e6c8; padding: 3px 9px; border-radius: 999px; background: #0009; border: 1px solid #fff2; }
.pb-others span.now { color: #1a0b02; background: #ffb24a; border-color: #ffb24a; }

.pb-banner { position: absolute; z-index: 4; left: 50%; top: 40%; transform: translate(-50%, -50%); pointer-events: none; display: grid; justify-items: center; gap: 4px;
  padding: 14px 26px; border-radius: 16px; background: #000b; border: 1px solid #fff2; box-shadow: 0 10px 30px #0008; text-align: center; }
.pb-banner[hidden] { display: none; }
.pb-banner small { font-size: 14px; color: #e9dcc0; }
.pb-banner strong { font: 400 34px/1.1 var(--serif, var(--gu-serif)); color: #fff; }
.pb-banner.go { animation: pbin .35s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes pbin { from { opacity: 0; transform: translate(-50%, -40%) scale(.9); } }

.pb-pops { position: absolute; inset: 0; pointer-events: none; z-index: 4; overflow: hidden; }
.pb-pop { position: absolute; transform: translate(-50%, -50%); font: 800 20px/1 var(--font); color: #fff; white-space: nowrap;
  text-shadow: 0 2px 0 #000a, 0 0 12px #000; animation: pbrise 1.2s cubic-bezier(.2, .8, .3, 1) forwards; }
.pb-pop.big { color: #ffe27a; font-size: 26px; }
@keyframes pbrise { 0% { opacity: 0; transform: translate(-50%, -30%) scale(.6); } 15% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); } 70% { opacity: 1; } 100% { opacity: 0; transform: translate(-50%, -150%); } }
@media (prefers-reduced-motion: reduce) { .pb-pop { animation-duration: .01s; animation-delay: 1s; } .pb-banner.go, .pb-dmd.msg em { animation: none; } }

.pb-pause, .pb-nudge { position: absolute; z-index: 4; border: 1px solid #fff3; background: #0008; color: #fff; cursor: pointer; box-shadow: 0 2px 8px #0006; }
.pb-pause { top: calc(14px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); width: 40px; height: 40px; border-radius: 50%; font-size: 13px; }
.pb-nudge { top: calc(64px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); padding: 7px 12px; border-radius: 999px; font: 600 12px var(--font); touch-action: none; }
.pb-pause[hidden], .pb-nudge[hidden] { display: none; }
.pb-pause:hover, .pb-nudge:hover { background: #000b; }
.pb-paused { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 16px; background: rgba(10, 12, 12, .92); backdrop-filter: blur(14px); }
.pb-paused[hidden] { display: none; }
.pb-paused strong { font: 400 48px/1 var(--serif, var(--gu-serif)); color: #fff; }

/* Most Wanted: which side, while the ball waits on the plunger */
.pb-side { position: absolute; z-index: 4; left: 50%; bottom: calc(132px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); display: flex; gap: 10px; }
.pb-side[hidden] { display: none; }
.pb-side button { border: 1px solid #fff4; border-radius: 999px; padding: 9px 18px; font: 700 13px var(--font); color: #fff; cursor: pointer; box-shadow: 0 2px 8px #0006; touch-action: none; }
.pb-side .cops { background: #1f3f9acc; }
.pb-side .robbers { background: #8a1b1bcc; }
.pb-side button[aria-pressed="true"] { outline: 3px solid #ffd55a; outline-offset: 1px; }

/* the plunger's hint, on a touch screen */
.pb-plunge { position: absolute; z-index: 3; right: calc(14px + env(safe-area-inset-right, 0px)); bottom: calc(70px + env(safe-area-inset-bottom, 0px)); pointer-events: none;
  display: grid; justify-items: center; gap: 6px; color: #f3e6c8; font: 600 12px var(--font); text-shadow: 0 1px 3px #000; }
.pb-plunge[hidden] { display: none; }
.pb-plunge i { width: 14px; height: 54px; border-radius: 7px; background: linear-gradient(#ffb24a, #ffb24a00); animation: pbpull 1.4s ease-in-out infinite; }
@keyframes pbpull { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(14px); } }

@media (min-aspect-ratio: 6/5) and (min-width: 761px) {
  .pb-dmd { left: calc(24px + env(safe-area-inset-left, 0px)); top: calc(80px + env(safe-area-inset-top, 0px)); transform: none; }
  .pb-others { left: calc(24px + env(safe-area-inset-left, 0px)); top: calc(194px + env(safe-area-inset-top, 0px)); transform: none; flex-direction: column; align-items: flex-start; }
}
@media (max-width: 760px) {
  .pb-dmd { top: calc(60px + env(safe-area-inset-top, 0px)); padding: 4px; }
  .pb-dmd-dots { width: 240px; height: 60px; }
  .pb-others { top: calc(136px + env(safe-area-inset-top, 0px)); }
  .pb-pause { top: auto; bottom: calc(14px + env(safe-area-inset-bottom, 0px)); right: 14px; }
  .pb-nudge { top: auto; bottom: calc(18px + env(safe-area-inset-bottom, 0px)); right: auto; left: 14px; }
}

/* the shop's swatches: a ball, a pair of flippers, the cove's lights */
.swatch-pball { min-height: 90px; height: 100%; display: grid; place-items: center; background: radial-gradient(circle, #1c2a36, #0a1118); }
.swatch-pball i { width: 40px; height: 40px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, var(--colour) 38%, color-mix(in srgb, var(--colour) 35%, #000)); box-shadow: 0 6px 12px #0008; }
.swatch-pball.metal i { background: radial-gradient(circle at 35% 30%, #fff, var(--colour) 25%, color-mix(in srgb, var(--colour) 30%, #000) 70%, var(--colour)); }
.swatch-pball.glow i { box-shadow: 0 0 18px var(--tint), 0 6px 12px #0008; }
.swatch-flippers { min-height: 90px; height: 100%; display: flex; align-items: center; justify-content: center; gap: 18px; background: radial-gradient(circle, #1c2a36, #0a1118); }
.swatch-flippers i { width: 58px; height: 15px; border-radius: 9px 5px 5px 9px; background: var(--bat); box-shadow: 0 0 0 3px var(--rubber), 0 5px 10px #0008; transform: rotate(18deg); }
.swatch-flippers i + i { border-radius: 5px 9px 9px 5px; transform: rotate(-18deg); }
.swatch-flippers.glow i { box-shadow: 0 0 0 3px var(--rubber), 0 0 16px var(--bat), 0 0 28px var(--rubber); }
.swatch-lights { min-height: 90px; height: 100%; position: relative; overflow: hidden; background: linear-gradient(var(--sky) 0 38%, var(--field) 38% 74%, var(--sand) 74%); }
.swatch-lights i { position: absolute; right: 22%; top: 16%; width: 9px; height: 34px; background: linear-gradient(#fff 0 20%, #b01818 20% 40%, #fff 40% 60%, #b01818 60% 80%, #fff 80%); border-radius: 2px 2px 0 0; }
.swatch-lights b { position: absolute; right: calc(22% + 4px); top: 14%; width: 80%; height: 16px; transform-origin: right center; transform: rotate(8deg); background: linear-gradient(270deg, var(--beam), transparent); opacity: .7; }
.swatch-lights.neon { box-shadow: inset 0 0 22px var(--beam); }
.swatch-lights.storm::after { content: ''; position: absolute; left: 24%; top: 6%; width: 3px; height: 30%; background: #fff; transform: skewX(-20deg); box-shadow: 0 0 10px #fff; }
