/* CSS */
:root {
  /* total cycle duration; shorten for faster blinking */
  --blink-duration: 0.8s;
}

.text-warning {
  color: rgba(255, 229, 152, 1) !important;
}

/* Apply to any element you want to blink */
.blink {
  display: inline-block;
  /* makes transform/opacity behave nicely */
  opacity: 0;
  animation: blink-fade var(--blink-duration) infinite ease-in-out;
}

/* Keyframes: quick fade-in, short hold, quick fade-out, rest */
@keyframes blink-fade {
  0% {
    opacity: 0;
    transform: translateY(0);
  }

  10% {
    opacity: 1;
  }

  /* quick fade in */
  40% {
    opacity: 1;
  }

  /* short visible hold */
  50% {
    opacity: 0;
  }

  /* quick fade out */
  100% {
    opacity: 0;
  }

  /* rest until next iteration */
}

/* Optional: pause when user hovers */
.blink:hover {
  animation-play-state: paused;
}

/* Accessibility: disable animation for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  .blink {
    animation: none;
    opacity: 1;
    /* keep visible (no blinking) */
  }
}

/* Custom animations for Bootstrap modal */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }

  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes slideOut {
  from {
    opacity: 1;
    transform: translateY(0) scale(1);
  }

  to {
    opacity: 0;
    transform: translateY(-50px) scale(0.9);
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

/* Animation classes */
.animate-slide-in {
  animation: slideIn 0.3s ease-out forwards;
}

.animate-slide-out {
  animation: slideOut 0.3s ease-in forwards;
}

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

.animate-spin {
  animation: spin 1s linear infinite;
}

/* Bootstrap modal backdrop animation */
.modal {
  animation: fadeIn 0.3s ease-out;
}

/* Smooth transitions for interactive elements */
.btn,
.card {
  transition: all 0.2s ease-in-out;
}

.hover-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Progress bar custom styling */
.progress-bar {
  transition: width 0.3s ease-out;
}

/* Custom button hover effects */
.btn:hover,
.hover-btn:hover {
  transform: translateY(-1px) scale(1.05);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

#openModalBtn:hover {
  transform: scale(1.05);
}

/* Modal content styling */
.modal-content {
  border-radius: 12px;
  overflow: hidden;
}

.modal-header {
  border-radius: 12px 12px 0 0;
}

.animated-modal {
  animation: slideIn 0.3s ease-out forwards;
}

/* Icon wrapper for consistent sizing */
.icon-wrapper {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Responsive adjustments */
@media (max-width: 576px) {
  .modal-dialog {
    margin: 1rem;
  }

  .display-4 {
    font-size: 2rem;
  }
}

.toast.slide-in {
  animation: slideIn 0.5s forwards;
}

.toast.slide-out {
  animation: slideOut 0.5s forwards;
}

/* Position bottom-right */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1055;
}