/***************************************************************************************
* Media player
***************************************************************************************/

// Plangular, negative top margin because of controls absolute positioning
.plangular {
  margin-top: -1px;
}

// Controls
.controls {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  padding: 0 2%;
  .progress-percentage {
    color: white;
    font-size: 80%;
    white-space: nowrap;
    margin-left: -20%;
  }
  .progress {
      margin-left: -10%;
  }
  .progress-bar {
    min-width: 0em !important;
  }
}

// Progress bar
.progress {
  position: relative;
}

.plangular-progress {
  background: transparent;
  margin: 0;
  z-index: 2;
  height: $line-height-computed;
  cursor: pointer;
}
.bootstrap-progress {
  margin-top: -($line-height-computed);
  z-index: 1;
}
.progress-percentage {
  margin-left: 10px;
}
.audio-container {
  .progress-bar {
    background: $gray;
  }
  img {
    opacity: 1;
  }
}
.plangular-icon {
  max-width: 24px;
  max-height: 24px;
  fill: whitesmoke;
  -webkit-filter: drop-shadow(0px 1px 2px rgba(0,0,0,.1));
  filter: drop-shadow(0px 1px 2px rgba(0,0,0,.1));
}

.audio-thumb-container {
  overflow: hidden;
}

// Custom YouTube poster image from YAML variable
// Use embed-container as a wrapper div for responsive Embeds instead of FitVids
.embed-container {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  max-width: 100%;
  height: auto;
}

.embed-container iframe,
.embed-container object,
.embed-container embed {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

/* image poster clicked, player class added using js */
.custom-poster {
  cursor: pointer;

  svg.icon {
    position: absolute;
    top: 50%;
    left: 50%;
    height: 70px;
    width: 70px;
    margin: -35px 0 0 -35px;
    opacity: .9;

    @media only screen and (min-width: $screen-md-min){
      height: 120px;
      width: 120px;
      margin: -60px 0 0 -60px;
    }
  }
}

.controls svg.icon {
  width: 40px;
  height: 40px;
  margin-top: -($line-height-computed/2);
}

.custom-poster.player img,
.custom-poster.player svg {
  display: none;
}

.custom-poster.player:after {
  display: none;
}
.media-aspect-content {
  background: black;
  overflow: hidden;
}
.soundcloud-attribution {
  position: absolute;
  top: 10px;
  right: 0;
  padding: 0 2%;
}
