@keyframes fadeIn {
  from { opacity: 0; transform: translateY(3rem); }
  to { opacity: 1; transform: translateY(0); }
}

#flashes {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  width: 20rem;
  z-index: 1000;
}

flash-message {
  display: block;
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 0.5rem;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  animation: fadeIn 0.5s ease-in;
  transition: opacity 0.5s ease-out;
  position: relative;

  &.notice {
    background-color: white;
    color: #155724;
  }

  &.alert {
    background-color: #f8d7da;
    color: #721c24;
  }

  .close-button {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.2rem 0.5rem;
    color: inherit;
    opacity: 0.7;
    border-radius: 0.25rem;
  }

  .close-button:hover {
    opacity: 1;
    background-color: rgba(0, 0, 0, 0.1);
  }
}
