/* stylelint-disable declaration-no-important  */

.que.mtf table.mtf {
    display: inline-table;
    border-spacing: 0 5px;
    border-collapse: separate;
}

.que.mtf table.mtf th,
.que.mtf table.mtf td {
    position: relative;
}

.que.mtf table.mtf div.r0 label,
.que.mtf table.mtf div.r1 label,
.que.mtf table.mtf div.r0 div.specificfeedback,
.que.mtf table.mtf div.r1 div.specificfeedback {
    /* In Chrome and IE, the text-indent above is applied to any embedded table
       cells or <li>s, which screws up the intended layout. This fixes it again. */
    text-indent: 0 !important;
}

.que.mtf .answer div.r0 input,
.que.mtf .answer div.r1 input {
    margin: 0 5px;
    padding: 0;
    width: 15px;
}

.dir-rtl .que.mtf .answer div.r0,
.dir-rtl .que.mtf .answer div.r1 {
    padding: 0.3em 25px 0.3em 0;
}

.que.mtf table.mtf tbody tr {
    margin-bottom: 2em;
    margin-top: 0;
    padding-bottom: 5px;
    padding-top: 5px;
    border-top: 0;
}

.que.mtf table.mtf th {
    border-width: 3px;
}

.que.mtf table.mtf td,
.que.mtf table.mtf th {
    text-align: center;
    padding-top: 5px;
    padding-bottom: 5px;
    padding-left: 5px;
    padding-right: 5px;
    min-width: 50px;
}

.que.mtf table.mtf tbody td.optiontext {
    min-width: 10em;
    text-align: left;
    padding-right: 4em;
    background: #eee;
}

.que.mtf table.mtf tbody td.mtfresponsebutton {
    background: #eee;
    max-width: 64px;
    opacity: 0.1;
    background-color: #000;
}

.mtfgreyingout {
    opacity: 0.3;
}

.que.mtf table.mtf tbody td.correctness {
    vertical-align: middle;
    display: table-cell;
    background: #eee;
    border-radius: 0;
    border-left: #777 solid 3px !important;
}

td.mtfcorrectness {
    border-left: #aaa solid 1px;
    text-align: center;
}

.que.mtf table.mtf tbody td.feedback {
    padding-left: 1em;
}

.que.mtf table.mtf tbody td.feedback div.specificfeedback {
    background: #fff3bf !important;
    text-align: left !important;
}

.mtfspecificfeedback {
    background: #fff3bf !important;
    text-align: left !important;
}

.que.mtf table.mtf .lastcol p {
    display: inline;
    margin: 0;
    margin-left: 5px;
}

/* ====================================*/
/** The question editing form */
/* ====================================*/
body#page-question-type-mtf div.responsetexts {
    float: left;
    width: auto;
    padding-left: 10px;
    padding-right: 10px;
    margin-bottom: 0;
    text-align: center;
    border: 0;
}

body#page-question-type-mtf div#fitem_id_responsetext_2 div.fitemtitle {
    display: none;
}

body#page-question-type-mtf div.optionbox {
    margin-top: 0;
    padding-bottom: 15px;
    padding-top: 5px;
    display: flex;
}
body#page-question-type-mtf div.option_question {
    flex: 1;
    flex-grow: 1;
    word-break: break-word;
}
body#page-question-type-mtf div.option_answer {
    flex-shrink: 1;
}


body#page-question-type-mtf div.optionbox label.optiontitle {
    font-weight: bold;
    margin-bottom: 0;
}

/* Put response checkboxes in the middle */
body#page-question-type-mtf div.responses {
    width: auto;
    margin-bottom: 0;
    vertical-align: middle;
    text-align: center;
    border: 0;
    position: relative;
}

@media (max-width: 986px) {
    body#page-question-type-mtf div.responses {
        padding-top: 0;
        float: left;
    }
}

body#page-question-type-mtf div.responses fieldset.fgroup span {
    border: 1px;
    margin: 0 0 8px 2px;
    background-color: white;
    border-radius: 5px;
    vertical-align: middle;
    display: inline-block;
    width: 80px;
}

body#page-question-type-mtf div.responses fieldset.fgroup span input {
    vertical-align: bottom;
    position: relative;
    top: -2px;
}

body#page-question-type-mtf div.responses fieldset.fgroup span label {
    vertical-align: bottom;
}

body#page-question-type-mtf div.responses div.fitem_fgroup {
    text-align: left;
    width: auto;
    border-width: 0 0 0 0;
}

body#page-question-type-mtf div.responses div.fitem_fgroup fieldset.fgroup {
    margin-left: 0;
}

body#page-question-type-mtf div.responses div.fitem_fgroup div.fitemtitle {
    text-align: left;
    width: 0;
}

body#page-question-type-mtf div.optiontext div.fitemtitle {
    padding-left: 0;
    padding-top: 0;
}
/* Put the feedback text editor to the right */
body#page-question-type-mtf div.feedbacktext {
    margin-left: 0;
    display: block;
    clear: both;
}

body#page-question-type-mtf div.optionbox label.feedbacktitle {
    font-weight: normal !important;
    margin-top: 1px !important;
    margin-bottom: 0 !important;
    color: #777;
}

body#page-question-type-mtf div.feedbacktext div.fitemtitle {
    padding-left: 0;
    padding-top: 0;
}

body#page-question-type-multichoice div[id^=fitem_id_][id*=feedback_] {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 5px;
    padding-top: 5px;
    border: 1px solid #bbb;
    border-bottom: 0;
}

body#page-question-type-mtf div[id^=fitem_id_][id*=option_] {
    margin-top: 0;
    margin-bottom: 0;
    padding-bottom: 5px;
    padding-top: 5px;
}

body#page-question-type-mtf div[id^=fitem_id_][id*=option_] .fitemtitle {
    font-weight: bold;
}

body#page-question-type-mtf div[id^=fitem_id_] .fitemtitle {
    margin-left: 0;
    margin-right: 0;
    padding-left: 6px;
    padding-right: 0;
}

body.dir-rtl#page-question-type-mtf div[id^=fitem_id_] .fitemtitle {
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 6px;
}

body#page-question-type-mtf div[id^=fgroup_id_][id*=responses_] {
    background: #eee;
    margin-bottom: 2em;
    margin-top: 0;
    padding-bottom: 5px;
    padding-top: 5px;
    border: 1px solid #bbb;
    border-top: 0;
}

body#page-question-type-mtf div[id^=fgroup_id_weightsarray] {
    background: #eee;
    margin-top: 0;
    padding-bottom: 5px;
    padding-top: 5px;
    border: 1px solid #bbb;
    border-top: 0;
}

.que.mtf table .c0,
.que.mtf table .c1 {
    width: 1%;
    min-width: 70px;
}

#page-mod-quiz-review .que.mtf table .c2,
#page-mod-quiz-review .que.mtf table .c4 {
    width: 40%;
}

@supports (display:-ms-grid) {
    body#page-question-type-mtf #id_questiontexteditable,
    body#page-question-type-mtf #id_generalfeedbackeditable,
    body#page-question-type-mtf .optionbox,
    .que.mtf .optiontext,
    .mtfspecificfeedback {
        word-break: break-all;
    }
}

body#page-question-type-mtf #id_questiontexteditable,
body#page-question-type-mtf #id_generalfeedbackeditable,
body#page-question-type-mtf .optionbox,
.que.mtf .optiontext,
.mtfspecificfeedback {
    word-break: break-word;
    overflow-wrap: anywhere;
}

#page-mod-quiz-attempt .que.mtf .mtfresponsebutton label {
    padding: 10px;
}
/* stylelint-enable declaration-no-important  */