#flash_messages {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 100;
  max-width: calc(100vw - 2rem);
}

.flash {
  width: 400px;
  max-width: 100%;
  padding: 1rem 1.5rem;
  border-radius: var(--radius-md);
  border-left: 4px solid;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  animation: flashFadeIn 0.2s ease-out;
}

.flash.notice {
  background-color: var(--bg-secondary);
  border-left-color: var(--success);
  color: var(--success);
}

.flash.alert {
  background-color: var(--bg-secondary);
  border-left-color: var(--danger);
  color: var(--danger);
}

@keyframes flashFadeIn {
  from { opacity: 0; transform: translateX(100%); }
  to   { opacity: 1; transform: translateX(0); }
}

.flash.fade-out {
  animation: flashFadeOut 0.3s ease-out forwards;
}

@keyframes flashFadeOut {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(100%); }
}
