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

// -----------------------------------------------------------------------------
// Question Content: shared media containers for all activity types
// Template: templates/questioncontent.mustache
// Contains: image, video, audio, iframe, youtube, ttsaudio, ttsdialog, ttspassage, textarea
// -----------------------------------------------------------------------------

.minilesson_questionheader_contents {
  margin-bottom: 10px;
  margin-top: 10px;
}

// Media elements
.mod_minilesson_itemaudio,
.mod_minilesson_itemvideo,
.mod_minilesson_itemimage {
  width: 100%;
  max-width: 400px;
  margin: auto;
}

.mod_minilesson_itemtextarea {
  width: 100%;
  max-width: 600px;
  margin: auto;
}

// Media containers (shared)
.mod_minilesson_itemimage_cont,
.mod_minilesson_itemvideo_cont,
.mod_minilesson_itemaudio_cont,
.mod_minilesson_itemiframe_cont,
.mod_minilesson_itemttsaudio_cont,
.mod_minilesson_itemttsdialog_cont,
.mod_minilesson_itemytclip_cont {
  width: 100%;
  margin-top: 10px;
  text-align: center;
}

// Magazine layout (image floated left)
.mod_minilesson_itemimage_cont.mod_minilesson_magazine {
  max-width: 250px;
  float: left;
  padding: 5px;
}

// Textarea container
.mod_minilesson_itemtextarea_cont {
  width: 100%;
  margin-top: 10px;
  padding: 5px;
}

// TTS passage container
.mod_minilesson_itemttspassage_cont {
  width: 100%;
  margin-top: 10px;
  padding: 8px;
  font-size: large;
  border: 1px solid $grey;
  border-radius: 0.5em;
}

// Iframe/YouTube containers
.mod_minilesson_itemiframe_cont,
.mod_minilesson_itemytclip_cont {
  margin-top: 10px;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  width: 100%;
  height: 100%;
  max-width: 560px;
  max-height: 315px;
}

.mod_minilesson_iframe_responsive {
  overflow: hidden;
  padding-bottom: 56.25%;
  position: relative;
  height: 0;
  margin: auto;

  iframe {
    left: 0;
    top: 0;
    height: 100%;
    width: 100%;
    position: absolute;
    max-width: 560px;
    max-height: 315px;
  }
}

.ml_mediaprompt_instructions {
  margin-bottom: 30px;
  margin-left: 25%;
}

.minilesson_sentence_image {
  max-width: 400px;
  width: 75%;
  margin-left: auto;
  margin-right: auto;
}

.minilesson_padded_image {
  margin: 36px 0;
  position: relative;
  width: 100%;
  padding-bottom: 75%;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;

  img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: scale-down;
  }
}
