/* ============================================================
   FLASH MESSAGES
   Toast stack fixed just below the nav. Each toast slides down
   with the soft-decelerate curve, then flash_controller.js
   dismisses it (or a click does).
   ============================================================ */

.flash-stack {
  position: fixed;
  top: 76px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  width: min(92vw, 460px);
  pointer-events: none;
}

.flash {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.8rem 1.25rem;
  border-radius: var(--radius-lg);
  background: rgba(13, 27, 110, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--glass-border);
  color: var(--color-white);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.005em;
  line-height: 1.4;
  box-shadow: var(--shadow-panel);
  cursor: pointer;
  animation: flash-in 0.35s var(--ease-out-soft);
  transition: opacity 0.3s var(--ease-out-soft), transform 0.3s var(--ease-out-soft);
}

.flash::before {
  flex-shrink: 0;
  font-size: 1.1rem;
}

.flash--notice::before { content: "🎈"; }

.flash--alert {
  border-color: rgba(255, 80, 80, 0.5);
}

.flash--alert::before { content: "⚠️"; }

.flash--leaving {
  opacity: 0;
  transform: translateY(-10px);
}

@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateY(-14px) scale(0.97);
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash {
    animation: none;
    transition: opacity 0.3s;
  }

  .flash--leaving { transform: none; }
}
