/* =======================================================
*
*	ELSM Audio Player
*	Custom player for the Zone Conference recordings.
*	Palette follows style.css: accent #ef6249, text #323232.
*
* ======================================================= */

.elsm-tracks {
  list-style: none;
  margin: 0 0 2em 0;
  padding: 0;
}

.elsm-track {
  position: relative;
  background: #fff;
  border: 1px solid #ebebeb;
  border-radius: 6px;
  padding: 22px 24px 20px 24px;
  margin-bottom: 20px;
  -webkit-transition: border-color 0.3s, box-shadow 0.3s;
  -o-transition: border-color 0.3s, box-shadow 0.3s;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.elsm-track:hover {
  border-color: #ddd;
  box-shadow: 0 6px 22px rgba(0, 0, 0, 0.07);
}

.elsm-track.is-playing {
  border-color: #ef6249;
  box-shadow: 0 6px 22px rgba(239, 98, 73, 0.14);
}

/* ---------- heading row ---------- */

.elsm-track-head {
  margin-bottom: 18px;
}

.elsm-track-title {
  font-size: 19px;
  line-height: 1.35;
  color: #5a5a5a;
  font-weight: 400;
  margin: 0 0 4px 0;
}

.elsm-track.is-playing .elsm-track-title {
  color: #ef6249;
}

.elsm-track-meta {
  font-size: 13px;
  color: #9a9a9a;
  margin: 0;
}

.elsm-track-meta span,
.elsm-track-meta a {
  display: inline-block;
  margin-right: 6px;
}

.elsm-track-meta .elsm-sep {
  color: #d5d5d5;
  margin-right: 6px;
}

.elsm-track-meta a {
  color: #9a9a9a;
  border-bottom: 1px solid transparent;
}

.elsm-track-meta a:hover {
  color: #ef6249 !important;
  border-bottom-color: #ef6249;
}

.elsm-track-meta a i {
  margin-right: 4px;
  font-size: 12px;
}

/* ---------- transport row ---------- */

.elsm-controls {
  display: -webkit-box;
  display: -ms-flexbox;
  display: flex;
  -webkit-box-align: center;
  -ms-flex-align: center;
  align-items: center;
}

.elsm-transport {
  -ms-flex-negative: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.elsm-btn {
  display: inline-block;
  vertical-align: middle;
  border: 0;
  background: none;
  padding: 0;
  color: #9a9a9a;
  cursor: pointer;
  -webkit-transition: color 0.25s, background-color 0.25s, -webkit-transform 0.15s;
  -o-transition: color 0.25s, background-color 0.25s, transform 0.15s;
  transition: color 0.25s, background-color 0.25s, transform 0.15s;
}

.elsm-btn:focus {
  outline: 2px solid rgba(239, 98, 73, 0.55);
  outline-offset: 3px;
}

.elsm-btn:hover {
  color: #ef6249;
}

/* skip back / skip forward */

.elsm-skip {
  position: relative;
  width: 38px;
  height: 38px;
  font-size: 17px;
  border-radius: 50%;
}

.elsm-skip:hover {
  background: #f7f7f7;
}

.elsm-skip i {
  position: relative;
  top: -3px;
}

.elsm-skip .elsm-skip-secs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 3px;
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.02em;
  font-family: "Open Sans", Arial, sans-serif;
}

/* the big play / pause button */

.elsm-play {
  width: 54px;
  height: 54px;
  margin: 0 10px;
  border-radius: 50%;
  background: #ef6249;
  color: #fff;
  font-size: 20px;
  line-height: 54px;
  text-align: center;
  box-shadow: 0 4px 12px rgba(239, 98, 73, 0.32);
}

.elsm-play:hover {
  color: #fff;
  background: #e94e33;
  -webkit-transform: scale(1.05);
  -ms-transform: scale(1.05);
  transform: scale(1.05);
}

.elsm-play i {
  /* nudge the play triangle onto the optical centre of the circle */
  margin-left: 3px;
}

.elsm-track.is-playing .elsm-play i {
  margin-left: 0;
}

/* buffering: swap the glyph for a spinner */

.elsm-play.is-loading i {
  -webkit-animation: elsm-spin 0.9s linear infinite;
  animation: elsm-spin 0.9s linear infinite;
  margin-left: 0;
}

@-webkit-keyframes elsm-spin {
  100% { -webkit-transform: rotate(360deg); }
}

@keyframes elsm-spin {
  100% { transform: rotate(360deg); }
}

/* ---------- progress ---------- */

.elsm-timeline {
  -webkit-box-flex: 1;
  -ms-flex: 1 1 auto;
  flex: 1 1 auto;
  min-width: 0;
  margin: 0 18px;
}

/* padded wrapper so the 6px bar has a comfortable hit area */
.elsm-progress {
  position: relative;
  padding: 9px 0;
  cursor: pointer;
  -ms-touch-action: none;
  touch-action: none;
}

.elsm-progress:focus {
  outline: 2px solid rgba(239, 98, 73, 0.55);
  outline-offset: 2px;
}

.elsm-progress-track {
  position: relative;
  height: 6px;
  border-radius: 3px;
  background: #ececec;
  overflow: hidden;
}

.elsm-buffered,
.elsm-played {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 0;
  border-radius: 3px;
}

.elsm-buffered {
  background: #d2d2d2;
}

.elsm-played {
  background: #ef6249;
}

.elsm-handle {
  position: absolute;
  top: 50%;
  left: 0;
  width: 14px;
  height: 14px;
  margin-top: -7px;
  margin-left: -7px;
  border-radius: 50%;
  background: #ef6249;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
  opacity: 0;
  -webkit-transition: opacity 0.2s;
  -o-transition: opacity 0.2s;
  transition: opacity 0.2s;
}

.elsm-progress:hover .elsm-handle,
.elsm-progress:focus .elsm-handle,
.elsm-progress.is-scrubbing .elsm-handle,
.elsm-track.is-playing .elsm-handle {
  opacity: 1;
}

.elsm-times {
  font-size: 12px;
  color: #9a9a9a;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.elsm-times:after {
  content: "";
  display: table;
  clear: both;
}

.elsm-times .elsm-duration {
  float: right;
}

/* ---------- speed + volume ---------- */

.elsm-extras {
  -ms-flex-negative: 0;
  flex-shrink: 0;
  white-space: nowrap;
}

.elsm-speed {
  min-width: 46px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid #e3e3e3;
  border-radius: 15px;
  font-size: 12px;
  font-weight: 600;
  color: #7d7d7d;
  font-family: "Open Sans", Arial, sans-serif;
}

.elsm-speed:hover {
  border-color: #ef6249;
  color: #ef6249;
}

.elsm-speed.is-modified {
  border-color: #ef6249;
  color: #ef6249;
  background: rgba(239, 98, 73, 0.07);
}

.elsm-volume-wrap {
  display: inline-block;
  vertical-align: middle;
  margin-left: 6px;
  white-space: nowrap;
}

.elsm-mute {
  width: 32px;
  height: 32px;
  font-size: 15px;
  border-radius: 50%;
}

.elsm-volume {
  width: 0;
  opacity: 0;
  vertical-align: middle;
  margin-left: 2px;
  -webkit-transition: width 0.25s, opacity 0.25s;
  -o-transition: width 0.25s, opacity 0.25s;
  transition: width 0.25s, opacity 0.25s;
}

.elsm-volume-wrap:hover .elsm-volume,
.elsm-volume:focus {
  width: 74px;
  opacity: 1;
}

/* range input styling, kept deliberately light */
.elsm-volume {
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  background: #e3e3e3;
}

.elsm-volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #ef6249;
  cursor: pointer;
}

.elsm-volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #ef6249;
  cursor: pointer;
}

/* ---------- resume + error notices ---------- */

.elsm-note {
  display: none;
  font-size: 12.5px;
  color: #9a9a9a;
  margin: 14px 0 0 0;
  padding-top: 12px;
  border-top: 1px solid #f2f2f2;
}

.elsm-note.is-visible {
  display: block;
}

.elsm-note button {
  border: 0;
  background: none;
  padding: 0;
  margin-left: 4px;
  color: #ef6249;
  border-bottom: 1px solid rgba(239, 98, 73, 0.4);
  cursor: pointer;
}

.elsm-note button:hover {
  border-bottom-color: #ef6249;
}

.elsm-track.has-error .elsm-note {
  display: block;
  color: #c0392b;
}

.elsm-track.has-error .elsm-controls {
  opacity: 0.45;
  pointer-events: none;
}

/* keyboard shortcut hint under the list */

.elsm-shortcuts {
  display: none;
  font-size: 12.5px;
  color: #9a9a9a;
  margin: 0 0 1.5em 0;
}

.elsm-shortcuts kbd {
  display: inline-block;
  min-width: 18px;
  padding: 1px 5px;
  margin: 0 1px;
  font-family: "Open Sans", Arial, sans-serif;
  font-size: 11px;
  color: #7d7d7d;
  text-align: center;
  background: #f7f7f7;
  border: 1px solid #e3e3e3;
  border-bottom-width: 2px;
  border-radius: 3px;
  box-shadow: none;
}

/* ---------- no-JS fallback ---------- */

.elsm-fallback {
  width: 100%;
  max-width: 100%;
}

.elsm-track audio:not([controls]) {
  display: none;
}

/* ---------- small screens ---------- */

@media screen and (max-width: 768px) {
  .elsm-track {
    padding: 18px 16px 16px 16px;
  }

  .elsm-controls {
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
  }

  /* timeline drops onto its own line above the buttons */
  .elsm-timeline {
    -webkit-box-ordinal-group: 0;
    -ms-flex-order: -1;
    order: -1;
    -ms-flex-preferred-size: 100%;
    flex-basis: 100%;
    margin: 0 0 10px 0;
  }

  .elsm-extras {
    margin-left: auto;
  }

  /* the slider is fiddly on touch, but keep the mute toggle */
  .elsm-volume {
    display: none;
  }

  .elsm-track-title {
    font-size: 17px;
  }
}
