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

// -----------------------------------------------------------------------------
// List Item Results: per-item results panel with scores and audio playback
// Template: templates/listitemresults.mustache
// -----------------------------------------------------------------------------

.mod_minilesson_result_div {
  display: inline-block;
  width: 100%;
  height: auto;
  margin: 0;
  padding: 0;
  border: 0;
  vertical-align: top;
  position: relative;
  padding-top: 13px;
}

.mod_minilesson_result_index {
  font-weight: bold;
  position: absolute;
  left: 0;
  top: 17px;
  width: 36px;
  background-color: $grey-500;
  text-align: center;
  border-bottom: 0;
  border-right: 0;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50px;
  padding: 6px;
}

.mod_minilesson_result_title {
  position: inherit;
  top: 0;
  right: 9px;
  left: 29px;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: left;
  font-weight: bold;
  justify-content: space-between;
  box-shadow: 0 0 8px rgb(0 0 0 / 32%);
  padding-left: 11px;
  font-size: 18px;
  padding-top: 10px;
  padding-bottom: 10px;
  padding-right: 16px;
}

ul.minilesson_result {
  list-style: none;
  display: flex;
  margin-left: 0;
  padding-left: 0;
  justify-content: space-between;
}

ul.minilesson_result li:nth-child(1) {
  margin-left: 0;
}

ul.minilesson_result li {
  margin: 0 20px;
}

#itemscores .panel.panel-default {
  box-shadow: 0 0 8px rgb(0 0 0 / 32%);
  margin-left: 46px;
}

#itemscores #accordion .panel-body {
  box-shadow: 0 0 8px rgb(0 0 0 / 32%);
  padding: 11px;
  margin-top: 12px;
  text-align: left;
}

a.accordion-toggle.mod_minilesson_result_title {
  text-decoration: none;
}

div#itemscores {
  margin: 0 20px;
}

.mod_minilesson_result_div .panel-group .panel-heading a:after {
  content: '-';
  float: right;
  font-size: 25px;
}

.mod_minilesson_result_div .panel-group .panel-heading a.collapsed:after {
  content: '+' !important;
}

@media screen and (max-width: 922px) {
  .mod_minilesson_result_rating img {
    max-width: 16px;
  }

  ul.minilesson_result li {
    margin: 0px 8px;
    width: 20%;
    font-size: 12px;
  }
}

@media screen and (max-width: 480px) {
  ul.minilesson_result {
    display: block;
  }

  ul.minilesson_result li {
    margin: 11px 0;
    width: 100%;
    font-size: 16px;
  }

  .mod_minilesson_result_rating img {
    max-width: 100%;
  }
}

// Per-item result rows

.ml_listitem_result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px;
}

.ml_listitem_result .ml_li_resultitem {
  display: flex;
  flex-wrap: wrap;
  flex-grow: 1;
  margin-left: 3px;
  margin-right: 3px;
}

.ml_listitem_result .ml_li_resultaudio,
.ml_listitem_result .ml_li_resultstatus {
  flex-shrink: 0;
}

.ml_listitem_result .ml_li_resultaudio {
  color: #D0CED7;
}

.ml_listitem_result .ml_li_resultstatus {
  padding: 3px;
  margin: 5px;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: $white;
  border-radius: 50%;
  border: none;
}

.ml_listitem_result .ml_li_resultstatus.ml_correct {
  background-color: $success;
}

.ml_listitem_result .ml_li_resultstatus.ml_incorrect {
  background-color: $error-light;
}

.minilesson_resultspanel_swish {
  text-align: center;
  font-size: x-large;
}

.ml_qf_itemresults {
  max-width: 80%;
  margin: auto;
}

.btn.ml_li_resultaudioself {
  color: #D0CED7;
}

// Results container styling

.ml_listitem_results {
  background-color: $primary-bg-muted-lighter;
}

.ml_listitem-container {
  background-color: $white;
  box-shadow: $subtle-shadow;
  border-radius: 8px;
}

.result-container {
  width: fit-content;
  padding-top: 20px;
  min-width: 150px;
  border-radius: 8px;
  box-shadow: $subtle-shadow;
  background-color: $white;
}

.star-container {
  border-radius: 50%;
  width: 45px;
  height: 45px;
  top: -20px;
  left: 52px;
  color: $warning;
  font-size: 24px;
  background-color: $white;
  padding: 0.6rem !important;

  .fa-star {
    font-size: 20px;
  }
}

.result-font {
  color: $text-indigo;
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 0;

  .result-denominator {
    color: $text-muted;
    font-weight: 300;
  }
}

.correct-text {
  color: $text-indigo;
}

span.correctitem {
  color: $success-text;
  font-weight: 700;
  margin-left: 2px;
  margin-right: 2px;
}

span.wrongitem {
  font-weight: 700;
  color: $error;
  margin-left: 2px;
  margin-right: 2px;
}

.itemscoresbutton {
  text-align: center;
}
