/* Youbeats footer waveform player. Kept outside player.js so the layout is
   present even when player initialisation is delayed or fails. */
.app-footer.app-player {
  height: 76px !important;
  background: #17171b !important;
  border-top: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, .45);
  overflow: visible;
}

.app-footer.app-player:not(.hide) ~ .app-body {
  padding-bottom: 76px !important;
}

.app-footer.app-player *,
.app-footer.app-player *::before,
.app-footer.app-player *::after {
  box-sizing: border-box;
}

.app-footer.app-player .playlist,
.app-footer.app-player .mejs-container,
.app-footer.app-player .mejs-inner {
  width: 100% !important;
  height: 76px !important;
  min-width: 0 !important;
}

.app-footer.app-player .mejs-inner {
  display: flex !important;
  align-items: stretch !important;
  gap: 12px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px 0 0 !important;
  overflow: hidden;
}

.app-footer.app-player .mejs-mediaelement {
  position: absolute !important;
  width: 0 !important;
  height: 0 !important;
  overflow: hidden !important;
}

.app-footer.app-player .mejs-clear,
.app-footer.app-player .mejs-poster,
.app-footer.app-player .mejs-overlay-error,
.app-footer.app-player .mejs-track-source {
  display: none !important;
}

.app-footer.app-player .mejs-layers {
  position: relative !important;
  inset: auto !important;
  display: flex !important;
  flex: 0 1 272px !important;
  align-items: center !important;
  gap: 12px;
  width: auto !important;
  min-width: 0 !important;
  overflow: hidden;
  z-index: 2;
}

.app-footer.app-player .mejs-track-artwork {
  position: static !important;
  float: none !important;
  flex: 0 0 76px !important;
  width: 76px !important;
  height: 76px !important;
  margin: 0 !important;
  border-radius: 0 !important;
  background-color: rgba(255, 255, 255, .06);
}

.app-footer.app-player .mejs-track-details {
  align-self: center;
  min-width: 0;
  max-width: 180px;
  margin: 0 0 0 4px !important;
  padding: 0 !important;
  overflow: hidden;
  font-family: Poppins, "Trebuchet MS", "PT Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

.app-footer.app-player .mejs-track-title,
.app-footer.app-player .mejs-track-author {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.app-footer.app-player .mejs-track-title {
  color: rgba(255, 255, 255, .92);
  font-size: 14px !important;
  font-weight: 600;
  line-height: 1.3;
}

.app-footer.app-player .mejs-track-author {
  color: rgba(255, 255, 255, .55) !important;
  font-size: 12px !important;
  line-height: 1.3;
  opacity: 1 !important;
}

.app-footer.app-player .mejs-track-title a,
.app-footer.app-player .mejs-track-author a {
  color: inherit;
}

.app-footer.app-player .mejs-controls {
  position: relative !important;
  display: flex !important;
  flex: 1 1 0 !important;
  align-items: center !important;
  width: auto !important;
  min-width: 0 !important;
  height: 76px !important;
  overflow: hidden;
}

.app-footer.app-player .mejs-controls > div {
  position: relative !important;
  inset: auto !important;
  flex-shrink: 0;
}

.app-footer.app-player .mejs-time-rail {
  order: 6;
  flex: 1 1 120px !important;
  width: auto !important;
  min-width: 80px !important;
  max-width: 520px;
  height: 40px !important;
  margin: 0 8px !important;
  overflow: hidden;
}

.app-footer.app-player .yb-waveform-canvas {
  z-index: 1;
}

.app-footer.app-player .yb-wave-range-selection {
  position: absolute;
  top: 2px;
  bottom: 2px;
  z-index: 2;
  border-top: 1px solid rgba(193, 46, 42, .9);
  border-bottom: 1px solid rgba(193, 46, 42, .9);
  background: rgba(193, 46, 42, .12);
  pointer-events: none;
}

.app-footer.app-player .yb-wave-range-handle {
  position: absolute !important;
  top: 1px !important;
  bottom: 1px !important;
  z-index: 4;
  display: block !important;
  width: 12px !important;
  min-width: 12px !important;
  height: 38px !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 3px !important;
  outline: 0;
  background: transparent !important;
  cursor: ew-resize;
  touch-action: none;
}

.app-footer.app-player .yb-wave-range-handle-end {
  margin-left: -12px !important;
}

.app-footer.app-player .yb-wave-range-handle::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 5px;
  width: 2px;
  border-radius: 2px;
  background: #f15a55;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, .4), 0 0 6px rgba(241, 90, 85, .65);
}

.app-footer.app-player .yb-wave-range-handle::after {
  content: "";
  position: absolute;
  top: 0;
  left: 2px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: #f15a55;
}

.app-footer.app-player .yb-wave-range-handle-end::after {
  top: auto;
  bottom: 0;
}

.app-footer.app-player .mejs-time-rail .mejs-time-buffering,
.app-footer.app-player .mejs-time-rail .mejs-time-loaded,
.app-footer.app-player .mejs-time-rail .mejs-time-current,
.app-footer.app-player .mejs-time-rail .mejs-time-total::before,
.app-footer.app-player .mejs-time-rail .mejs-time-handle {
  display: none !important;
}

.app-footer.app-player .mejs-time {
  order: 7;
  position: relative !important;
  inset: auto !important;
  width: 90px !important;
  min-width: 90px !important;
  padding: 0 !important;
  color: rgba(255, 255, 255, .5);
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

.app-footer.app-player .mejs-shuffle-button { order: 1; }
.app-footer.app-player .mejs-previous-button { order: 2; }
.app-footer.app-player .mejs-playpause-button { order: 3; margin: 0 4px; }
.app-footer.app-player .mejs-next-button { order: 4; }
.app-footer.app-player .mejs-repeat-button { order: 5; margin-right: 8px; }
.app-footer.app-player .mejs-volume-button { order: 8; margin-left: 8px; }
.app-footer.app-player .mejs-toggle-playlist-button { order: 9; }

.app-footer.app-player .yb-player-buy {
  order: 10;
  flex: 0 0 auto;
  margin-left: 8px;
  white-space: nowrap;
}

.app-footer.app-player .playlist .tracks {
  bottom: 76px !important;
}

@media (max-width: 900px) {
  .app-footer.app-player .mejs-inner {
    gap: 6px;
    padding-right: 10px !important;
  }

  .app-footer.app-player .mejs-layers {
    flex-basis: 190px !important;
  }

  .app-footer.app-player .mejs-track-details {
    max-width: 100px;
  }

  .app-footer.app-player .mejs-shuffle-button,
  .app-footer.app-player .mejs-repeat-button {
    display: none !important;
  }
}

@media (max-width: 680px) {
  .app-footer.app-player .mejs-layers {
    flex: 0 0 52px !important;
  }

  .app-footer.app-player .mejs-track-artwork {
    flex-basis: 52px !important;
    width: 52px !important;
    height: 52px !important;
    margin-left: 8px !important;
  }

  .app-footer.app-player .mejs-track-details,
  .app-footer.app-player .mejs-previous-button,
  .app-footer.app-player .mejs-next-button,
  .app-footer.app-player .mejs-volume-button,
  .app-footer.app-player .yb-player-buy {
    display: none !important;
  }

  .app-footer.app-player .mejs-time {
    width: 72px !important;
    min-width: 72px !important;
    font-size: 11px;
  }
}

@media (max-width: 420px) {
  .app-footer.app-player .mejs-inner {
    gap: 2px;
    padding-right: 6px !important;
  }

  .app-footer.app-player .mejs-layers {
    flex-basis: 42px !important;
  }

  .app-footer.app-player .mejs-track-artwork {
    flex-basis: 36px !important;
    width: 36px !important;
    height: 36px !important;
    margin-left: 6px !important;
  }

  .app-footer.app-player .mejs-time {
    display: none !important;
  }

  .app-footer.app-player .mejs-time-rail {
    min-width: 60px !important;
    margin: 0 4px !important;
  }
}
