/* Bazar Animations CSS */

/* Fade In Animation */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.fade-in {
  animation: fadeIn 0.5s ease-in-out;
}

/* Slide In From Right */
@keyframes slideInRight {
  from { transform: translateX(30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-in-right {
  animation: slideInRight 0.4s ease-out;
}

/* Slide In From Left */
@keyframes slideInLeft {
  from { transform: translateX(-30px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

.slide-in-left {
  animation: slideInLeft 0.4s ease-out;
}

/* Slide In From Top */
@keyframes slideInTop {
  from { transform: translateY(-30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.slide-in-top {
  animation: slideInTop 0.4s ease-out;
}

/* Slide In From Bottom */
@keyframes slideInBottom {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.slide-in-bottom {
  animation: slideInBottom 0.4s ease-out;
}

/* Scale In Animation */
@keyframes scaleIn {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.scale-in {
  animation: scaleIn 0.4s ease-out;
}

/* Pulse Animation */
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.8; }
  50% { transform: scale(1.03); opacity: 1; }
  100% { transform: scale(1); opacity: 0.8; }
}

.pulse {
  animation: pulse 2s infinite cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: transform, opacity;
}

/* Shake Animation */
@keyframes shake {
  0%, 100% { transform: translateX(0); }
  10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
  20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
  animation: shake 0.8s ease-in-out;
}

/* Bounce Animation */
@keyframes bounce {
  0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
  40% { transform: translateY(-20px); }
  60% { transform: translateY(-10px); }
}

.bounce {
  animation: bounce 1s;
}

/* Rotate Animation */
@keyframes rotate {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.rotate {
  animation: rotate 1s linear infinite;
}

/* Hover Effects */
.hover-grow {
  transition: transform 0.3s ease;
}

.hover-grow:hover {
  transform: scale(1.05);
}

.hover-lift {
  transition: transform 0.25s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.25s cubic-bezier(0.165, 0.84, 0.44, 1);
  will-change: transform;
}

.hover-lift:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.08);
}

/* Button Animations */
.btn-pulse {
  position: relative;
  overflow: hidden;
}

.btn-pulse:after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 5px;
  height: 5px;
  background: rgba(255, 255, 255, 0.5);
  opacity: 0;
  border-radius: 100%;
  transform: scale(1, 1) translate(-50%, -50%);
  transform-origin: 50% 50%;
}

.btn-pulse:focus:not(:active)::after {
  animation: ripple 1s ease-out;
}

@keyframes ripple {
  0% {
    transform: scale(0, 0);
    opacity: 0.5;
  }
  20% {
    transform: scale(25, 25);
    opacity: 0.3;
  }
  100% {
    opacity: 0;
    transform: scale(40, 40);
  }
}

/* Page Transition */
.page-enter {
  opacity: 0;
}

.page-enter-active {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

.page-exit {
  opacity: 1;
}

.page-exit-active {
  opacity: 0;
  transition: opacity 0.3s ease-in-out;
}

/* Loading Spinner */
.spinner {
  display: inline-block;
  width: 2rem;
  height: 2rem;
  border: 0.25rem solid rgba(150, 0, 24, 0.1);
  border-radius: 50%;
  border-top-color: #960018;
  animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Notification Animation */
@keyframes slideInNotification {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutNotification {
  from { transform: translateX(0); opacity: 1; }
  to { transform: translateX(100%); opacity: 0; }
}

.notification-enter {
  animation: slideInNotification 0.3s forwards, shake 0.8s cubic-bezier(.36,.07,.19,.97) 0.5s both;
}

.notification-exit {
  animation: slideOutNotification 0.3s forwards;
}

/* Icon Animations */
.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  vertical-align: middle;
  transition: transform 0.3s ease;
}

.icon-spin {
  animation: rotate 2s linear infinite;
}

.icon-pulse {
  animation: pulse 1.5s ease-in-out infinite;
}

/* Table Row Hover */
.table-hover-row tr {
  transition: all 0.3s ease;
}

.table-hover-row tr:hover {
  background-color: rgba(150, 0, 24, 0.05);
  transform: scale(1.01);
}

/* Form Field Focus Animation */
.form-focus-animation {
  transition: all 0.3s ease;
}

.form-focus-animation:focus {
  transform: translateY(-3px);
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}