/* === animations.css === */

/* Button ripple effect */
.hb-btn-ripple {
  position: relative;
  overflow: hidden;
}
.hb-btn-ripple::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: hb-ripple 0.6s ease-out;
  pointer-events: none;
}
@keyframes hb-ripple {
  to { transform: scale(4); opacity: 0; }
}

/* Button hover/active states - Bootstrap override */
.btn-primary {
  background-color: var(--hb-primary-600);
  border-color: var(--hb-primary-600);
  transition: all var(--hb-transition-fast);
}
.btn-primary:hover {
  background-color: var(--hb-primary-700);
  box-shadow: var(--bs-box-shadow-lg);
  transform: translateY(-1px);
}
.btn-primary:active {
  transform: translateY(0);
  box-shadow: var(--bs-box-shadow);
}

/* Bid placed animation */
@keyframes hb-bid-success {
  0% { transform: scale(1); }
  50% { transform: scale(1.03); }
  100% { transform: scale(1); }
}
.hb-bid-success { animation: hb-bid-success 0.3s ease-out; }

/* Outbid notification shake */
@keyframes hb-outbid-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-5px); }
  75% { transform: translateX(5px); }
}
.hb-outbid-alert { animation: hb-outbid-shake 0.4s ease-in-out; }

/* Heart bounce (watchlist) */
@keyframes hb-heart-bounce {
  0% { transform: scale(1); }
  30% { transform: scale(1.3); }
  60% { transform: scale(0.9); }
  100% { transform: scale(1); }
}
.hb-heart-active { animation: hb-heart-bounce 0.4s ease-out; color: var(--hb-error-500); }

/* Floating labels */
.hb-floating-label .form-control:focus ~ label,
.hb-floating-label .form-control:not(:placeholder-shown) ~ label {
  transform: translateY(-1.5rem) scale(0.85);
  color: var(--hb-primary-600);
  transition: all var(--hb-transition-base);
}

/* Scroll-triggered fade-in */
.hb-fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity var(--hb-transition-slow), transform var(--hb-transition-slow);
}
.hb-fade-in.hb-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Staggered list animation */
.hb-stagger > * {
  opacity: 0;
  transform: translateY(10px);
  animation: hb-stagger-in var(--hb-transition-slow) forwards;
}
.hb-stagger > *:nth-child(1) { animation-delay: 0ms; }
.hb-stagger > *:nth-child(2) { animation-delay: 50ms; }
.hb-stagger > *:nth-child(3) { animation-delay: 100ms; }
.hb-stagger > *:nth-child(4) { animation-delay: 150ms; }
.hb-stagger > *:nth-child(5) { animation-delay: 200ms; }
.hb-stagger > *:nth-child(6) { animation-delay: 250ms; }
@keyframes hb-stagger-in {
  to { opacity: 1; transform: translateY(0); }
}

/* Skeleton loading shimmer */
.hb-skeleton {
  background: linear-gradient(90deg, var(--hb-gray-100) 25%, var(--hb-gray-50) 50%, var(--hb-gray-100) 75%);
  background-size: 200% 100%;
  animation: hb-shimmer 1.5s infinite;
  border-radius: var(--bs-border-radius-sm);
}
@keyframes hb-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Page transition crossfade */
.hb-page-enter { opacity: 0; }
.hb-page-enter-active { opacity: 1; transition: opacity 250ms ease-out; }
.hb-page-exit { opacity: 1; }
.hb-page-exit-active { opacity: 0; transition: opacity 150ms ease-in; }

/* Toast notification slide-in */
@keyframes hb-toast-in {
  from { transform: translateX(100%); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes hb-toast-out {
  from { opacity: 1; }
  to { opacity: 0; transform: translateY(-10px); }
}
.hb-toast { animation: hb-toast-in 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.hb-toast-dismiss { animation: hb-toast-out 0.2s ease-in forwards; }

/* Success checkmark SVG animation */
.hb-checkmark-path {
  stroke-dasharray: 48;
  stroke-dashoffset: 48;
  animation: hb-checkmark-draw 0.4s ease-out 0.2s forwards;
}
@keyframes hb-checkmark-draw {
  to { stroke-dashoffset: 0; }
}

/* Pull-to-refresh indicator */
.hb-pull-indicator {
  transition: transform var(--hb-transition-base);
}
.hb-pull-indicator.pulling {
  animation: hb-spin 0.8s linear infinite;
}
@keyframes hb-spin {
  to { transform: rotate(360deg); }
}

/* Compact header on scroll */
.hb-header {
  transition: height var(--hb-transition-base), box-shadow var(--hb-transition-base);
  height: 64px;
}
.hb-header.hb-header-compact {
  height: 48px;
  box-shadow: var(--bs-box-shadow);
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
