/*
 * Copyright 2019 dialog LLC <info@dlg.im>
 */

@import '../../styles/variables.css';

:root {
  --audio-player-font-family: var(--default-font-family);
}

/* Reset */
.container {
  all: initial;
}

/* Styles */
.player {
  display: flex;
  flex: 1 1 auto;
  @mixin flex-fix;
}

.playerControls {
  display: flex;
  flex-direction: column;
  padding-top: 20px;
  flex: 1 1 auto;
  @mixin flex-fix;
}

.playerControlsText {
  flex: 1 1 auto;
  @mixin flex-fix;
}

.playerTime {
  display: flex;
  flex-flow: row nowrap;
  align-content: center;
  align-items: center;
  justify-content: flex-start;
  height: 16px;
  padding-top: 2px;
  padding-bottom: 2px;
  flex: 1 1 auto;
  font-size: 13px;
  font-family: var(--audio-player-font-family);
  color: var(--default-font-color-light);
}

.currentTime {
  flex: 1 1 auto;
  display: block;
  letter-spacing: -0.3px;
  line-height: 16px;
  @mixin text-overflow-ellipsis;
}

.durationTime {
  flex: 0 0 auto;
}

.seeker {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 6px;
  cursor: pointer;
  border-radius: 6px;
  background-color: color-mod(var(--color-primary) alpha(10%));
}

.seekerPlayed {
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  transition: width 100ms linear;
  background-color: var(--color-primary);
}

.uploading {
  opacity: 0.7;
  position: relative;
  cursor: default !important;
  pointer-events: none;
}

.error {
  color: var(--color-danger);
}

.seekerError {
  background-color: color-mod(var(--color-danger) alpha(10%));

  & .seekerPlayed {
    background-color: var(--color-danger);
  }
}

.state {
  display: inline-block;
}

.sender {
  display: inline;
}

.peerInfo {
  display: inline-block;
}
