/* Voice module styles */
.message-media.voice-message-player {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  width: min(280px, 100%);
  max-width: 100%;
  padding: 8px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.12);
  overflow: hidden;
}

.voice-message-play {
  width: 34px;
  min-width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: none;
}

.voice-message-play-icon {
  width: 0;
  height: 0;
  border-left: 10px solid currentColor;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  margin-left: 2px;
}

.voice-message-play.is-playing .voice-message-play-icon {
  width: 10px;
  height: 12px;
  border: 0;
  background:
    linear-gradient(90deg, currentColor 0 40%, transparent 40% 60%, currentColor 60% 100%);
  margin-left: 0;
}

.voice-message-main {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.voice-message-track {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 26px;
  display: flex;
  align-items: center;
  cursor: pointer;
  touch-action: none;
}

.voice-message-wave {
  width: 100%;
  height: 18px;
  display: flex;
  align-items: center;
  gap: 2px;
}

.voice-message-wave span {
  flex: 1 1 0;
  min-width: 3px;
  border-radius: 999px;
  background: rgba(255,255,255,.38);
  transition: background-color .18s ease, opacity .18s ease;
}

.voice-message-wave span.is-active {
  background: #ffffff;
}

.voice-message-progress {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 100%;
  width: var(--voice-progress, 0%);
  pointer-events: none;
}

.voice-message-thumb {
  position: absolute;
  top: 50%;
  left: var(--voice-progress, 0%);
  transform: translate(-50%, -50%);
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 0 0 2px rgba(255,255,255,.18);
  pointer-events: none;
}

.voice-message-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.voice-message-speed {
  width: auto;
  min-width: 40px;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  background: rgba(255,255,255,.16);
  box-shadow: none;
}

.voice-message-duration {
  min-width: 0;
  margin-left: auto;
  font-size: 12px;
  white-space: nowrap;
}
