.wk-vib {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.wk-vib--textarea-corner {
  position: absolute;
  top: 4px;
  right: 4px;
  z-index: 1;
}

.wk-vib--sm .wk-vib__btn {
  width: 24px;
  height: 24px;
}

.wk-vib__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 4px;
  cursor: pointer;
  transition: color 0.15s, background-color 0.15s;
  color: var(--wk-icon-muted);
}

.wk-vib__btn:hover {
  background-color: var(--wk-bg-hover);
  color: var(--wk-text-primary);
}

.wk-vib__btn:active {
  opacity: 0.7;
}

.wk-vib__btn--recording {
  background-color: var(--wk-voice-recording-bg);
  color: var(--wk-voice-recording-color);
}

.wk-vib__btn--recording:hover {
  background-color: var(--wk-voice-recording-bg);
  color: var(--wk-voice-recording-color);
  opacity: 0.85;
}

.wk-vib__btn--disabled {
  color: var(--wk-icon-muted);
  cursor: not-allowed;
  opacity: 0.4;
}

.wk-vib__btn--disabled:hover {
  background-color: transparent;
  color: var(--wk-icon-muted);
}

/* Floating voice indicator */
.wk-voice-floating-indicator {
  position: fixed;
  z-index: 1000;
  display: flex;
  align-items: center;
  gap: 0;
  width: 184px;
  height: 48px;
  padding: 4px 16px;
  background-color: var(--wk-bg-surface);
  border: 1px solid var(--wk-border-subtle);
  border-radius: 1000px;
  box-shadow: 0px 0px 20px 0px var(--wk-black-alpha-08);
  box-sizing: border-box;
}

[theme-mode="dark"] .wk-voice-floating-indicator {
  background-color: var(--wk-bg-surface);
  border-color: var(--wk-border-subtle);
  box-shadow: 0px 0px 20px 0px var(--wk-black-alpha-30);
}

.wk-voice-floating-content {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 6px 0;
  height: 32px;
}

.wk-voice-floating-text {
  font-family: var(--wk-font-sans);
  font-size: var(--wk-text-size-md);
  font-weight: 500;
  line-height: 22px;
  color: var(--wk-text-primary);
  white-space: nowrap;
}

.wk-voice-floating-divider {
  width: 1px;
  height: 20px;
  margin: 0 8px;
  background-color: var(--wk-border-default);
  flex-shrink: 0;
}

.wk-voice-transcribing-spinner {
  width: 80px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.wk-voice-transcribing-spinner::after {
  content: "";
  width: 20px;
  height: 20px;
  border: 2px solid var(--wk-accent-tint-12);
  border-top-color: var(--wk-color-accent);
  border-radius: 50%;
  animation: wk-voice-spin 0.6s linear infinite;
}

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

.wk-voice-wave-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 80px;
  height: 24px;
  gap: 2px;
}

.wk-voice-wave-bar {
  width: 3px;
  background-color: var(--wk-voice-wave-color);
  border-radius: 1.5px;
  animation: wk-voice-wave 0.8s ease-in-out infinite;
}

.wk-voice-wave-bar:nth-child(1) {
  animation-delay: 0s;
}
.wk-voice-wave-bar:nth-child(2) {
  animation-delay: 0.1s;
}
.wk-voice-wave-bar:nth-child(3) {
  animation-delay: 0.2s;
}
.wk-voice-wave-bar:nth-child(4) {
  animation-delay: 0.3s;
}
.wk-voice-wave-bar:nth-child(5) {
  animation-delay: 0.4s;
}
.wk-voice-wave-bar:nth-child(6) {
  animation-delay: 0.5s;
}
.wk-voice-wave-bar:nth-child(7) {
  animation-delay: 0.6s;
}
.wk-voice-wave-bar:nth-child(8) {
  animation-delay: 0.7s;
}
.wk-voice-wave-bar:nth-child(9) {
  animation-delay: 0.6s;
}
.wk-voice-wave-bar:nth-child(10) {
  animation-delay: 0.5s;
}
.wk-voice-wave-bar:nth-child(11) {
  animation-delay: 0.4s;
}
.wk-voice-wave-bar:nth-child(12) {
  animation-delay: 0.3s;
}
.wk-voice-wave-bar:nth-child(13) {
  animation-delay: 0.2s;
}
.wk-voice-wave-bar:nth-child(14) {
  animation-delay: 0.1s;
}
.wk-voice-wave-bar:nth-child(15) {
  animation-delay: 0s;
}
.wk-voice-wave-bar:nth-child(16) {
  animation-delay: 0.1s;
}

@keyframes wk-voice-wave {
  0%,
  100% {
    height: 6px;
  }
  50% {
    height: 20px;
  }
}
