/* ============================================================================
   CENTRALIZED FLASH ANIMATION SYSTEM
   ============================================================================
   REVERT LABEL: "CENTRALIZED_FLASH_SYSTEM_CSS"
   To revert: Remove everything from this comment block to the next comment block
   ============================================================================
   This system provides standardized flash animations across all apps.
   Usage: await Common.flashElement(element, 'simple');
   ============================================================================ */

/* Shared visibility: opacity pulse (1 → 0 → 1). Motion is separate per use. */
@keyframes flash-visibility {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Outward motion: scale up (for universal / non-CTA flash). */
@keyframes flash-motion-outward {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.15); }
}

/* Inward motion: brief dim (CTA only). Uses filter so transform-based centering (e.g. nav buttons) is not overwritten. */
@keyframes flash-motion-inward {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(0.88); }
}

@keyframes flash-simple {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0;
    transform: scale(1.15);
  }
}

.flash-simple {
  animation: flash-simple 0.4s ease-in-out;
}

/* CTA-only: same visibility as .flash-simple, inward pulse (depressed click). */
.flash-cta {
  animation: flash-visibility 0.4s ease-in-out, flash-motion-inward 0.4s ease-in-out;
}

/* Opacity-only: no transform/motion, safe for position:absolute + transform-centered elements (e.g. nav buttons). */
.flash-opacity {
  animation: flash-visibility 0.4s ease-in-out;
}

@keyframes flash-attention {
  0%, 100% {
    opacity: 1;
    transform: scale(1);
  }
  50% {
    opacity: 0.3;
    transform: scale(1.1);
  }
}

.flash-attention {
  animation: flash-attention 0.6s ease-in-out;
}

@keyframes flash-green {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(76, 175, 80, 0.3);
  }
}

.flash-green {
  animation: flash-green 0.6s ease-in-out;
}

@keyframes flash-red {
  0%, 100% {
    background-color: transparent;
  }
  50% {
    background-color: rgba(244, 67, 54, 0.3);
  }
}

.flash-red {
  animation: flash-red 0.6s ease-in-out;
}

@keyframes flash-urgent {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.3;
  }
}

.flash-urgent {
  animation: flash-urgent 0.5s ease-in-out infinite;
}

@keyframes flash-goldPulse {
  0%, 100% {
    background-color: transparent;
    border-color: var(--goldHighlight);
    box-shadow: 0 0 20px rgba(255, 226, 9, 0.8);
  }
  25% {
    background-color: rgba(255, 226, 9, 0.5);
    border-color: #ffaa00;
    box-shadow: 0 0 30px rgba(255, 226, 9, 1);
  }
  50% {
    background-color: rgba(255, 226, 9, 0.7);
    border-color: #ff8800;
    box-shadow: 0 0 40px rgba(255, 226, 9, 1);
  }
  75% {
    background-color: rgba(255, 226, 9, 0.5);
    border-color: #ffaa00;
    box-shadow: 0 0 30px rgba(255, 226, 9, 1);
  }
}

.flash-goldPulse {
  animation: flash-goldPulse 1.2s ease-in-out;
  border: 4px solid var(--goldHighlight);
  box-shadow: 0 0 20px rgba(255, 226, 9, 0.8);
}

/* ============================================================================
   END CENTRALIZED FLASH ANIMATION SYSTEM
   ============================================================================ */
