@use '../../abstracts/variables' as *;

// -----------------------------------------------------------------------------
// Audio Story: audio-driven slideshow with captions
// Template: templates/audiostory.mustache
// -----------------------------------------------------------------------------

.audiostoryplayer {
  margin: 0;
  padding: 20px;
  background: $grey-950;
  font-family: sans-serif;
  color: $white;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.mod_minilesson_audiostory_cont {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.audiostory_audio {
  max-width: 600px;
}

.audiostory_slideshow_container {
  width: 100%;
  aspect-ratio: 3 / 2;
  position: relative;
  overflow: hidden;
  background: $black;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba($white, 0.1);
}

.audiostory_image_container {
  position: absolute;
  width: 100%;
  height: 100%;
  background-size: 110%;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.3) translate(0, 0);
  transition: opacity 1s ease-in-out;

  img {
    height: auto;
    object-fit: cover;
    width: 120%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
  }
}

.audiostory_overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba($black, 0.5);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.audiostory_play_button {
  font-size: 2rem;
  background: $white;
  border: none;
  padding: 1em 2em;
  border-radius: 1em;
  cursor: pointer;
  box-shadow: 0 0 10px rgba($black, 0.3);
}

.audiostory_caption {
  min-height: 45px;
}
