/* FAB-specific animations and styles */

.fab-enter {
  animation: fabEnter 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fab-exit {
  animation: fabExit 0.2s cubic-bezier(0.55, 0.06, 0.68, 0.19);
}

@keyframes fabEnter {
  0% {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.05) translateY(-5px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fabExit {
  0% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
  100% {
    opacity: 0;
    transform: scale(0.3) translateY(20px);
  }
}

/* Staggered animation for action buttons */
.fab-action-stagger {
  animation: fabActionEnter 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94) both;
}

.fab-action-stagger:nth-child(1) { animation-delay: 0ms; }
.fab-action-stagger:nth-child(2) { animation-delay: 50ms; }
.fab-action-stagger:nth-child(3) { animation-delay: 100ms; }
.fab-action-stagger:nth-child(4) { animation-delay: 150ms; }

@keyframes fabActionEnter {
  0% {
    opacity: 0;
    transform: scale(0.5) translateY(10px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

/* Pulse animation for main FAB */
.fab-pulse {
  animation: fabPulse 2s infinite;
}

@keyframes fabPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.7);
  }
  70% {
    box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
  }
}

/* Ripple effect for FAB clicks */
.fab-ripple {
  position: relative;
  overflow: hidden;
}

.fab-ripple::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);
  transform: translate(-50%, -50%);
  transition: width 0.6s, height 0.6s;
}

.fab-ripple:active::before {
  width: 300px;
  height: 300px;
}

/* Mobile optimizations */
@media (max-width: 768px) {
  .fab-mobile {
    width: 56px;
    height: 56px;
  }
  
  .fab-action-mobile {
    width: 48px;
    height: 48px;
  }
  
  .fab-label-mobile {
    font-size: 0.875rem;
    padding: 0.5rem 0.75rem;
  }
}

/* Accessibility enhancements */
.fab-focus:focus {
  outline: none;
  ring: 4px;
  ring-color: rgba(59, 130, 246, 0.5);
  ring-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .fab-high-contrast {
    border: 2px solid currentColor;
  }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .fab-enter,
  .fab-exit,
  .fab-action-stagger,
  .fab-pulse {
    animation: none;
  }
  
  * {
    transition-duration: 0.01ms !important;
  }
}

/* Dark mode adjustments */
@media (prefers-color-scheme: dark) {
  .fab-dark {
    background-color: #1f2937;
    color: #f9fafb;
  }
  
  .fab-label-dark {
    background-color: #111827;
    color: #f9fafb;
  }
}