//---- Question
//---- Module Activity

.questionbank h2 {
    margin-top: 0;
}

.questioncategories h3 {
    margin-top: 0;
}

#chooseqtypebox {
    margin-top: 1em;
}

#chooseqtype h3 {
    margin: 0 0 0.3em;
}

#chooseqtype .instruction {
    display: none;
}

#chooseqtype .fakeqtypes {
    border-top: 1px solid $border-color;

    .theme-dark & {
        border-color: $dm-border-color;
    }
}

#chooseqtype .qtypeoption {
    margin-bottom: 0.5em;
}

#chooseqtype label {
    display: block;
}

#chooseqtype .qtypename img {
    padding: 0 0.3em;
}

#chooseqtype .qtypename {
    display: inline-table;
    width: 16em;
}

#chooseqtype .qtypesummary {
    display: block;
    margin: 0 2em;
}

#chooseqtype .submitbuttons {
    margin: 0.7em 0;
    text-align: center;
}

#qtypechoicecontainer {
    display: none;
}

#qtypechoicecontainer_c.yui-panel-container.shadow .underlay {
    background: none;
}

#qtypechoicecontainer.yui-panel .hd {
    color: #333;
    letter-spacing: 1px;
    text-shadow: 1px 1px 1px #fff;

    @include border-top-radius(10px);
    border: 1px solid #ccc;
    border-bottom: 1px solid #bbb;

    @include gradient-y(#fff, #ccc);
}

#qtypechoicecontainer {
    font-size: 12px;
    color: #333;
    background: #f2f2f2;

    @include border-radius(10px);
    border: 1px solid #ccc;
    border-top: 0 none;

    @include box-shadow(5px 5px 20px 0 #666);
}

#qtypechoicecontainer #chooseqtype {
    width: 40em;
}

#chooseqtypehead h3 {
    margin: 0;
    font-weight: normal;
}

#chooseqtype .qtypes {
    position: relative;
    border-bottom: 1px solid $border-color;
    padding: 0.24em 0;

    .theme-dark & {
        border-color: $dm-border-color;
    }
}

#chooseqtype .alloptions {
    overflow-x: hidden;
    overflow-y: auto;
    max-height: calc(100vh - 15em);
    width: 60%;
}

#chooseqtype .qtypeoption {
    margin-bottom: 0;
    padding: 0.3em 0.3em 0.3em 1.6em;
}

#chooseqtype .qtypeoption img {
    vertical-align: text-bottom;
    padding-left: 1em;
    padding-right: 0.5em;
}

#chooseqtype .selected {
    background-color: #fff;

    @include box-shadow(0 0 10px 0 #ccc);

    .theme-dark & {
        filter: invert(1);
    }
}

#chooseqtype .instruction,
#chooseqtype .qtypesummary {
    display: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 60%;
    margin: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 1.5em 1.6em;
    background-color: $white;

    .theme-dark & {
        border-color: $dm-gray-100;
    }
}

#chooseqtype .instruction,
#chooseqtype .selected .qtypesummary {
    display: block;
}

#categoryquestions {
    margin: 0;

    td,
    th {
        padding: 0 0.2em;
        color: $body-color;

        .theme-dark & {
            color: $dm-body-color;
        }

        div {
            align-items: center;
            flex-wrap: wrap;
        }
    }

    th {
        text-align: left;
        font-weight: normal;
    }

    .checkbox {
        padding-left: 5px;
    }

    .checkbox input[type="checkbox"] {
        margin-left: 0;
        float: none;
    }

    .iconcol {
        width: 60px;
        padding: 3px;
        box-sizing: content-box;

        .icon {
            padding: 0;
            margin: 0;
            width: 24px;
            height: 24px;
        }
    }

    label {
        margin: 0;
        display: block;
    }

    .header {
        text-align: left;
    }
}


.questionbank .singleselect {
    margin: 0;
}

/* Question editing form */
#combinedfeedbackhdr div.fhtmleditor {
    padding: 0;
}

#combinedfeedbackhdr div.fcheckbox {
    margin-bottom: 1em;
}

#multitriesheader div.fitem_feditor {
    margin-top: 1em;
}

#multitriesheader div.fitem_fgroup {
    margin-bottom: 1em;
}

#multitriesheader div.fitem_fgroup fieldset.felement label {
    margin-left: 0.3em;
    margin-right: 0.3em;
}

body.path-question-type {

    /* Hacks to display the labels within a form group. */
    .form-group .sr-only:not(legend) {
        position: static;
        width: auto;
        height: auto;
        padding: 0;
        margin: 0 0.5rem 0 0;
        overflow: visible;
        clip: auto;
        clip-path: none;
        border: 0;
    }
}

//TODO dodać tutaj pozostałe style ze spodu
.que .info .questionflag.editable {
    cursor: pointer;
}

//remove icon - there is a bug, different icons on user view and different on admin view
.que .info .editquestion img,
.que .info .questionflag img,
.que .info .questionflag input {
    display: none;
}

.que {

    .r0,
    .r1 {
        border-radius: $btn-border-radius;
        display: flex;
        align-items: center;
    }
}

.que.multichoice .answer div.r0 .icon.fa-check,
.que.multichoice .answer div.r1 .icon.fa-check,
.que.multichoice .answer div.r0 .icon.fa-remove,
.que.multichoice .answer div.r1 .icon.fa-remove {
    text-indent: 0;
}

.que.multichoice .answer div.r0,
.que.multichoice .answer div.r1 {
    padding: 10px;
    border-radius: $btn-border-radius;

    align-items: center;

    .icon {
        margin-right: 10px;
    }

    input {
        margin: 6px 20px 6px 10px;
    }
}

.que.multichoice .answer .answernumber {
    min-width: 1.5em;
    display: inline-flex;
    align-items: center;

    font-size: .8rem;
}

.formulation input[type="text"],
.formulation select {
    +.icon {
        margin-left: .35rem;
    }
}

.que.multianswer .formulation .yui3-widget-positioned {
    box-sizing: content-box;

    .feedbackspan {
        width: inherit;
        max-width: inherit;
    }
}

.path-mod-quiz input[size] {
    margin: 0;
    min-width: 70px;
    width: auto;
    max-width: 100%;
}

.que .ablock {
    margin: 0 0 $page-padding-global 0;
    overflow: inherit;
}

.que .ablock .prompt {
    margin-bottom: 10px;
}

.que .im-controls {
    margin-top: 0.5em;
    text-align: left;
}

.que .generalfeedback,
.que .numpartscorrect .que .rightanswer,
.que .im-feedback,
.que p {
    margin: .25em 0;
    color: $body-color;

    .theme-dark & {
        color: $dm-body-color;
    }
}

.rightanswer {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;

    p {
        font-weight: $font-weight-bold;
    }
}

.que .correctness {
    &.correct {
        background-color: $success;
    }

    &.partiallycorrect {
        background-color: $warning;
    }

    &.notanswered,
    &.incorrect {
        background-color: $danger;
    }
}

.que .validationerror {
    color: map-get($theme-colors, 'danger');
}

// copied from .formFieldState in mixin.less
// and made more specific

.que .grading,
.que .comment,
.que .commentlink {
    margin-top: 0.5rem;
}

.que .history {
    border: none !important;
    margin: $page-padding-global 0;
    padding: 0 !important;
}

.que .history h3 {
    font-size: 1rem;
}

.que .history table {
    width: 100%;
    margin: 0;
}

.que .history .current {
    font-weight: $font-weight-bold;
}

.que .questioncorrectnessicon {
    vertical-align: text-bottom;
}

body.jsenabled .questionflag input[type=checkbox] {
    display: none;
}

.que .questionflagimage {
    padding-right: 3px;
    height: 16px;
    width: 16px;
}

.importerror {
    margin-top: 10px;
    border-bottom: 1px solid $border-color;

    .theme-dark & {
        border-color: $dm-border-color;
    }
}

.mform .que.comment .fitemtitle {
    width: 20%;
}

#page-question-preview #techinfo {
    margin: 1em 0;
}


//----      imported from quiz.css
//----
//-----     UI for Question Edit Questions - Table
// ----

#page-mod-quiz-edit {
    div.questionbankwindow div.header {
        margin: 0;
    }

    div.questionbankwindow.block {
        padding: 0;
    }
}

#page-mod-quiz-edit .add-menu-outer {
    position: relative;
    top: 0;
    right: 0;
}

#page-mod-quiz-edit .section-heading {
    margin: 1rem 0;
    height: auto;

    .editing_section {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 40px;
        height: 40px;

        .icon {
            padding: 10px;
            background-color: $gray-100;
            border-radius: $btn-border-radius-lg;
        }
    }
}

.editing_section {
    .icon {
        padding: 10px;
        background-color: $gray-100;
        border-radius: $btn-border-radius-lg;

        .theme-dark & {
            filter: invert(1);
        }
    }
}

#page-mod-quiz-edit .section-heading .instancesectioncontainer {
    display: inline-flex;
}

#page-mod-quiz-edit .section-heading .instancesectioncontainer h3 {
    display: flex;
    color: inherit;
}

#page-mod-quiz-edit .last-add-menu {
    margin: 20px 10px 0;
    height: auto;

    display: flex;
    justify-content: flex-end;
}

#page-mod-quiz-edit ul.slots li.section .content {
    background-color: transparent;
}

#page-mod-quiz-edit li.activity>div,
#page-mod-quiz-edit li.pagenumber {
    margin-bottom: 0;
}

#page-mod-quiz-edit ul.slots li.section li.activity {
    background-color: transparent;
    padding: 1rem;
    min-width: 40px;
    border-radius: $btn-border-radius;
    border: 1px solid $border-color;

    &.page {
        h4 {
            margin: 0;
            font-family: $font-family-base;
            font-weight: $font-weight-bold;
        }

        .add-menu-outer {
            position: absolute;
            top: 3px;
            right: 3px;

            margin: 0;
            padding: 2px;
            background-color: $container-bg;
            border-radius: $btn-border-radius;

            &:empty {
                display: none;
            }
        }
    }
}

.theme-dark#page-mod-quiz-edit ul.slots li.section li.activity.pagenumber {
    border: none;
}

.theme-dark#page-mod-quiz-edit ul.slots li.section li.activity {
    border: 1px solid $dm-border-color;

    &.page {
        .add-menu-outer {
            background-color: $dm-container-bg;
        }
    }
}

#page-mod-quiz-edit {
    .section li.activity {
        &:before {
            display: none;
        }
    }
}

#page-mod-quiz-edit .inplaceeditable {
    margin: 0;
    padding: 0;
    background-color: transparent;
}

#page-mod-quiz-edit .inplaceeditable-text {
    color: $body-color;
}

.theme-dark#page-mod-quiz-edit .inplaceeditable-text {
    color: $dm-body-color;
}

#page-mod-quiz-edit .inplaceeditable .quickeditlink {
    padding: 3px 6px;
    background-color: $gray-100;
    color: $body-color;
    
    border-radius: $btn-border-radius;
    display: inline-flex;
    align-items: center;

    height: 30px;
}

.theme-dark#page-mod-quiz-edit .inplaceeditable .quickeditlink {
    background-color: $dm-gray-100;
    color: $dm-body-color;
}

#page-mod-quiz-edit .section {
    position: relative;
}

#page-mod-quiz-edit .section .activity .editing_move {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
}

#page-mod-quiz-edit.select-multiple#page-mod-quiz-edit ul.slots li.section li.activity .mod-indent-outer,
#page-mod-quiz-edit ul.slots li.section li.activity .mod-indent-outer {
    display: flex;
    flex-wrap: wrap;

    @include media-breakpoint-up(md) {
        padding-left: 60px;
    }

    @include media-breakpoint-between(xs, sm) {
        padding-left: 0;
    }
}

#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmark {
    font-weight: $font-weight-medium;
}

#page-mod-quiz-edit ul.slots li.section li.activity .activityinstance {
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    position: relative !important;
    top: 0;
    left: 0;
}

// Questin name and desc
#page-mod-quiz-edit #categoryquestions .questionname,
#page-mod-quiz-edit ul.slots li.activity div.activityinstance .questionname {
    font-size: $font-size-base;
    font-weight: $font-weight-bold;
    color: $link-color;
}

.theme-dark#page-mod-quiz-edit #categoryquestions .questionname,
.theme-dark#page-mod-quiz-edit ul.slots li.activity div.activityinstance .questionname {
    color: $dm-link-color;
}

#page-mod-quiz-edit ul.slots li.activity div.activityinstance .questiontext {
    display: block;
    padding-left: 50px;
    margin-top: 0;
    margin-bottom: 0;

    max-width: 600px;

    font-size: $font-size-xs;
    font-weight: $font-weight-normal;
    color: $body-color-secondary;
}

.theme-dark#page-mod-quiz-edit ul.slots li.activity div.activityinstance .questiontext {
    color: $dm-body-color-secondary;
}

#page-mod-quiz-edit ul.section {
    padding: 0;
}

#page-mod-quiz-edit {
    .moodle-core-dragdrop-draghandle {
        margin: 0!important;
        padding: 0;
    }
}


.page_split_join {
    margin-top: 20px;
    width: 100%;

    .theme-dark & {
        .icon { filter: invert(1); }
    }
}

#page-mod-quiz-edit ul.slots li.section li.activity .page_split_join_wrapper {
    display: block;
    position: relative;
    left: auto;
    bottom: auto;

    text-align: center;

    .btn {
        width: 300px;

        .img {
            margin: 0;
        }
    }
}

.mod_quiz-edit-top-controls {
    position: relative;
    margin-top: 20px;
    padding-bottom: 10px;

    border-bottom: 1px solid $border-color;

    .theme-dark & {
        border-color: $dm-border-color;
    }

    .numberofquestions {
        margin-right: 10px;
        
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;

        font-size: $font-size-md;
    }

    .quizopeningstatus {
        display: inline-flex;
        align-items: center;
        flex-wrap: wrap;

        padding: $badge-padding-y $badge-padding-x;
        @include font-size($badge-font-size);
        font-weight: $badge-font-weight;
        vertical-align: baseline;
        @include border-radius($badge-border-radius);
    
        background-color: $blue-100;
        color: $blue-600;

        .theme-dark & {
            background-color: #525ea9;
            color: $blue-100;
        }
    }
}

.mod_quiz-edit-top-controls {
    .statusbar {
        .theme-dark & {
            color: $dm-body-color-light;
        }
    }
}


.instanceshufflequestions [type="checkbox"] {
    margin: 10px;
}

#page-mod-quiz-edit .section-heading .instanceshufflequestions {
    margin: 0;
    display: inline-flex;
    align-items: center;

    label {
        margin: 0;
    }
}

.path-mod-quiz .mod-quiz-edit-content {
    margin-bottom: 0 !important;
}

// End. Questin name and desc

#page-mod-quiz-edit .slotnumber {
    margin: 0 10px 0 0;
    font-weight: $font-weight-bold;
    font-size: $font-size-xs;

    min-width: 30px;
    height: 30px;
    line-height: 30px;
    background-color: $gray-100;
    color: $gray-800;
    border-radius: $btn-border-radius-lg;
}

.theme-dark#page-mod-quiz-edit .slotnumber {
    filter: invert(1);
}

#page-mod-quiz-edit div.editq div.question div.content {
    background-color: $body-bg;
    border: 1px solid $border-color;

    @include border-radius(2px);
    overflow: hidden;
}

.theme-dark {
    #page-mod-quiz-edit div.editq div.question div.content {
        filter: invert(1);
    }
}

#page-mod-quiz-edit ul.slots .activityinstance span.instancename .icon {
    margin: 0 10px;
    opacity: 1;
}

#page-mod-quiz-edit ul.slots .activityinstance .rui-icon {
    padding: 5px;
    width: 20px;
    height: 20px;
    margin: 0 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: $gray-100;
    border-radius: $btn-border-radius-lg;
}

.theme-dark {
    #page-mod-quiz-edit ul.slots .activityinstance .rui-icon {
        filter: invert(1);
    }
}


#page-mod-quiz-edit ul.slots .activityinstance {
    >a {
        display: flex;
        max-width: 100%;
        align-items: center;
        text-indent: 0;
        padding-left: 0;
    }

    img.activityicon {
        margin: 0 0 10px 0;
        padding: 5px;
    }
}

#page-mod-quiz-edit .activity {
    img.activityicon {
        vertical-align: text-top;
    }
}

#page-mod-quiz-edit .box.generalbox.questionbank {
    padding: 0.5em;
}

#page-mod-quiz-edit .questionbank .categorypagingbarcontainer,
#page-mod-quiz-edit .questionbank .categoryquestionscontainer,
#page-mod-quiz-edit .questionbank .choosecategory {
    padding: 0;
}

#page-mod-quiz-edit .questionbank .choosecategory select {
    width: 100%;
}

#page-mod-quiz-edit div.questionbank .categoryquestionscontainer {
    background: transparent;
}

#page-question-bank-history-history,
#page-question-edit {
    .main-content {
        overflow-x: auto;
    }
}

#page-mod-quiz-edit #categoryquestions>thead {
    background: $container-bg;
}

.theme-dark {
    #page-mod-quiz-edit #categoryquestions>thead {
        background: $dm-container-bg;
    }
}

#page-mod-quiz-edit #categoryquestions>tbody>tr:nth-of-type(even) {
    background: $gray-100;
}

.theme-dark {
    #page-mod-quiz-edit #categoryquestions>tbody>tr:nth-of-type(even) {
        background-color: $dm-gray-100;
    }
}

#page-mod-quiz-edit .questionbankwindow div.header {
    color: $body-color-secondary;
    text-shadow: none;

    @include border-top-radius(4px);
    margin: 0 -10px 0 -10px;
    padding: 2px 10px 2px 10px;
    background: transparent;
    /* Old browsers */
}

.theme-dark {
    #page-mod-quiz-edit .questionbankwindow div.header {
        color: $dm-body-color-secondary;
    }
}

#page-mod-quiz-edit .questionbankwindow div.header a:link,
#page-mod-quiz-edit .questionbankwindow div.header a:visited {
    color: $link-color;
}

.theme-dark#page-mod-quiz-edit .questionbankwindow div.header a:link,
.theme-dark#page-mod-quiz-edit .questionbankwindow div.header a:visited {
    color: $dm-link-color;
}

#page-mod-quiz-edit .questionbankwindow div.header a:hover {
    color: $link-hover-color;
}

.theme-dark#page-mod-quiz-edit .questionbankwindow div.header a:hover {
    color: $dm-link-hover-color;
}

#page-mod-quiz-edit .createnewquestion {
    padding: 0.3em 0;

    div,
    input {
        margin: 0;
    }
}

#page-mod-quiz-edit .questionbankwindow div.header .title {
    color: $body-color;
}

.theme-dark {
    #page-mod-quiz-edit .questionbankwindow div.header .title {
        color: $dm-body-color;
    }
}

#page-mod-quiz-edit div.container div.generalbox {
    background-color: transparent;
    padding: 1.5em;
}

#page-mod-quiz-edit .categoryinfo {
    background-color: transparent;
    border-bottom: none;
}

#page-mod-quiz-edit .createnewquestion .singlebutton input {
    margin-bottom: 0;
}

#page-mod-quiz-edit div.questionbank .categorysortopotionscontainer,
#page-mod-quiz-edit div.questionbank .categoryselectallcontainer {
    padding: 0 0 1.5em 0;
}

#page-mod-quiz-edit div.questionbank .categorypagingbarcontainer {
    background-color: transparent;
    margin: 0;
    border-top: 0;
    border-bottom: 0;

    .paging {
        padding: 0 0.3em;
    }
}

#page-mod-quiz-edit div.question div.content div.questioncontrols {
    background-color: $body-bg;
}

#page-mod-quiz-edit div.question div.content div.points {
    margin-top: -0.5em;
    padding-bottom: 0;
    border: none;
    background-color: $body-bg;
    position: static;
    width: 12.1em;
    float: right;
    margin-right: 60px;
}

.theme-dark {

    #page-mod-quiz-edit div.quizpage .pagecontent .pagestatus,
    #page-mod-quiz-edit div.question div.content div.questioncontrols,
    #page-mod-quiz-edit div.question div.content div.points {
        color: $dm-body-bg;
    }
}

#page-mod-quiz-edit div.question div.content div.points br {
    display: none;
}

#page-mod-quiz-edit div.question div.content div.points label {
    display: inline-block;
}

#page-mod-quiz-edit div.quizpage .pagecontent .pagestatus {
    background-color: $body-bg;
}

#page-mod-quiz-edit .quizpagedelete,
#page-mod-quiz-edit .quizpagedelete img {
    background-color: transparent;
}

#page-mod-quiz-edit div.quizpage .pagecontent {
    border: 1px solid $border-color;

    @include border-radius(2px);
    overflow: hidden;
}

.theme-dark {
    #page-mod-quiz-edit div.quizpage .pagecontent {
        border-color: $dm-border-color;
    }
}

#page-mod-quiz-edit div.questionbank .categoryinfo {
    padding: 0.3em 0;
}

#page-mod-quiz-edit div.questionbank .modulespecificbuttonscontainer {
    padding: 0;

    strong {
        display: block;
    }

    hr,
    br {
        display: none;
    }

    strong {
        margin-left: -0.3em;
    }

    strong label {
        margin-left: 0.3em;
    }

    input {
        margin-left: 0;
    }

    input+input {
        margin-left: 5px;
    }
}

#page-mod-quiz-edit ul.slots .activityinstance>a {
    display: inline-flex;
    align-items: flex-start;

    &:hover {
        text-decoration: none;
    }
}

#page-mod-quiz-edit.select-multiple input.select-multiple-checkbox[type="checkbox"] {
    margin: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

#page-mod-quiz-edit ul.slots .activityinstance span.instancename {
    overflow: auto;
    text-overflow: initial;
    display: block;
    height: auto;
}

#page-mod-quiz-edit .section .activity .actions {
    background-color: transparent;
    padding: 0;

    width: max-content;

    display: inline-flex;
    justify-content: flex-end;
    align-items: center;
    flex-wrap: wrap;

    .icon {
        @extend .btn-special-icon;

        &.fa-trash {
            background-color: $red-100;
            color: $red-800;
        }
    }

    &:hover {
        text-decoration: none;
    }
}

#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmarkcontainer {
    margin-right: 0 !important;
    background-color: transparent;
}

#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmark.decimalplaces_2 {
    margin-right: .35rem;
}

.questionbankwindow .module {
    width: auto;
}

.questionbankwindow .form-autocomplete-selection {
    margin-left: 0;
}

.path-mod-quiz .statedetails {
    display: block;
    font-size: $font-size-xs;
    opacity: 0.7;
}

a#hidebankcmd {
    color: $link-color;

    .theme-dark & {
        color: $dm-link-color;
    }
}

// override question plugins

// qtype_shortanswer
.que.numerical .answer,
.que.shortanswer .answer {
    width: 100%;
    padding: 0;
    margin-top: .35rem;

    display: inline-flex;
    align-items: center;
}

.que label {
    margin: 0;
    font-size: $font-size-sm;

    @include media-breakpoint-up(md) {
        display: inline-flex;
        flex-wrap: wrap;
    }

    @include media-breakpoint-between(xs, sm) {
        display: block;
    }
}

body.path-question-type .mform fieldset.hidden {
    padding: 0;
    margin: 0.7em 0 0;
}

// Fix for accurate positioning of ddwtos drag and drop question types.
.tag-condition-container {
    position: relative;
}


.questioncategories {
    padding: 1rem 1.5rem;
    margin: 2rem 0 0;

    border: 1px solid $border-color;
    border-radius: $btn-border-radius;

    position: relative;

    .theme-dark & {
        border-color: $dm-border-color;
    }

    .rui-title-container {
        margin-bottom: 0;
        width: auto;
    }

    a {
        .icon {
            @extend .btn-special-icon;
        }

        &:hover {
            text-decoration: none;

            .icon {
                @extend .btn-special-icon--hover;
            }
        }

        &:after {
            display: none;
        }
    }

    .rui-main-content-title {
        width: 100% !important;

        padding: 0 0 1rem 0;
        margin: 0 0 1rem !important;

        font-family: $font-family-base;
        font-size: $font-size-md;
        color: $body-color-secondary;
        border-bottom: 1px solid $border-color;

        .theme-dark & {
            color: $dm-body-color-secondary;
            border-color: $dm-border-color;
        }

    }

    ul {
        margin: 0 0 0 40px;
        padding: 0;

        list-style: none;

        li {
            padding: .35rem 0;
            position: relative;

            &:last-child {
                padding-bottom: 0;
            }

            b,
            .text_to_html {
                margin-left: 0;
            }

            .text_to_html {
                margin-top: .35rem;
                margin-bottom: .5rem;
                color: $body-color-secondary;

                .theme-dark & {
                    color: $dm-body-color-secondary;
                }
            }

        }
    }
}

.questionbankwindow {
    .createnewquestion {
        margin: 1rem 0 2rem;
    }

    .choosecategory {
        margin-bottom: 1rem;
    }

    #displayoptions {
        padding: 1rem 2rem;

        margin-top: 1rem;
        margin-bottom: 1rem;

        font-size: $font-size-md !important;

        border-radius: $btn-border-radius;
        border: 2px solid var(--primary-color-300);

        .tag-condition-container {
            margin: 1rem 0;
            padding: 1rem 0;

            border-top: 1px solid $border-color;
            border-bottom: 1px solid $border-color;

            .theme-dark & {
                border-color: $dm-border-color;
            }

            .form-group {
                margin: 0;
            }
        }
    }
}

table#categoryquestions {
    overflow: visible;
    width: max-content;

    td.modifiername,
    td.creatorname {
        .date {
            display: block;
            margin-top: .35rem;
            color: $body-color-secondary;

            .theme-dark & {
                color: $dm-body-color-secondary;
            }
        }
    }

    th,
    td {
        padding: .75rem !important;
    }

    th {
        color: $body-color;

        .theme-dark & {
            color: $dm-body-color;
        }
    }

    .editmenu {
        width: 100px;
    }

    .iconcol .icon {
        width: 18px;
        height: 18px;

        padding: 6px;
        border-radius: $btn-border-radius;
    }

    .addtoquizaction .icon {
        background-color: $gray-300;

        .theme-dark & {
            background-color: $dm-gray-300;
        }
    }
}

#categoryquestions .questiontext {
    max-width: 500px;

    //reset default sytles for clarity
    h1,
    h2,
    h3,
    h4,
    h5,
    h6,
    p,
    strong,
    span,
    b,
    em {
        max-width: 600px;
        display: block !important;

        font-size: $font-size-md !important;
        font-weight: $font-weight-normal !important;
        text-align: left !important;
    }

    img {
        margin: 10px 0 !important;
        float: none !important;
        max-width: 100% !important;
        height: auto !important;
    }

}

#categoryquestions .checkbox {
    width: 40px;
}

#categoryquestions .header {
    font-weight: $font-weight-medium;
    color: $body-color-secondary;

    .theme-dark & {
        color: $dm-body-color-secondary;
    }
}

#categoryquestions .qtype {
    width: 60px;

    .icon {
        background-color: $gray-100;
        padding: .25rem;
        border-radius: $btn-border-radius;

        .theme-dark & {
            filter: invert(1);
        }
    }
}

#categoryquestions label {
    width: max-content;
    max-width: 300px;
    color: $body-color;

    .theme-dark & {
        color: $dm-body-color;
    }
}


// Modal
.jschooser .choosercontainer #chooseform .alloptions .option .typename {
    width: auto;
    max-width: 150px;
}

.choosercontainer #chooseform .submitbuttons {
    padding-bottom: 0;
}

.choosercontainer #chooseform .moduletypetitle,
.choosercontainer #chooseform .option,
.choosercontainer #chooseform .nonoption {
    padding: 0;
}

.choosercontainer #chooseform .option .icon {
    padding: .25rem;
    background-color: $gray-100;
    border-radius: $btn-border-radius;

    .theme-dark & {
        filter: invert(1);
    }
}

.choosercontainer #chooseform .moduletypetitle {
    padding-top: 0.85rem;
    font-size: $font-size-md;
}

#page-mod-quiz-report .toggleincludeauto {
    margin: 2rem 0;
    text-align: left;
}

#techinfo_inner {
    background-color: $gray-100;
    padding: 1rem;

    border-radius: $btn-border-radius;

    p {
        margin: .15rem 0;
    }

    .theme-dark & {
        background-color: $dm-gray-100;
    }
}


// Question Pop-up tmpl
#previewcontrols {
    text-align: right;
}

// Layout
.rui-quizreviewsummary {
    margin: 0 auto 2rem;

    &.rui-info-container {
        display: inline-flex;
        grid-template-columns: 1fr;
    }

    .rui-infobox {
        padding: 10px 20px 10px 45px;
        background-position: 13px 33px;
        background-color: transparent;
        background-size: 24px;
        border: 1px solid $border-color;

        .theme-dark & {
            filter: invert(1);
            border-color: #6f7071;
        }

        &.rui-infobox--feedback {
            width: 100%;
        }
    }
}

.rui-quizinfo {
    display: block;
    width: auto;
    padding-left: 20px;
    padding-right: 20px;

    border-radius: $btn-border-radius;
    font-size: $font-size-sm;

    border: 3px solid var(--primary-color-200);

    .btn {
        padding: 0.6rem 1rem;
        font-size: .8125rem;
    }

    .theme-dark & {
        border-color: $dm-border-color;
    }

    .singlebutton {
        margin: 10px 0;
    }

    p {
        margin: .25rem 0;
    }
}

.rui-quizinfo+.rui-title-container {
    margin-top: 20px!important;
}

#mod_quiz_preflight_form,
.mod_quiz_preflight_popup {
    .col-md-3 {
        display: none;
    }

    .col-md-9 {
        padding: 0 !important;
        flex: 0 0 90% !important;
        max-width: 90% !important;
    }

    #fitem_id_honestycheckmessage {
        margin-top: 0;
        margin-bottom: 0;
    }
}

.mod_quiz_preflight_popup {
    max-width: 100%;
}


//----
//---- Quiz Layout
//----

#page-mod-quiz-review .rui-info-container {
    margin-bottom: 30px;
}

.que {
    margin-top: 6rem;
    position: relative;

    &:before {
        content: '';
        background-color: $border-color;
        width: 60px;
        height: 1px;

        position: absolute;
        top: -3rem;
        left: calc(50% - 30px);

        .theme-dark & {
            background-color: $dm-border-color;
        }
    }

    &:first-of-type {
        margin-top: 0;

        &:before {
            display: none;
        }
    }
}

.que .info {
    width: 100%;

    padding: 0 0 10px;
    margin-bottom: 1rem;
    border-bottom: 1px solid $border-color;

    font-size: $font-size-md;

    display: inline-flex;
    align-items: baseline;
    justify-content: space-between;
    flex-wrap: wrap;

    .theme-dark & {
        border-color: $dm-border-color;
    }
}

.que .grade,
.que .state {
    margin: 0;
    padding: .35rem 1rem;

    border-radius: $btn-border-radius;

    font-size: $font-size-xs;

    &:empty {
        display: none;
    }
}

.rui-question-no {
    color: $body-color;
    font-family: $font-family-base;
    font-size: $font-size-sm;

    @include media-breakpoint-between(xs, sm) {
        width: 100%;
        display: block;
        margin-bottom: 1rem;
        margin-right: 0;
        text-align: center;
    }

    .theme-dark & {
        color: $dm-body-color;
    }
}

.que .grade {
    background-color: $gray-100;
    color: $gray-600;

    .theme-dark & {
        background-color: $dm-gray-300;
        color: $dm-gray-800;
    }
}

.que .info>div {
    margin: 0;
    font-weight: $font-weight-medium;
}

.que .qtext {
    margin-bottom: .5rem;
}

.que .content {
    margin: 0;
}

.que .content .feedback {
    max-width: 100%;
    width: max-content;
    margin-top: 0;
    padding: 8px 30px;

    background-size: 20px;

    background-repeat: no-repeat;
    background-position: 14px 11px;

    border-radius: $btn-border-radius;

    .generalfeedback,
    .numpartscorrect,
    .rightanswer {
        margin-left: 10px;
        font-size: $font-size-xs;

        p {
            font-size: $font-size-base;
        }
    }
}

//TODO: Maybe icons with badges will look better then only label
.feedback,
.state {

    .notyetanswered &,
    .notanswered &,
    .partiallycorrect & {
        background-color: $yellow-200;
        color: $body-color;

        .theme-dark & {
            background-color: #6f644a;
            color: $yellow-100;
        }
    }

    .invalidanswer &,
    .incorrect & {
        background-color: $red-100;
        color: $red-800;

        .theme-dark & {
            background-color: #4e1c1c;
            color: $red-100;
        }
    }

    .correct & {
        background-color: $green-100;
        color: $green-600;

        .theme-dark & {
            background-color: #0a6457;
            color: $green-100;
        }
    }

    .answersaved & {
        background-color: var(--primary-color-100);
        color: var(--primary-color-700);;

        .theme-dark & {
            background-color: var(--main-theme-color);
            color: var(--primary-color-100);
        }
    }
}

.content .feedback {

    .partiallycorrect &,
    .notanswered & {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.75 4.75H15.25C17.4591 4.75 19.25 6.54086 19.25 8.75V15.25C19.25 17.4591 17.4591 19.25 15.25 19.25H8.75C6.54086 19.25 4.75 17.4591 4.75 15.25V8.75C4.75 6.54086 6.54086 4.75 8.75 4.75Z' stroke='#{url-friendly-colour($yellow-800)}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.5 10C14.5 10.2761 14.2761 10.5 14 10.5C13.7239 10.5 13.5 10.2761 13.5 10C13.5 9.72386 13.7239 9.5 14 9.5C14.2761 9.5 14.5 9.72386 14.5 10Z' stroke='#{url-friendly-colour($yellow-900)}' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.5 10C10.5 10.2761 10.2761 10.5 10 10.5C9.72386 10.5 9.5 10.2761 9.5 10C9.5 9.72386 9.72386 9.5 10 9.5C10.2761 9.5 10.5 9.72386 10.5 10Z' stroke='#{url-friendly-colour($yellow-900)}' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.75 14.25H15.25' stroke='#{url-friendly-colour($yellow-900)}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        border-bottom: 2px solid $yellow-300;

        .theme-dark & {
            background-image: url("data:image/svg+xml;charset=utf8,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M8.75 4.75H15.25C17.4591 4.75 19.25 6.54086 19.25 8.75V15.25C19.25 17.4591 17.4591 19.25 15.25 19.25H8.75C6.54086 19.25 4.75 17.4591 4.75 15.25V8.75C4.75 6.54086 6.54086 4.75 8.75 4.75Z' stroke='#{url-friendly-colour($yellow-100)}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M14.5 10C14.5 10.2761 14.2761 10.5 14 10.5C13.7239 10.5 13.5 10.2761 13.5 10C13.5 9.72386 13.7239 9.5 14 9.5C14.2761 9.5 14.5 9.72386 14.5 10Z' stroke='#{url-friendly-colour($yellow-100)}' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M10.5 10C10.5 10.2761 10.2761 10.5 10 10.5C9.72386 10.5 9.5 10.2761 9.5 10C9.5 9.72386 9.72386 9.5 10 9.5C10.2761 9.5 10.5 9.72386 10.5 10Z' stroke='#{url-friendly-colour($yellow-100)}' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8.75 14.25H15.25' stroke='#{url-friendly-colour($yellow-100)}' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
        }
    }

    .incorrect & {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='#{url-friendly-colour($red-800)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8.75 4.75H15.25C17.4591 4.75 19.25 6.54086 19.25 8.75V15.25C19.25 17.4591 17.4591 19.25 15.25 19.25H8.75C6.54086 19.25 4.75 17.4591 4.75 15.25V8.75C4.75 6.54086 6.54086 4.75 8.75 4.75Z'/%3E%3Cpath stroke='#{url-friendly-colour($red-800)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M7.75 15.25C7.75 15.25 9 12.75 12 12.75C15 12.75 16.25 15.25 16.25 15.25'/%3E%3Ccircle cx='14' cy='10' r='1' fill='#{url-friendly-colour($red-800)}'/%3E%3Ccircle cx='10' cy='10' r='1' fill='#{url-friendly-colour($red-800)}'/%3E%3C/svg%3E");
        border-bottom: 2px solid $red-300;

        .theme-dark & {
            background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='#{url-friendly-colour($red-100)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8.75 4.75H15.25C17.4591 4.75 19.25 6.54086 19.25 8.75V15.25C19.25 17.4591 17.4591 19.25 15.25 19.25H8.75C6.54086 19.25 4.75 17.4591 4.75 15.25V8.75C4.75 6.54086 6.54086 4.75 8.75 4.75Z'/%3E%3Cpath stroke='#{url-friendly-colour($red-100)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M7.75 15.25C7.75 15.25 9 12.75 12 12.75C15 12.75 16.25 15.25 16.25 15.25'/%3E%3Ccircle cx='14' cy='10' r='1' fill='#{url-friendly-colour($red-100)}'/%3E%3Ccircle cx='10' cy='10' r='1' fill='#{url-friendly-colour($red-100)}'/%3E%3C/svg%3E");
        }
    }

    .correct & {
        background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='#{url-friendly-colour($green-800)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8.75 4.75H15.25C17.4591 4.75 19.25 6.54086 19.25 8.75V15.25C19.25 17.4591 17.4591 19.25 15.25 19.25H8.75C6.54086 19.25 4.75 17.4591 4.75 15.25V8.75C4.75 6.54086 6.54086 4.75 8.75 4.75Z'/%3E%3Cpath stroke='#{url-friendly-colour($green-800)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M7.75 12.75C7.75 12.75 9 15.25 12 15.25C15 15.25 16.25 12.75 16.25 12.75'/%3E%3Ccircle cx='14' cy='10' r='1' fill='#{url-friendly-colour($green-800)}'/%3E%3Ccircle cx='10' cy='10' r='1' fill='#{url-friendly-colour($green-800)}'/%3E%3C/svg%3E");
        border-bottom: 2px solid $green-300;

        .theme-dark & {
            background-image: url("data:image/svg+xml;charset=utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='none' viewBox='0 0 24 24'%3E%3Cpath stroke='#{url-friendly-colour($green-100)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M8.75 4.75H15.25C17.4591 4.75 19.25 6.54086 19.25 8.75V15.25C19.25 17.4591 17.4591 19.25 15.25 19.25H8.75C6.54086 19.25 4.75 17.4591 4.75 15.25V8.75C4.75 6.54086 6.54086 4.75 8.75 4.75Z'/%3E%3Cpath stroke='#{url-friendly-colour($green-100)}' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M7.75 12.75C7.75 12.75 9 15.25 12 15.25C15 15.25 16.25 12.75 16.25 12.75'/%3E%3Ccircle cx='14' cy='10' r='1' fill='#{url-friendly-colour($green-100)}'/%3E%3Ccircle cx='10' cy='10' r='1' fill='#{url-friendly-colour($green-100)}'/%3E%3C/svg%3E");
        }
    }
}

.state {

    .partiallycorrect &,
    .notyetanswered &,
    .notanswered & {
        background-color: $yellow-100;
    }

    .invalidanswer &,
    .incorrect & {
        background-color: $red-100;

        .theme-dark & {
            background-color: #d03434;
        }
    }

    .correct & {
        background-color: $green-100;

        .theme-dark & {
            background-color: #0a6457;
        }
    }

    .answersaved & {
        background-color: var(--primary-color-100);

        .theme-dark & {
            background-color: var(--main-theme-color);
        }
    }
}

.que .answer {
    .notanswered {
        background-color: $yellow-100;
        color: 1;
        border-color: $yellow-300;

        .theme-dark & {
            background-color: #2b2619;
            color: #FDF6EA!important;
            border-color: #6f644a;
        }
    }

    .incorrect {
        background-color: $red-100;
        color: $red-700;
        border-color: $red-300;

        .theme-dark & {
            background-color: #472424;
            color: #ffcfcf!important;
            border-color: #d03434;
        }
    }

    .partiallycorrect {
        background-color: $yellow-100;
        color: $yellow-600;
        border-color: $yellow-300;

        .theme-dark & {
            background-color: #86702e;
            color: $yellow-100;
        }
    }

    .correct {
        background-color: $green-100;
        color: $green-600;
        border-color: $green-300;

        .theme-dark & {
            background-color: #0a6457;
            color: $green-100;
        }
    }
}

.que .specificfeedback {
    margin: 0;
    padding: 0 10px;

    border-radius: $btn-border-radius;

    background-color: transparent;

    font-size: $font-size-md;
    font-weight: $font-weight-medium;

    p {
        margin: 0;
    }
}

.que .feedback {
    @include media-breakpoint-between(xs, sm) {
        iframe {
            max-width: 100%;
            height: auto;
        }
    }
}

.que.multichoice .answer .specificfeedback {
    margin: 3px 0;
    padding: 0;

    background-color: transparent;
}

.incorrect:after,
.notanswered:after {
    background-color: $gray-100;
    background-image: url([[pix:theme|universe/icon-message-square]]);
    background-size: 20px;

    border-radius: $btn-border-radius;

    font-size: 30px;
    color: $red-800;

    width: 60px;
    height: 60px;

    position: absolute;
    top: 60px;
    left: -60px;
}

.rui-submitbtns {
    margin-top: 1rem !important;
    margin-bottom: 1rem;

    width: 100%;
    display: inline-flex;
    flex-wrap: wrap;
    justify-content: space-between;

    font-size: $font-size-md;

    @include media-breakpoint-between(xs, sm) {
        .btn {
            display: block;
            width: 100%;
            margin-top: .25rem;
        }
    }

    .rui-controls {
        width: 100%;

        @include media-breakpoint-between(xs, sm) {
            .singlebutton {
                width: 100%;
            }
        }
    }
}

#page-mod-quiz-attempt .submitbtns .mod_quiz-next-nav,
#page-mod-quiz-review .submitbtns .mod_quiz-next-nav,
.rui-submitbtns .mod_quiz-next-nav {
    float: none;

    @include media-breakpoint-between(xs, sm) {
        flex-wrap: wrap;

        .btn {
            width: 100%;
            margin-top: .25rem;
        }
    }
}

#page-mod-quiz-attempt .submitbtns,
#page-mod-quiz-review .submitbtns {
    padding-top: 0;
    display: inline-flex;
    width: 100%;
    justify-content: space-between;
}

.mod_quiz-prev-nav,
.mod_quiz-next-nav {
    .arrow {
        display: none;
    }
}

#page-mod-quiz-attempt #page .controls,
#page-mod-quiz-summary #page .controls,
#page-mod-quiz-review #page .controls {
    margin: 0;
    text-align: left;
}

.rui-quizattemptsummary {
    min-width: max-content;

    p:only-child {
        margin: 0;
        font-size: $font-size-md;
    }

    .c3 a {
        position: relative;
        padding-left: 40px;
        width: max-content;

        &:after {
            content: '';
            background-image: url("data:image/svg+xml,%3Csvg width='24' height='24' viewBox='0 0 24 24' fill='none' xmlns='http://www.w3.org/2000/svg'%0A%3E%3Cpath fill-rule='evenodd' clip-rule='evenodd' d='M21.2635 2.29289C20.873 1.90237 20.2398 1.90237 19.8493 2.29289L18.9769 3.16525C17.8618 2.63254 16.4857 2.82801 15.5621 3.75165L4.95549 14.3582L10.6123 20.0151L21.2189 9.4085C22.1426 8.48486 22.338 7.1088 21.8053 5.99367L22.6777 5.12132C23.0682 4.7308 23.0682 4.09763 22.6777 3.70711L21.2635 2.29289ZM16.9955 10.8035L10.6123 17.1867L7.78392 14.3582L14.1671 7.9751L16.9955 10.8035ZM18.8138 8.98525L19.8047 7.99429C20.1953 7.60376 20.1953 6.9706 19.8047 6.58007L18.3905 5.16586C18 4.77534 17.3668 4.77534 16.9763 5.16586L15.9853 6.15683L18.8138 8.98525Z' fill='#{url-friendly-colour($primary-color-300)}' /%3E%3Cpath d='M2 22.9502L4.12171 15.1717L9.77817 20.8289L2 22.9502Z' fill='#{url-friendly-colour($primary-color-300)}' /%3E%3C/svg%3E");
            background-size: 16px;
            background-repeat: no-repeat;
            background-position: left;

            width: 24px;
            height: 24px;

            position: absolute;
            top: calc(50% - 12px);
            left: 14px;
        }
    }
}

.rui-quizattempt {
    .continuebutton {
        margin-top: 1rem;
        text-align: left;
    }

    &:empty {
        display: none;
    }

    @include media-breakpoint-between(xs, sm) {
        width: 100%;

        .singlebutton,
        .btn {
            width: 100%;
        }
    }
}


// Started on
.rui-infobox--avatar {
    padding: 1rem 1.25rem 1rem 1.25rem !important;
    background-color: $gray-100;
    position: relative;

    img {
        margin-right: 10px;
        border-radius: $btn-border-radius;
    }

    .rui-infobox-content--small {
        a {
            color: inherit;
        }
    }
}

.rui-infobox--quiz,
.rui-infobox--question {
    background-color: $purple-100;
}

.rui-infobox--startedon {
    background-image: url([[pix:theme|universe/icon-calendar]]);

    background-color: $purple-100;
}

// Attempts
.rui-infobox--attemptlist,
.rui-infobox--attempts {
    background-image: url([[pix:theme|universe/icon-rewind]]);

    background-color: $gray-100;
}

// State
.rui-infobox--state {
    background-image: url([[pix:theme|universe/icon-git-commit]]);

    background-color: $orange-100;
}

// Completed on
.rui-infobox--completedon {
    background-image: url([[pix:theme|universe/icon-award]]);

    background-color: $green-100;
}

// Time taken
.rui-infobox--timetaken {
    background-image: url([[pix:theme|universe/icon-clock]]);

    background-color: $yellow-100;
}

// Grade
.rui-infobox--grade {
    background-image: url([[pix:theme|universe/icon-edit]]);

    background-color: $blue-100;
}

// Feedback
.rui-infobox--feedback {
    background-image: url([[pix:theme|universe/icon-message-square]]);

    background-color: $gray-100;
}

// Overdue
.rui-infobox--overdue {
    background-image: url([[pix:theme|universe/icon-alert-triangle]]);

    background-color: $red-200;
}

//Marks
.rui-infobox--marks {
    background-image: url([[pix:theme|universe/icon-check-square]]);

    background-color: $gray-100;
}


// ----
//-----     Modal windows mod
// ----
.moodle-dialogue-base .moodle-dialogue .moodle-dialogue-bd {
    max-height: 80vh;
    overflow-y: auto;
}
.moodle-dialogue-base .moodle-dialogue.mod_quiz_preflight_popup .moodle-dialogue-bd #mod_quiz_preflight_form legend {
    padding: 0;
}

.moodle-dialogue-base .moodle-dialogue.mod_quiz_preflight_popup .moodle-dialogue-bd #mod_quiz_preflight_form .fitem {
    margin-left: 0;
}

.mod_quiz_preflight_popup {
    .fcontainer {
        padding: 0;
    }

    #fitem_id_passwordmessage {
        margin-top: .25rem;
    }
}

// ----
//-----     UI for Report Page
// ----
#page-mod-quiz-report {

    // .resettable {
    //     width: max-content;
    //     margin: 1rem 0 1rem auto;
    //     padding: 5px;
    //     border: 2px dashed $border-color;
    //     border-radius: $btn-border-radius;
    // }

    h2+.quizattemptcounts {
        margin: 0 1rem;
    }

    .main-content {
        .mdl-align {
            text-align: right;
            margin-bottom: 20px;
        }
    }
}

#page-mod-quiz-report .main-content {
    #tablecontainer {
        margin: $page-padding-global 0;
    }
}

.quizattemptcounts {
    display: inline-flex;
    align-items: center;
    text-align: left;

    margin: 10px 0;
    padding: .65rem 1.5rem;
    @include font-size($badge-font-size);
    font-weight: $badge-font-weight;
    // vertical-align: baseline;
    // @include border-radius($btn-border-radius);

    // background-color: $gray-100;
    // color: $gray-700;

    // p {
    //     margin: 0;
    // }

    // .theme-dark & {
    //     background-color: $dm-gray-100;
    //     color: $dm-gray-700;
    // }
}

#page-mod-quiz-report table#attempts {
    width: max-content;

    .header,
    .cell {
        padding: .75rem;
    }

    td {
        border-left: 0;
        border-right: 0;
    }

    td.c2 {
        a:first-of-type {
            display: inline-flex;
            margin-top: .25rem;
            margin-bottom: .25rem;
        }
    }

    td.c5,
    td.c6,
    td.c7 {
        font-size: $font-size-xs;
        color: $body-color-light;
    }

    .correct {
        color: $green-600;
    }

    .partiallycorrect {
        color: $yellow-700;
    }

    .incorrect {
        color: $red-500;
    }

    a {
        &:hover {
            text-decoration: none;
            opacity: .8;
        }
    }
}

#page-mod-quiz-report table#attempts .questionflag {
    padding: 5px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: $btn-border-radius;
    background-color: $green-100;
}

#page-mod-quiz-report table#attempts.grades span.que,
#page-mod-quiz-report table#attempts span.avgcell {
    span {
        padding: .25rem .25rem .25rem .45rem;
    }
}

#page-mod-quiz-report table#attempts.grades span.que,
#page-mod-quiz-report table#attempts span.avgcell {
    display: flex;
    align-items: center;
}

// ----
//-----     UI for Question Edit Pages
// ----
.path-question {

    div[id^=fgroup_id_][id*=answeroptions_],
    div[id^=fitem_id_][id*=feedback_],
    div[id^=fitem_id_][id*=subquestions_],
    div[id^=fitem_id_][id*=subanswers_],
    div[id^=fitem_id_][id*=answer_] {
        margin: 0!important;
    }

    div[id^=fgroup_id_][id*=answeroptions_],
    div[id^=fitem_id_][id*=feedback_],
    div[id^=fitem_id_][id*=subquestions_],
    div[id^=fitem_id_][id*=subanswers_],
    div[id^=fitem_id_][id*=answer_],
    div[id^=fitem_id_][id*=fraction_] {
        margin: 0!important;
        padding: 11px 10px 13px !important;
        border-color: $border-color!important;
        background-color: $gray-100!important;

        .theme-dark & {
            background-color: $dm-gray-100!important;
            border-color: $dm-border-color!important;
        }
    }

    div[id^=fgroup_id_][id*=answeroptions_],
    div[id^=fitem_id_][id*=subquestions_],
    div[id^=fitem_id_][id*=answer_] {
        border-radius: $btn-border-radius $btn-border-radius 0 0 !important;
        margin-bottom: 0!important;
    }

    div[id^=fitem_id_][id*=feedback_],
    div[id^=fitem_id_][id*=subanswers_] {
        border-radius: 0 0 $btn-border-radius $btn-border-radius !important;
        margin-bottom: 10px!important;
    }
}

.path-question.theme-dark {

    div[id^=fgroup_id_][id*=answeroptions_],
    div[id^=fitem_id_][id*=feedback_],
    div[id^=fitem_id_][id*=subquestions_],
    div[id^=fitem_id_][id*=subanswers_],
    div[id^=fitem_id_][id*=answer_],
    div[id^=fitem_id_][id*=fraction_] {
        border: 1px solid $dm-border-color !important;
    }
}
// End. UI for Question Edit Pages

.content {
    .attachments {
        margin-top: 2rem;
        position: relative;
    }
}

.que .validationerror {
    margin-top: 1rem;
}

.que.multianswer .feedbackspan {
    padding: 1rem;
    background-color: $yellow-100;
    border-radius: $btn-border-radius;

    font-size: $font-size-md;
    box-shadow: 0 1px 2px rgb(0 0 0 / 7%), 0 2px 4px rgb(0 0 0 / 7%), 0 4px 8px rgb(0 0 0 / 7%), 0 8px 16px rgb(0 0 0 / 7%), 0 16px 32px rgb(0 0 0 / 7%), 0 32px 64px rgb(0 0 0 / 7%);
}

//Pagination on Quiz Questions Page
.categorypagingbarcontainer {
    .pagination {
        margin-bottom: .5rem;
    }

    .paging {
        text-align: center;
    }
}

#page-mod-quiz-edit .statusdisplay {
    padding: .75rem 1rem .75rem 3.5rem !important;
    margin-top: $page-padding-global;
    margin-bottom: $page-padding-global;

    background-color: $yellow-100;
    background-image: url([[pix:theme|universe/icon-alert-circle]]);
    background-size: 18px;
    background-position: 20px;
    background-repeat: no-repeat;


    border-radius: $btn-border-radius;
    font-size: $font-size-sm;
    font-weight: $font-weight-medium;
    color: $body-color;

    p {
        margin: 0;
    }
}

.theme-dark#page-mod-quiz-edit .statusdisplay {
    filter: invert(1);
}

.questionflagsavebutton {
    margin: 10px 0;
}

.qtype_multichoice_clearchoice {
    margin-top: 10px;
}

.rui-infobox--attemptlist,
.rui-infobox--attempts {
    //padding: 1rem 1.25rem 1rem 1.25rem!important;
    //border: 2px dashed $border-color;

    .rui-infobox-content--small {
        max-height: 70px;
        overflow-y: auto;
    }

    a,
    strong {
        margin: 2px;

        width: 40px;
        height: 30px;

        display: inline-flex;
        align-items: center;
        justify-content: center;

        background-color: $gray-100;
        border-radius: $btn-border-radius;

        color: $gray-800;

        &:hover {
            background-color: var(--primary-color-100);
            color: var(--main-theme-color);
        }
    }

    strong {
        opacity: .4;
    }
}

#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmarkcontainer .editicon {
    width: auto;
}

#page-mod-quiz-edit ul.slots li.section li.activity .question_dependency_wrapper .cm-edit-action {
    @include button-size($btn-padding-y, $btn-padding-x, $btn-font-size, $btn-line-height, $btn-border-radius);
}



// Radio and checkbox quick mods
.que.multichoice .answer div.r0,
.que.multichoice .answer div.r1,
.que .answer {

    [type="radio"],
    [type="checkbox"] {
        border: 0;
        width: 20px;
        height: 20px;
    }
}


.path-mod-quiz #user-picture {
    margin: 0 0 20px;
    display: inline-flex;
    align-items: center;

    font-weight: $font-weight-medium;

    .userpicture {
        width: 40px;
        height: 40px;
        margin-right: 10px;
    }
}


@include media-breakpoint-between(xs, sm) {

    .quizstartbuttondiv,
    .quizstartbuttondiv .btn {
        width: 100%;
    }
}

.quizsummaryheading th:empty {
    padding: 0;
}

.camera {
    video {
        margin-top: 10px;
        width: 100%;
    }
}

.path-mod-quiz .othernav {
    .singlebutton {
        margin-top: 24px;
        width: 100%;
    }

    .btn {
        width: 100%;
    }
}

.categoryquestionscontainer {
    .table-responsive {
        overflow: visible;
    }
}

#page-mod-quiz-edit .section .activity .actions .version-selection {
    padding: .75rem 1.25rem;
}

.que.formulas .formulas_number {
    width: auto !important;
}


#page-question-bank-previewquestion-preview {
    .que {
        margin-top: 10px;

        &::before {
            display: none;
        }
    }

    #techinfo {
        margin-bottom: 20px;
    }

    #commentcollapse+form {
        margin-top: 1rem;
    }

    #responseform {
        padding: 20px;
        border: 1px solid $border-color;
        border-radius: $btn-border-radius;

        .theme-dark & {
            border-color: $dm-body-color;
        }
    }
}

table {
    .highlight:before {
        display: none;
    }

    tr.highlight {
        border: 2px solid $primary-color-400 !important;
    }
}

.path-question div[id^=fgroup_id_][id*=answeroptions_] {
    .form-control-feedback {
        padding: 6px 16px!important;
        font-size: $font-size-sm!important;
        font-weight: $font-weight-medium!important;
        border: none!important;
        border-radius: $btn-border-radius!important;
    }

    .invalid-feedback {
        background-color: $red-100!important;
        color: $red-800;
    
        .theme-dark & {
        background-color: #d03434;
        color: $red-100;
        }
    }
}

body.path-mod-quiz .gradedattempt,
body.path-mod-quiz table tbody tr.gradedattempt>td,
body.path-mod-quiz table tbody tr.gradedattempt>td {
    background-color: $gray-100;
    border-color: $gray-300;
}

body.path-mod-quiz.theme-dark .gradedattempt,
body.path-mod-quiz.theme-dark table tbody tr.gradedattempt>td,
body.path-mod-quiz.theme-dark table tbody tr.gradedattempt>td {
    background-color: $dm-gray-100;
    border-color: $dm-gray-300;
}

.theme-dark .que.ddimageortext .draghome, .que.ddimageortext .drag,
.theme-dark form.mform fieldset#id_previewareaheader .droppreview {
    border-color: $dm-border-color;
    background-color: $dm-gray-100;
}

#page-mod-quiz-attempt.pagelayout-secure .submitbtns,
#page-mod-quiz-review.pagelayout-secure .submitbtns {
    margin-bottom: 30px;
}

#page-mod-quiz-edit span.editinstructions {
    right: auto;
}

.mod-indent-outer span.editinstructions {
    right: 0!important;
    top: -21px;
    font-size: 11px;
}

#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmarkcontainer {
    overflow: hidden;
}

#page-mod-quiz-edit ul.slots li.section li.activity .instancemaxmarkcontainer form input {
    height: auto!important;
}

.totalpoints {
    font-size: $font-size-sm;
}

#page-mod-quiz-view .generalbox#feedback {
    width: 100%;
}

#page-mod-quiz-view .quizinfo {
    text-align: left;
}