/* Clear coin fly (js/coinFly.js, GAME_SPEC §4.5.2). A short-lived layer
   above the result popup: flying coins and a copy of the coin counter that
   counts up. It takes no input (except the short hold below). No pseudo-elements, no forced priority. */

.coin-fly-layer {
  position: fixed;
  inset: 0;
  z-index: 95;
  pointer-events: none;
  overflow: hidden;
}

.coin-fly-coin {
  position: absolute;
  left: 0;
  top: 0;
  will-change: transform;
  filter: drop-shadow(0 2px 3px rgba(80, 40, 0, 0.45)) drop-shadow(0 0 6px rgba(255, 214, 80, 0.7));
  transition: opacity 80ms linear;
}

.coin-fly-counter {
  position: fixed;
  margin: 0;
  box-sizing: border-box;
  flex: none;
}

.coin-fly-counter .resource-icon {
  will-change: transform;
}

/* Gold flash on each arrival. */
.coin-fly-counter--hit {
  box-shadow: 0 0 0 2px #fff3a0, 0 0 14px 4px rgba(255, 200, 40, 0.85);
}

/* 2.5.1 ad rewards: the layer holds taps for the short flight (play({ hold: true })),
   clear like the rest of it — no loading dim. Gone with the layer. */
.coin-fly-layer.coin-fly-layer--hold {
  pointer-events: auto;
}

/* "+N" over the counter once the last item lands (2.5.1 ad rewards): centred on it (js/coinFly.js
   plusPlace keeps it inside the viewport), it rises out of it and fades in 0.8 s. The wrapper
   moves; the text inside (#coin-fly-plus-text, BP outline text) carries the look. */
.coin-fly-plus {
  position: fixed;
  left: 0;
  top: 0;
  animation: coin-fly-plus 0.8s ease-out forwards;
}

.coin-fly-plus-text {
  display: block;
  white-space: nowrap;
  color: #fff;
  font-weight: 900;
  font-size: 20px;
  line-height: 1.1;
}

@keyframes coin-fly-plus {
  0% { opacity: 0; transform: translateY(4px); }
  20% { opacity: 1; transform: translateY(-6px); }
  100% { opacity: 0; transform: translateY(-28px); }
}
