﻿#topRightAlert {
  position: fixed;
  top: 40px;
  right: 20px;
  max-width: 300px;
  z-index: 1000; 
  font-size: 14px;
}

@keyframes fadeInAlert {
  from {
    opacity: 0;
    transform: translateY(-10px);
  }
  to {
    opacity: 0.95;
    transform: translateY(0);
  }
}

@keyframes fadeOutAlert {
  from {
    opacity: 0.95;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(-10px);
  }
}

#topRightAlert .alert {
  padding: 10px 15px;
  border-radius: 5px;
  color: white;
  margin-bottom: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  opacity: 0.95;
  cursor: default;
  user-select: none;

  /* Animation */
  animation: fadeInAlert 0.4s ease-out;
  transition: opacity 0.4s ease-out, transform 0.4s ease-out;
}

#topRightAlert .alert-success {
  background-color: #4caf50;
}

#topRightAlert .alert-danger {
  background-color: #f44336;
}

#topRightAlert .btn-close {
  font-size: 0.50rem;       
  opacity: 0.6;             
  filter: invert(1);        
}

/* Fade-out class to trigger JS-controlled dismissal */
.fade-out {
  animation: fadeOutAlert 0.4s ease-in forwards !important;
}
