.flash-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;

  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;

  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(0.5rem);
  -webkit-backdrop-filter: blur(0.5rem);

  animation: flash-overlay-in 200ms ease-out both;
  cursor: pointer;
}

.flash-overlay.dismissing {
  animation: flash-overlay-out 200ms ease-in both;
}

.flash-card {
  max-width: 32rem;
  width: 100%;

  padding: 2rem 2.5rem;

  background: var(--bg-notification-color);
  color: var(--fg-color);
  border: solid var(--border-color) 0.0625rem;
  border-radius: 0.75rem;
  box-shadow:
    rgba(0, 0, 0, 0.25) 0 1.25rem 2.5rem -0.5rem,
    rgba(0, 0, 0, 0.15) 0 0.5rem 1rem -0.25rem;

  display: flex;
  align-items: center;
  gap: 1rem;

  font-size: 1.125rem;
  line-height: 1.4;

  animation: flash-card-in 280ms cubic-bezier(0.2, 0.9, 0.3, 1.2) both;
  cursor: default;
}

.flash-overlay.dismissing .flash-card {
  animation: flash-card-out 200ms ease-in both;
}

.flash-card p {
  margin: 0;
  flex: 1;
}

.flash-card svg {
  width: 2rem;
  height: 2rem;
  flex-shrink: 0;
}

.flash-card.notice svg {
  fill: var(--positive-color);
}

.flash-card.alert {
  border-color: var(--danger-color);
}

.flash-card.alert::before {
  content: "";
  width: 0.375rem;
  align-self: stretch;
  background: var(--danger-color);
  border-radius: 0.25rem;
  flex-shrink: 0;
}

@keyframes flash-overlay-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes flash-overlay-out {
  from { opacity: 1; }
  to { opacity: 0; }
}

@keyframes flash-card-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes flash-card-out {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.96);
  }
}

@media (prefers-reduced-motion: reduce) {
  .flash-overlay,
  .flash-overlay.dismissing,
  .flash-card,
  .flash-overlay.dismissing .flash-card {
    animation-duration: 1ms;
  }
}
