/* Pinball tile in the Careers mosaic: "PLAY ME!" balloon, chasing lights, click to play (js/pinball-teaser.js). */
.mosaic__tile--pinball { overflow: visible; isolation: isolate; }
.pinball-tile {
  position: absolute; inset: 0; padding: 0; border: 0; border-radius: inherit; overflow: hidden; cursor: pointer;
  background: var(--color-bg-accent); transition: transform 0.35s cubic-bezier(0.2, 0.9, 0.3, 1.3), box-shadow 0.35s;
}
.pinball-tile::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0);
}
.mosaic__tile--pinball.is-in .pinball-tile::after { animation: pinball-chase 1.6s linear infinite; }
.pinball-tile:hover, .pinball-tile:focus-visible { transform: perspective(800px) rotateY(-7deg) rotateX(3deg) scale(1.03); box-shadow: 0 22px 44px rgba(13, 39, 28, 0.35); outline: none; }
.pinball-tile:focus-visible::after { box-shadow: inset 0 0 0 4px #14e1ff, 0 0 0 4px #0d271c; animation: none; }
@keyframes pinball-chase {
  0%, 100% { box-shadow: inset 0 0 0 4px #ff2d95, inset 0 0 28px rgba(255, 45, 149, 0.55); }
  25% { box-shadow: inset 0 0 0 4px #ffd400, inset 0 0 28px rgba(255, 212, 0, 0.55); }
  50% { box-shadow: inset 0 0 0 4px #14e1ff, inset 0 0 28px rgba(20, 225, 255, 0.55); }
  75% { box-shadow: inset 0 0 0 4px #a5ce01, inset 0 0 28px rgba(165, 206, 1, 0.55); }
}
.pinball-tile__label {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0; display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px 10px; border-radius: 999px; background: #fff; color: var(--color-brand-deep, #0d271c);
  font: 700 15px/1 var(--font-display, "PST Mail Sans", sans-serif); white-space: nowrap; box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}
.pinball-tile__label i { width: 9px; height: 9px; border-radius: 50%; background: #ff2d95; box-shadow: 0 0 8px #ff2d95; animation: pinball-blink 1s steps(2) infinite; }
@keyframes pinball-blink { 50% { opacity: 0.15; } }
.pinball-tile.is-loading .pinball-tile__label i { animation-duration: 0.25s; background: #14e1ff; box-shadow: 0 0 8px #14e1ff; }
.pinball-tile.is-loading { cursor: progress; }

/* The balloon pops out once the mosaic is in view and wiggles a few times. */
.pinball-bubble {
  position: absolute; left: var(--pb-x, 1300px); top: var(--pb-y, 158px); width: 168px; z-index: 3; pointer-events: none;
  transform-origin: 20% 92%; filter: drop-shadow(0 8px 12px rgba(0, 0, 0, 0.28));
  opacity: 0; scale: 0.2; rotate: -18deg; transition: opacity 0.2s, scale 0.5s cubic-bezier(0.3, 1.7, 0.5, 1), rotate 0.5s cubic-bezier(0.3, 1.7, 0.5, 1);
}
.pinball-bubble svg { display: block; width: 100%; height: auto; overflow: visible; }
.mosaic.is-pinball-in .pinball-bubble { opacity: 1; scale: 1; rotate: -4deg; transition-delay: 0.5s; animation: pinball-wiggle 3.2s 1.4s ease-in-out 4, pinball-bob 3.4s 14.2s ease-in-out infinite; }
@keyframes pinball-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -6px; } }
/* Narrow screens: slide the mosaic so the pinball tile and its balloon are in view. */
@media (max-width: 600px) { .mosaic__stage { translate: -300px 0; } }
.mosaic.is-pinball-hover .pinball-bubble { scale: 1.12; rotate: 4deg; transition-delay: 0s; }
@keyframes pinball-wiggle {
  0%, 80%, 100% { transform: none; }
  84% { transform: rotate(7deg) scale(1.06); } 88% { transform: rotate(-6deg) scale(1.04); } 92% { transform: rotate(4deg); } 96% { transform: rotate(-2deg); }
}
@media (prefers-reduced-motion: reduce) {
  .mosaic.is-pinball-in .pinball-bubble { animation: none; transition: opacity 0.3s; }
  .mosaic__tile--pinball.is-in .pinball-tile::after { animation: none; box-shadow: inset 0 0 0 4px #a5ce01; }
  .pinball-tile, .pinball-tile:hover { transition: none; transform: none; }
  .pinball-tile__label i { animation: none; }
}

/* Loader over the tile label (js/pinball-teaser.js): spinner, "Loading 63 %" and a progress bar. Fixed and above the
   game overlay, so it stays in view until the 3D scene is ready. */
.pinball-loader {
  position: fixed; z-index: 2147483001; left: 0; top: 0; translate: -50% -50%; scale: 0.92; opacity: 0;
  display: inline-flex; align-items: center; gap: 10px; padding: 10px 18px 12px; border-radius: 999px; overflow: hidden;
  background: #fff; color: var(--color-brand-deep, #0d271c); font: 700 15px/1 var(--font-display, "PST Mail Sans", sans-serif);
  white-space: nowrap; box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3), 0 0 0 3px #a5ce01; pointer-events: none;
  transition: opacity 0.2s, scale 0.25s cubic-bezier(0.2, 0.9, 0.3, 1.3); font-variant-numeric: tabular-nums;
}
.pinball-loader.is-on { opacity: 1; scale: 1; }
.pinball-loader.is-done { opacity: 0; scale: 1.06; }
.pinball-loader i {
  width: 16px; height: 16px; border-radius: 50%; border: 3px solid rgba(13, 39, 28, 0.15); border-top-color: #ff2d95; border-right-color: #14e1ff;
  animation: pinball-spin 0.7s linear infinite;
}
.pinball-loader__text { min-width: 9.5ch; }
.pinball-loader b {
  position: absolute; left: 0; bottom: 0; height: 4px; width: calc(var(--pb-progress, 0) * 100%);
  background: linear-gradient(90deg, #a5ce01, #14e1ff, #ff2d95); transition: width 0.25s ease-out;
}
@keyframes pinball-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pinball-loader i { animation-duration: 2.4s; } .pinball-loader { transition: none; } }
