@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400&display=swap');

.audio-player {
  position: fixed;
  bottom: 0px;
  left:0;
  transition:0.3s all ease-out;
  width: 100%;
  background: #f4f4ef;
  padding: 33px 0;
  text-align: center;
  font-family: 'Poppins', sans-serif;
  font-size: 13px;
  color:#4A5464;
  box-shadow: 0px -5px 32px 0px #00000026;
  z-index: 98;
}

.audio-player .audio-player.hidden {
  bottom: -200px;
  display: block;
}

/* Player da radio ALMG */
.audio-player.radio:not(.fixo) {
	box-shadow: none;
	position: relative;
}
.audio-player.radio.fixo {
	position: fixed;
	bottom: 0;
}
.audio-player.radio.slide-in {
  animation: playerSlideIn 0.4s ease-out forwards;
}
.audio-player.radio.slide-out {
  animation: playerSlideOut 0.4s ease-in forwards;
}
.audio-player.radio.reappear {
  animation: playerFadeSlideIn 0.4s ease-out;
}

/* Barra de progresso e tempo */
.audio-player .progress-container {
  margin: 0 auto 4px auto;
}

/* Tempo */
.audio-player .time {
  white-space: nowrap;
  min-width: 90px;
}
.audio-player.radio .time {
  min-width: auto;
}

/* ESTILO PADRÃO PARA TODAS AS BARRAS */
.audio-player .progress, 
.audio-player .volumeControl {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;  
  /*max-width:600px;*/
  height: 5px;
  border-radius: 5px;
  background-color: transparent !important;
  outline: none;
  cursor: pointer;
  overflow: visible !important;
}

.audio-player .volumeControl {
  min-width: 30px;
  max-width: 110px;
}

.audio-player button:focus-visible,
.audio-player button.play-pause:focus {
  background-color: #AB0000;
  color:#ffffff;
  -webkit-text-stroke: 0px !important;
  transition: none;
}

.audio-player .progress:focus-visible, 
.audio-player .volumeControl:focus-visible {
  outline: 3px dotted #AB0000 !important;
  outline-offset: 2px !important;
}

/* ======== Webkit (Chrome, Safari) ======== */
.audio-player .progress::-webkit-slider-runnable-track,
.audio-player .volumeControl::-webkit-slider-runnable-track {
  background: #bdbdbd;
  height: 5px;
  border-radius: 5px;
}

/* Estiliza a bolinha (thumb) */
.audio-player .progress::-webkit-slider-thumb,
.audio-player .volumeControl::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  background: #FFF;
  border: 1px solid #D3D4D5;
  border-radius: 50%;
  cursor: pointer;
  margin-top: -6px; /* Ajusta a posição */
  position: relative;
  transition: all 0.2s ease;
}

/* Cria o efeito da parte preenchida antes da bolinha */
.audio-player .progress::-webkit-slider-runnable-track,
.audio-player .volumeControl::-webkit-slider-runnable-track {
  background: linear-gradient(to right, #AC0000 var(--progress, 0%), #bdbdbd var(--progress, 0%));
}

/* ======== Mozilla Firefox ======== */
.audio-player .progress::-moz-range-track,
.audio-player .volumeControl::-moz-range-track {
  background: #bdbdbd;
  height: 5px;
  border-radius: 5px;
}

/* Parte preenchida antes da bolinha */
.audio-player .progress::-moz-range-progress,
.audio-player .volumeControl::-moz-range-progress {
  background: #AC0000;
  height: 5px;
  border-radius: 5px;
}

/* Estiliza a bolinha (thumb) */
.audio-player .progress::-moz-range-thumb,
.audio-player .volumeControl::-moz-range-thumb {
  width: 14px;
  height: 14px;
  background: #FFF;
  border: 1px solid #D3D4D5;
  border-radius: 50%;
  cursor: pointer;
}

/* ======== Internet Explorer / Edge ======== */
.audio-player .progress::-ms-track,
.audio-player .volumeControl::-ms-track {
  background: transparent;
  border-color: transparent;
  color: transparent;
}

/* Parte preenchida antes da bolinha */
.audio-player .progress::-ms-fill-lower,
.audio-player .volumeControl::-ms-fill-lower {
  background: #AC0000;
}

.audio-player .progress::-ms-fill-upper,
.audio-player .volumeControl::-ms-fill-upper {
  background: #bdbdbd;
}

/* Estiliza a bolinha (thumb) */
.audio-player .progress::-ms-thumb,
.audio-player .volumeControl::-ms-thumb {
  width: 16px;
  height: 16px;
  background: #FFF;
  border: 1px solid #D3D4D5;
  border-radius: 50%;
  cursor: pointer;
}

.audio-player.radio .volumeControl {
  min-width: 100px;
}

/* CONTROLES DO PLAYER */

/* Botões e ícones */
.audio-player button {
  background: none;
  border: none;
  cursor: pointer;
  display:inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  width: 32px;
  height: 32px;
  border-radius: 3px;
  font-size: 1.4rem;
  line-height: 100%;
  color: #4A5464;
  transition:all 0.2s ease;  
}

.audio-player button.close,
.audio-player button.close-mobile,
.audio-player button.download {
  font-size: 1.2rem;
}

.audio-player button.close,
.audio-player button.close-mobile,
.audio-player button.rewind,
.audio-player button.download,
.audio-player button.decreaseSpeed,
.audio-player button.increaseSpeed {
  -webkit-text-stroke: 1px;
}

.audio-player button.backward {
  transform: rotate(180deg);
}

.audio-player button.close {
	top: 5px;
	right: 5px;
}

.audio-player button:hover {
  background-color: #AB0000;
  color:#ffffff;
  -webkit-text-stroke: 0px;
}

.audio-player button.settingsButton[aria-expanded=true] {
  background-color: #AB0000;
  color:#ffffff;
}
.audio-player button.settingsButton i::before {
  transition: 0.2s transform ease;
}
.audio-player button.settingsButton[aria-expanded=true] i::before {
  transform: rotate(90deg);
}

/* Controle de velocidade e volume */
.audio-player .interval,
.audio-player .speed {
  font-weight: bold;
  min-width: 27px;
}

/* Menu de configurações */
.audio-player .settings {
  position: relative;
  display: inline-block;
}

.audio-player .settingsMenu {
  position: absolute;
  background: rgba(255,255,255,0.95);
  border-radius: 4px;
  box-shadow: 0px 4px 4px 0px #0000001A;
  bottom: 42px;
  right: -11px;
  min-width: 55px;
  /*transition: 0.2s all ease;*/
}

.audio-player .settingsMenu:after {
	top: 100%;
	right: 21px;
	border: solid transparent;
	content: "";
	height: 0;
	width: 0;
	position: absolute;
	pointer-events: none;
	border-top-color: rgba(255,255,255,0.95);
	border-width: 6px;
	margin-left: -6px;
}

.audio-player .settingsMenu button {
  font-size: 13px;
  width: auto;
}

.audio-player .settingsMenu button.speed-button[aria-expanded=false]::after {
	border: solid transparent;
	content: "";
	height: 0;
	width: 0;
	pointer-events: none;
	border-left-color: #728197;
	border-width: 4px;
  margin-left: 10px;
}
.audio-player .settingsMenu button.speed-button[aria-expanded=false]:hover::after,
.audio-player .settingsMenu button.speed-button[aria-expanded=false]:focus::after {
	border-left-color: #ffffff;
}

.audio-player .settingsMenu button.speed-button[aria-expanded=true] {
  position: relative;
  margin-bottom: 10px;
}
.audio-player .settingsMenu button.speed-button[aria-expanded=true] > span {
  display:none;
}
.audio-player .settingsMenu button.speed-button[aria-expanded=true]::before {
	border: solid transparent;
	content: "";
	height: 0;
	width: 0;
	pointer-events: none;
	border-right-color: #728197;
	border-width: 4px;
  margin-right: 10px;
}
.audio-player .settingsMenu button.speed-button[aria-expanded=true]:focus::before,
.audio-player .settingsMenu button.speed-button[aria-expanded=true]:hover::before {
	border-right-color: #ffffff;
}

.audio-player .settingsMenu button.speed-button:focus {
  background-color: #AB0000;
  color:#ffffff;
}

.audio-player .settingsMenu button.speed-button[aria-expanded=true]::after {
  content: '';
  display: block;
  width: 100%;
  height: 1px;
  background-color: #DDDFE5;
  position: absolute;
  top: 105%;
}

.audio-player .settingsMenu li {
  padding: 8px 15px;
  cursor: pointer;
  border-radius: 4px;
  display: flex;  
  position: relative;
}

.audio-player .settingsMenu li::before {
  background: #0000001a;
  content: "";
  height: 16px;
  margin-right: 10px;
  transition: all .3s ease;
  width: 16px;
  border-radius: 50%;
}

.audio-player .settingsMenu li.active::before {
  background-color: #AB0000;
}
.audio-player .settingsMenu li.active:hover::before {
  background-color: #9a0000;
}

.audio-player .settingsMenu li.active::after {
	background: #fff;
	content: '';
	border: 0;
	height: 6px;
	left: 20px;
	width: 6px;
	position: absolute;
	display: block;
	border-radius: 50%;
	margin-top: 5px;
}

.audio-player .settingsMenu li:hover, 
.audio-player .settingsMenu li:focus {
  background: #AB0000;
  color:#ffffff;
}

.audio-player .settingsMenu li.active {
  font-weight: bold;
}

@keyframes playerSlideIn {
  0% {
    bottom: -100px;
  }
  100% {
    bottom: 0;
  }
}

@keyframes playerSlideOut {
  0% {
    transform: translateY(0);
  }
  60% {
    transform: translateY(5%);
  }
  100% {
    transform: translateY(100%);
  }
}

@keyframes playerFadeSlideIn {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}