/* ==========================================================================
   AURORA MOTION SYSTEM V2
   Load after aurora-motion.css.
   ========================================================================== */

body.aurora-gameplay-active {
  --am2-gold: #c9a04a;
  --am2-gold-hi: #ead28d;
  --am2-red: #d94b52;
  --am2-blue: #4c8fe8;
  --am2-green: #43ad6d;
  --am2-ease: cubic-bezier(.22,.82,.26,1);
}

/* --------------------------------------------------------------------------
   Hole-card deal state
   -------------------------------------------------------------------------- */

body.aurora-gameplay-active.aurora-hand-dealing
#auroraContextDock {
  opacity: .64;
  pointer-events: none;
}

body.aurora-gameplay-active [data-aurora-dealt="true"] {
  will-change: transform, opacity, filter;
}

/* --------------------------------------------------------------------------
   Player action feedback: the persistent per-seat action pill lives in
   style.css (.action-pill) — it's a core gameplay-clarity feature, not an
   Aurora Motion enhancement, so it must render the same whether or not
   this module/flag is active. Only the overflow allowance for the
   opponent-rail/hero seat containers stays here, since it's specific to
   Aurora's own overlay chrome.
   -------------------------------------------------------------------------- */

body.aurora-gameplay-active .opp-pill,
body.aurora-gameplay-active #seat-hero {
  overflow: visible;
}

/* --------------------------------------------------------------------------
   Street title
   -------------------------------------------------------------------------- */

/* Anchored near the top of #boardStage's own box (position:relative,
   overflow:hidden — style.css), inside its 15% top padding/rail band, not
   vertically centered. #boardStage's stadium shape puts the felt content
   (community cards) below that padding band, so this stays clear of the
   board row instead of appearing on top of a card mid-street — matches the
   already-proven-safe anchor countdown-ui.js's own .cd-street-flash uses
   for the same purpose (style.css). */
.aurora-street-title {
  position: absolute;
  left: 50%;
  top: 6px;
  z-index: 70;
  padding: 7px 15px;
  border-radius: 999px;
  transform: translateX(-50%) scale(.96);
  opacity: 0;
  pointer-events: none;
  color: #f2e6bc;
  background: rgba(3, 12, 9, .78);
  border: 1px solid rgba(201,160,74,.36);
  box-shadow: 0 8px 20px rgba(0,0,0,.38);
  font-size: clamp(.68rem, 1.2vw, .86rem);
  font-weight: 850;
  letter-spacing: .18em;
  text-transform: uppercase;
  backdrop-filter: blur(8px);
}

.aurora-street-title-show {
  animation: auroraStreetTitle 820ms var(--am2-ease) both;
}

@keyframes auroraStreetTitle {
  0%   { opacity: 0; transform: translateX(-50%) translateY(-4px) scale(.94); }
  22%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1.02); }
  68%  { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
  100% { opacity: 0; transform: translateX(-50%) translateY(-6px) scale(.985); }
}

/* --------------------------------------------------------------------------
   Showdown prelude
   -------------------------------------------------------------------------- */

body.aurora-gameplay-active.aurora-showdown-prelude
#auroraContextDock {
  opacity: 0;
  transform: translateY(8px);
  pointer-events: none;
  transition:
    opacity 180ms ease,
    transform 240ms var(--am2-ease);
}

body.aurora-gameplay-active.aurora-showdown-prelude
.dealer-zone {
  opacity: .45;
  filter: saturate(.55);
  transition:
    opacity 180ms ease,
    filter 180ms ease;
}

body.aurora-gameplay-active .aurora-showdown-board-focus {
  filter: brightness(1.055);
  box-shadow:
    0 0 0 1px rgba(201,160,74,.28),
    0 0 26px rgba(201,160,74,.10),
    inset 0 -26px 58px rgba(0,0,0,.22),
    0 18px 38px rgba(0,0,0,.50);
  transition:
    filter 300ms var(--am2-ease),
    box-shadow 420ms var(--am2-ease);
}

body.aurora-gameplay-active .aurora-showdown-dim {
  opacity: .32 !important;
  filter: saturate(.45) brightness(.72);
  transition:
    opacity 260ms ease,
    filter 320ms ease;
}

/* --------------------------------------------------------------------------
   Short landscape tuning
   -------------------------------------------------------------------------- */

@media (orientation: landscape) and (max-height: 440px) {
  .aurora-street-title {
    padding: 5px 12px;
  }
}

/* --------------------------------------------------------------------------
   Reduced motion
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .aurora-street-title-show {
    animation: none !important;
    opacity: 1;
    transform: translate(-50%, -50%);
  }

  body.aurora-gameplay-active .aurora-showdown-board-focus,
  body.aurora-gameplay-active .aurora-showdown-dim,
  body.aurora-gameplay-active.aurora-showdown-prelude
  #auroraContextDock,
  body.aurora-gameplay-active.aurora-showdown-prelude
  .dealer-zone {
    transition: none !important;
  }
}
