/* WeSpaces Mini-Player Animations */
/* Persistent floating widget for active room sessions */

/* === Entrance / Exit === */

/* Slide up from bottom with fade */
@keyframes mini-player-enter {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Slide down with fade */
@keyframes mini-player-exit {
  from {
    opacity: 1;
    transform: translateY(0);
  }
  to {
    opacity: 0;
    transform: translateY(16px);
  }
}

.mini-player-enter {
  animation: mini-player-enter 0.3s ease-out forwards;
}

.mini-player-exit {
  animation: mini-player-exit 0.2s ease-in forwards;
}

/* === Audio Activity Bars === */
/* Three staggered bars that bounce to indicate voice activity */

@keyframes mini-player-bar {
  0%, 100% { height: 3px; }
  50% { height: 14px; }
}

.mini-player-bar {
  animation: mini-player-bar 1.2s ease-in-out infinite;
}

/* === Speaking Glow === */
/* Subtle ring pulse on active speaker avatars */

@keyframes mini-player-speaking {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.5);
    border-color: rgba(52, 211, 153, 0.8);
  }
  50% {
    box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.12);
    border-color: rgba(52, 211, 153, 1);
  }
}

.mini-player-speaking {
  animation: mini-player-speaking 2s ease-in-out infinite;
}

/* === Room Ended Overlay === */
/* Fade in when room ends while browsing */

@keyframes mini-player-ended-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

.mini-player-ended-in {
  animation: mini-player-ended-in 0.3s ease-out forwards;
}

/* === View Transitions === */
/* Smooth crossfade between compressed and expanded states */

.mini-player-view-enter {
  animation: mini-player-view-in 0.25s ease-out forwards;
}

@keyframes mini-player-view-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
