/* styles/fx.css - Scoped styles for FX layer, animations, and turn feedback */

.fx-layer {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 850;
  overflow: hidden;
}

.fx-skip-catcher {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: transparent;
}

.fx-skip-catcher.is-active {
  pointer-events: auto;
  cursor: pointer;
}

/* Mouse: click-through; FxLayer skips on any press instead of swallowing it. */
@media (hover: hover) and (pointer: fine) {
  .fx-skip-catcher.is-active { pointer-events: none; }
}

.fx-elements-container {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

/* Space pulse ring */
.fx-space-pulse {
  position: absolute;
  border-radius: 8px;
  border: 2px solid var(--pulse-color, var(--accent));
  box-shadow: 0 0 14px var(--pulse-color, var(--accent));
  pointer-events: none;
  transform-origin: center center;
  box-sizing: border-box;
}

/* Flying agent token */
.fx-agent-token {
  position: absolute;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
  pointer-events: none;
  z-index: 860;
  will-change: transform, opacity;
}

/* Flying card thumb */
.fx-fly-card {
  position: absolute;
  width: 44px;
  height: 62px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid var(--accent);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  z-index: 860;
  will-change: transform, opacity;
}

/* Floating action chip (e.g., "Leader -> Space") */
.fx-action-chip {
  position: absolute;
  top: calc(var(--topbar-h, 40px) + 8px);
  left: 50%;
  transform: translate(-50%, 0);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--chip-border, var(--accent));
  border-radius: 9999px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 870;
  white-space: nowrap;
  will-change: transform, opacity;
}

.fx-chip-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--dot-color, var(--accent));
  flex-shrink: 0;
}

.fx-chip-text {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Floating delta (+1 influence / +1 VP) */
.fx-floating-delta {
  position: absolute;
  font-weight: 700;
  font-size: 13px;
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
  pointer-events: none;
  z-index: 880;
  white-space: nowrap;
  will-change: transform, opacity;
}

.fx-floating-delta.is-gain {
  color: var(--ok);
  border-color: var(--ok);
}

.fx-floating-delta.is-loss {
  color: var(--danger);
  border-color: var(--danger);
}

.fx-floating-delta.is-vp {
  color: var(--accent);
  border-color: var(--accent);
}

/* Turn banner ("Your turn") */
.fx-turn-banner {
  position: absolute;
  top: calc(var(--topbar-h, 40px) + 14px);
  left: 50%;
  transform: translate(-50%, 0);
  padding: 8px 24px;
  background: var(--surface-2);
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 9999px;
  font-family: var(--font-display, serif);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.8px;
  text-transform: uppercase;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  pointer-events: none;
  z-index: 890;
  text-align: center;
  will-change: transform, opacity;
}

/* Combat result banner */
.fx-combat-banner {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(90vw, 420px);
  max-height: 80vh;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--accent);
  border-radius: 12px;
  padding: 14px 18px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  pointer-events: none;
  z-index: 895;
  display: flex;
  flex-direction: column;
  gap: 10px;
  will-change: transform, opacity;
}


.fx-combat-header {
  font-family: var(--font-display, serif);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent);
  text-align: center;
  border-bottom: 1px solid var(--surface-2);
  padding-bottom: 6px;
}

.fx-combat-places {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.fx-combat-place {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 10px;
  border-radius: 6px;
  background: var(--surface-2);
  font-size: 13px;
}

.fx-combat-place.is-rank-1 {
  border-left: 3px solid var(--accent);
}

.fx-combat-rank {
  font-weight: 700;
  width: 24px;
  color: var(--accent);
}

.fx-combat-player {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 1;
}

.fx-combat-strength {
  font-weight: 600;
  color: var(--muted);
  font-size: 12px;
}

/* Skip indicator hint */
.fx-skip-hint {
  position: absolute;
  bottom: calc(var(--dock-h, 64px) + 10px);
  right: 14px;
  background: rgba(0, 0, 0, 0.65);
  color: var(--muted);
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 9999px;
  pointer-events: none;
  opacity: 0.8;
  z-index: 899;
}
