/* Copyright (c) 2026 Ascent. All rights reserved. PRIVATE TABLE — https://poker.ascent-web.jp/terms */
/* The re-entry beat (REENTRY_SPEC §6 v1.3; js/revive-fx.js, js/revive-drawers.js).
   Ported from the approved prototype (tools/fx/revive/revive.css). Colours are
   the table's gold and black only: no new hue. Every node here is created by
   a drawer and removed when it ends; at --motion: 0 none of them is made. */

/* The one layer the beat's chips and lights are drawn on. Fixed, so a chip can
   fall onto a seat from above the screen without the felt's clip cutting it,
   and outside #screenTable, so 3-C can zoom the screen while the close-up is
   drawn at its zoomed size here. Clipped to the column, not the window. */
.revive-layer {
  position: fixed;
  inset: 0;
  z-index: 12;
  overflow: hidden;
  clip-path: inset(0 var(--app-gutter, 0px));
  pointer-events: none;
}
.revive-layer > * { position: absolute; pointer-events: none; }

/* A flying chip is the payout's .anim-chip drawing. Centred with transform;
   the motion uses the individual `translate` / `scale` properties, which
   compose with it instead of replacing it. */
.revive-layer .rv-chip { transform: translate(-50%, -50%); }

/* The seat's lamp: a sibling of the pod, like .pod-ring and .pod-win, and only
   its opacity moves (the drawers animate it). The pod's own border keeps
   answering the actor at once (spec §6). */
.pod-revive,
.you-revive {
  position: absolute;
  z-index: 1;
  border-radius: 12px;
  box-shadow:
    0 0 0 1.5px var(--gold),
    0 0 20px 2px var(--gold-glow),
    inset 0 0 16px var(--gold-glow);
  opacity: 0;
  pointer-events: none;
}
.pod-revive { inset: calc(var(--pod-top) - 3px) -3px -3px; }
.you-revive { inset: -3px; border-radius: 16px 16px 0 0; }

/* The table darkening except around the seat. Inside .felt-wrap, over the pods. */
.rv-dim {
  position: absolute;
  inset: 0;
  z-index: 4;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(circle at var(--rv-x, 50%) var(--rv-y, 50%),
    rgba(0, 0, 0, 0) 0 66px,
    rgba(0, 0, 0, .58) 118px);
}

/* 1-A: a column of light from the top edge down to the seat. */
.rv-beam {
  width: 128px;
  transform: translateX(-50%);
  transform-origin: 50% 0;
  border-radius: 0 0 60px 60px;
  background: linear-gradient(to bottom,
    rgba(233, 199, 110, 0) 0%,
    rgba(233, 199, 110, .30) 45%,
    rgba(255, 241, 205, .62) 100%);
  filter: blur(7px);
  mix-blend-mode: screen;
}

/* The seat's light bursting. */
.rv-flash {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle,
    rgba(255, 241, 205, .9) 0%,
    rgba(233, 199, 110, .5) 32%,
    rgba(233, 199, 110, 0) 68%);
  mix-blend-mode: screen;
}

/* A shock ring. */
.rv-ring {
  width: 40px;
  height: 40px;
  border: 2px solid var(--gold);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: 0 0 14px var(--gold-glow), inset 0 0 10px var(--gold-glow);
}

/* 1-B: the shadow of what is about to land. */
.rv-shadow {
  width: 110px;
  height: 34px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, .7) 0%, rgba(0, 0, 0, 0) 70%);
}

/* 2-C: the table goes black and the light comes back in a circle from the
   seat. Registered so WAAPI can animate the hole's radius; where @property is
   not supported the drawer fades the dark instead (revive-drawers.js). */
@property --rv-hole {
  syntax: '<length>';
  inherits: false;
  initial-value: 0px;
}
.rv-black {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background: radial-gradient(circle at var(--rv-x, 50%) var(--rv-y, 50%),
    rgba(0, 0, 0, 0) 0 var(--rv-hole),
    rgba(0, 0, 0, .9) calc(var(--rv-hole) + 70px));
}

/* 3-A: the line of light running across the table. */
.rv-crack {
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 0 4px rgba(255, 241, 205, .95)) drop-shadow(0 0 14px var(--gold));
}
.rv-crack polyline {
  fill: none;
  stroke: #fff1cd;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}
