/* Flash Messages - Overlay on top of content */
#flash-messages {
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1055; /* Higher than Bootstrap modal backdrop (1050) */
  max-width: 400px;
  width: 100%;
  pointer-events: none; /* Allow clicks to pass through container */
}

#flash-messages .alert {
  pointer-events: auto; /* Re-enable clicks on the actual alerts */
  margin-bottom: 0.5rem;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  border: 1px solid;
}

/* Responsive adjustments for mobile */
@media (max-width: 768px) {
  #flash-messages {
    top: 0.5rem;
    left: 0.5rem;
    right: 0.5rem;
    max-width: none;
  }
}

/* Animation for flash messages */
#flash-messages .alert {
  animation: slideInFromRight 0.3s ease-out;
}

#flash-messages .alert.fade:not(.show) {
  animation: slideOutToRight 0.15s ease-in;
}

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

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