:host {
  display: inline-flex;
}

.voice-input-button {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  margin: 0;
  border: 1px solid #d9d9d9;
  border-radius: 6px;
  background: #fff;
  color: #666;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.voice-input-button:hover:not(:disabled) {
  background-color: #f0f0f0;
  border-color: #bfbfbf;
}

.voice-input-button:focus-visible {
  outline: 2px solid rgba(46, 110, 223, 0.35);
  outline-offset: 2px;
}

.voice-input-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.voice-input-button.recording {
  background-color: rgba(255, 0, 0, 0.1);
  border-color: rgba(255, 59, 48, 0.45);
  color: #ff3b30;
  animation: pulse 1.5s infinite;
}

.voice-input-button.converting {
  background-color: rgba(0, 122, 255, 0.1);
  border-color: rgba(0, 122, 255, 0.35);
  color: #007aff;
}

.converting-icon {
  animation: spin 1.5s linear infinite;
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }

  50% {
    opacity: 0.65;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
