/* voice_whatsapp.css */
/* Общий пузырь голосового сообщения */
.voice-bubble {
  position: relative;
  padding: 6px 10px;
  border-radius: 10px;
  background: #202c33;
  display: flex;
  align-items: center;
  gap: 8px;
}

.voice-inner {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.voice-play {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: none;
  background: #00a884;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
}

.voice-info {
  position: relative;
  flex: 1;
}

.voice-waveform {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 80px;
  overflow: hidden;
}

.voice-bar {
  width: 3px;
  border-radius: 999px;
  background: #54656f;
  height: calc(var(--bar-h, 40) * 1px);
  transform-origin: bottom;
}

.voice-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: #00a884;
  border-radius: 999px;
}

.voice-speed {
  border: none;
  background: transparent;
  color: #aebac1;
  font-size: 12px;
  cursor: pointer;
  padding: 0 4px;
}

/* Анимация при воспроизведении */
.voice-playing .voice-bar {
  animation: voicePulse 1.2s ease-in-out infinite alternate;
}

@keyframes voicePulse {
  from { opacity: .6; }
  to { opacity: 1; transform: scaleY(1.1); }
}

/* Оверлей записи (как в WhatsApp Web) */
.voice-record-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
  z-index: 9999;
}

.voice-record-overlay .vr-card {
  margin-top: 40px;
  padding: 10px 20px;
  border-radius: 999px;
  background: rgba(11, 20, 26, 0.96);
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 6px 25px rgba(0,0,0,.6);
  color: #e9edef;
  pointer-events: auto;
}

.vr-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f15c6d;
  box-shadow: 0 0 8px #f15c6d;
  animation: vr-dot-pulse 1s linear infinite;
}

.vr-text-main {
  font-size: 14px;
  font-weight: 500;
}

.vr-text-sub {
  font-size: 12px;
  color: #8696a0;
}

@keyframes vr-dot-pulse {
  0% { transform: scale(1); opacity: 1; }
  100% { transform: scale(1.4); opacity: .2; }
}

.voice-record-overlay.vr-canceled .vr-card {
  background: rgba(32,44,51,0.96);
}

