/*
---------------------------
Плеер голосовых сообщений
---------------------------
Стандартный <audio controls> выглядел чужеродно внутри пузыря сообщения
(серый блок браузера). Здесь свой плеер в цветах сайта: круглая кнопка,
полоса волны с прогрессом, время, скорость воспроизведения.
Цвета взяты из темы: #3390ec (theme-color), #6990dc (шапки панелей),
#4C5C63 / #627D89 (текст). Работает на обоих фонах пузырей:
#EAEEF2 (собеседник) и #C7E3FF (мои).
*/

.socVoicePlayer {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 210px;
  max-width: 260px;
  margin: 4px 0 2px;
  font-family: 'Roboto', Tahoma, sans-serif;
  user-select: none;
  -webkit-user-select: none;
}

.socVpBtn {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: #3390ec;
  color: #fff;
  font-size: 13px;
  line-height: 34px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(51, 144, 236, .35);
  transition: background .15s, transform .1s;
  padding: 0;
}

.socVpBtn:hover { background: #2477c9; }
.socVpBtn:active { transform: scale(.94); }
.socVpBtn i { vertical-align: middle; margin-left: 2px; }
.socVpBtn.playing i { margin-left: 0; }

.socVpWave {
  flex: 1;
  min-width: 90px;
  height: 26px;
  position: relative;
  cursor: pointer;
}

.socVpBars {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  pointer-events: none;
}

.socVpBars > i {
  display: block;
  flex: 1 1 0;
  max-width: 4px;
  border-radius: 3px;
  background: rgba(76, 92, 99, .26);
}

/* слой с пройденной частью режется по ширине (clip-path, а не width —
   иначе полоски сжимались бы вместо обрезки) */
.socVpBars.socVpBarsPlay {
  clip-path: inset(0 100% 0 0);
  -webkit-clip-path: inset(0 100% 0 0);
}

.socVpBars.socVpBarsPlay > i { background: #3390ec; }

.socVpTime {
  flex-shrink: 0;
  min-width: 34px;
  font-size: 12px;
  font-weight: 500;
  color: #4C5C63;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.socVpSpeed {
  flex-shrink: 0;
  border: none;
  background: rgba(76, 92, 99, .12);
  color: #4C5C63;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  padding: 3px 5px;
  cursor: pointer;
}

.socVpSpeed:hover { background: rgba(76, 92, 99, .22); }

/* плеер на всю ширину пузыря */
.mail-message-my-form .socVoicePlayer,
.mail-message-user-form .socVoicePlayer { max-width: 100%; }
