#voiceBtn.voice-wave-btn,
#voiceBtn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  color: var(--ink) !important;
}
#voiceBtn .voice-wave-icon {
  width: 18px;
  height: 18px;
  display: block;
  color: var(--ink);
  flex-shrink: 0;
}
#voiceBtn .voice-wave-icon rect {
  fill: currentColor;
}

#voiceRecorderBar {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
  padding: 0;
  background: transparent;
  border: none;
  min-height: 44px;
}
#voiceRecorderBar.hidden { display: none !important; }

.voice-trash,
.voice-play {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #1c1c1e;
  color: #fff;
  border: 1px solid #333;
  flex-shrink: 0;
  cursor: pointer;
}
.voice-play {
  box-shadow: 0 2px 6px rgba(0,0,0,0.18);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.voice-play:hover { transform: scale(1.06); }
.voice-play:active { transform: scale(0.95); }

.voice-pill {
  flex: 1 1 auto;
  min-width: 0;
  height: 44px;
  border-radius: 9999px;
  background: #1c1c1e;
  border: 1px solid #333;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px 0 8px;
  box-sizing: border-box;
  overflow: hidden;
}
.voice-stop-sq {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #e5e5ea;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
  margin-left: 6px;
}
#voiceWaveform {
  flex: 1 1 auto;
  min-width: 0;
  width: 100%;
  height: 22px !important;
  max-height: 22px !important;
  display: block;
  align-self: center;
}
.voice-timer {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  min-width: 34px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.voice-send {
  width: 44px;
  height: 44px;
  border-radius: 9999px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  flex-shrink: 0;
  cursor: pointer;
  background: #1b98e0;
  color: #fff;
}

/* Light / White mode */
html[data-theme="light"] .voice-trash,
html[data-theme="light"] .voice-play,
html[data-theme="light"] .voice-pill {
  background: #ffffff;
  color: #111;
  border: 1px solid #d1d1d6;
}
html[data-theme="light"] .voice-play {
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}
html[data-theme="light"] .voice-timer {
  color: #111;
}
html[data-theme="light"] .voice-stop-sq {
  background: #3a3a3c;
}

@keyframes voiceSlideIn {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}
@keyframes voiceTrashIn {
  from { transform: scale(0.4); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
#voiceRecorderBar:not(.hidden) .voice-pill {
  animation: voiceSlideIn 0.28s cubic-bezier(0.22, 1, 0.36, 1);
}
#voiceRecorderBar:not(.hidden) .voice-trash {
  animation: voiceTrashIn 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}
#attachBtn {
  transition: transform 0.2s ease, opacity 0.2s ease;
}
#attachBtn.hidden {
  transform: scale(0.4);
  opacity: 0;
  pointer-events: none;
}
