/* Custom animations for toasts */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateX(30px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: translateX(0);
  }
  to {
    opacity: 0;
    transform: translateX(30px);
  }
}

.animate-fade-in {
  animation: fadeIn 0.3s ease-out forwards;
}

.animate-fade-out {
  animation: fadeOut 0.3s ease-out forwards;
}

/* Ensure DaisyUI toasts don't interfere */
#toast-container .toast {
  position: static !important;
  margin: 0 !important;
  max-width: 350px;
}

/* Modal animations */
#notification-content {
  transition: transform 0.2s ease-out, opacity 0.2s ease-out;
}

#notification-modal {
  transition: opacity 0.2s ease-out;
}

#notification-modal,
#toast-container {
  z-index: 2147483647 !important;
}

@keyframes flash-arrow {
  50%, 100% { opacity: 0.2; }
  50% { opacity: 1; }
}

#scroll-arrow {
  animation: flash-arrow 1.2s ease-in-out infinite;
}

/* Image modal specific styles */
#notification-content.image-modal-active {
  max-width: 28rem;
  width: 90%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden; /* Prevent modal itself from overflowing */
}

#image-modal-content {
  display: flex;
  flex-direction: column;
  min-height: 0; /* Important for flex children to properly shrink */
  flex: 1;
  overflow: hidden;
}

/* Make the image container responsive but not too tall */
#image-modal-content .aspect-square {
  max-height: 40vh; /* Limit image height */
  flex-shrink: 0; /* Prevent image from shrinking */
}

/* Scrollable content area */
#image-modal-content-area {
  flex: 1;
  min-height: 0; /* Important for overflow to work */
  overflow-y: auto;
  max-height: none; /* Remove fixed max-height, let flex handle it */
}