/* MIC BUTTON */
#microphone-button {
  position: relative;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

/* Only apply hover effects on devices that support hover */
@media (hover: hover) {
  #microphone-button:hover {
    background-color: #636363;
    transform: scale(1.05);
    -webkit-transform: scale(1.05);
    transform-origin: center;
    border-color: rgba(255, 255, 255, 0.3);
  }
}

#microphone-button:active {
  background-color: #444444;
  transform: scale(1);
  -webkit-transform: scale(1);
  transform-origin: center;
}

#microphone-button.recording {
  background-color: #ff4136; /* Red color for recording */
  transition: background-color 0.3s ease;
}

/* Enhanced animations */
@keyframes pulse {
    0% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(255, 65, 54, 0.7);
    }
    50% {
      transform: scale(1.05);
      box-shadow: 0 0 0 10px rgba(255, 65, 54, 0);
    }
    100% {
      transform: scale(1);
      box-shadow: 0 0 0 0 rgba(255, 65, 54, 0);
    }
}

@keyframes listening-pulse {
    0% {
      box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    70% {
      box-shadow: 0 0 0 15px rgba(255, 0, 0, 0);
    }
    100% {
      box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

@keyframes processing-spin {
    0% {
      transform: rotate(0deg);
      box-shadow: 0 0 0 0 rgba(0, 139, 139, 0.7);
    }
    50% {
      box-shadow: 0 0 0 8px rgba(0, 139, 139, 0);
    }
    100% {
      transform: rotate(360deg);
      box-shadow: 0 0 0 0 rgba(0, 139, 139, 0);
    }
}

.mic-pulse {
  animation: pulse 1.5s infinite;
}

/* Enhanced state styles */
.mic-inactive{
    background-color: #6c757d;
    border-color: #6c757d;
}

.mic-activating{
    background-color: #ffc107;
    border-color: #ffc107;
    animation: pulse 0.8s infinite;
}

.mic-listening {
  background-color: #dc3545;
  border-color: #dc3545;
  animation: listening-pulse 2s infinite;
}

.mic-recording {
  background-color: #28a745;
  border-color: #28a745;
  animation: pulse 1s infinite;
}

.mic-waiting {
  background-color: #17a2b8;
  border-color: #17a2b8;
  animation: pulse 1.5s infinite;
}

.mic-processing {
  background-color: #20c997;
  border-color: #20c997;
  animation: processing-spin 2s infinite linear;
  transform-origin: center;
}

/* Status indicator */
#microphone-button::after {
  content: '';
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: transparent;
  transition: all 0.3s ease;
}

.mic-listening::after {
  background-color: #ff0000;
  animation: pulse 1s infinite;
}

.mic-recording::after {
  background-color: #00ff00;
}

.mic-processing::after {
  background-color: #00ffff;
  animation: pulse 0.5s infinite;
}