@import url('https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css');

:root {
    --accent-color: #ff6600;
    --copy-button-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' height='24' viewBox='0 -960 960 960' width='24'%3E%3Cpath d='M360-240q-33 0-56.5-23.5T280-320v-480q0-33 23.5-56.5T360-880h360q33 0 56.5 23.5T800-800v480q0 33-23.5 56.5T720-240H360Zm0-80h360v-480H360v480ZM200-80q-33 0-56.5-23.5T120-160v-560h80v560h440v80H200Zm160-240v-480 480Z'/%3E%3C/svg%3E");
}

/* For Mobile */
@media screen and (max-width: 640px) {
    .group-card {
        width: 100%;
    }
}

/* For Tablets */
@media screen and (min-width: 640px) and (max-width: 960px) {
    .group-card {
        width: 49.5%;
    }
}

@media screen and (min-width: 960px) and (max-width: 1400px) {
    .group-card {
        width: 33%;
    }
}

@media screen and (min-width: 1400px) {
    .group-card {
        width: 24.5%;
    }
}

@media screen and (min-width: 960px) and (min-resolution: 320dpi) and (orientation: landscape) {
    .group-card {
        width: 49.5%;
        font-size: 2em;
    }
}

@media screen and (min-width: 960px) and (min-resolution: 320dpi) and (orientation: portrait) {
    .group-card {
        width: 100%;
    }
}


@media screen and (max-width: 960px) and (min-resolution: 160dpi) {
    .group-card {
        width: 100%;
    }
}

@media screen and (min-width: 960px) and (min-resolution: 160dpi) and (max-resolution: 320dpi) {
    .group-card {
        width: 49.5%;
    }
}

@media all and (orientation: portrait) {
    .answer-group-chart .chart-container {
        width: 110vw;
        margin: 0 -5vw;
        display: flex;
        flex-direction: column;
        justify-content: center;
        min-height: 60vh;
        overflow: no-display;
    }
}

@media all and (orientation: landscape) {
    .answer-group-chart .chart-container {
        max-width: 140vh;
        margin: 0 auto;
    }
}

.answer-group-chart h1 {
    margin-bottom: 0;
    margin-left: auto;
    margin-right: auto;
    text-align: center;
}

.answer-group-chart .xkcd-chart-radar-label {
    font-size: 20px !important;
    font-weight: bold;
}

.group-card {
    display: inline-block;
    vertical-align: top;
}

.group-question {
    vertical-align: text-top;
}

.question-number {
    position: absolute;
}

.your-result-line {
    margin-top: -32px;
    padding-left: 1em;
}

.questions-title {
    margin-top: 8px;
    padding-left: 1em;
    margin-bottom: 4px;
}

.answer-text-container {
    position: relative;
    left: 1.4em;
}

/*.wrong .question-number,
.partial .question-number,
.wrong .answer,
.partial .answer,
.wrong .result,
.partial .result,*/
.answer-showCorrect .optionWrong,
.answer-noShowCorrect .optionWrong {
    color: red;
}

.right .correct-answer,
.right .recommendation {
    display: none;
}

.question {
    padding-top: 10px;
}

.group-question {

}

.group-container {
    margin: 16px;
}

.wide-chart-container {
    width: 100%;
    height: 27vw;
}

.authBody {
    background-color: lightgray;
}

.authBody .mdl-layout {
    width: 500px;
    margin: auto;
    margin-top: 60px;
    background-color: white;
}

.authBody .mdl-layout__content {
    padding: 24px;
}

.authBody .mdl-textfield {
    display: block;
    width: 100%;
}

.authBody #submitBtn {
    float: right;
    display: block;
}

.answer-showCorrect li,
.answer-noShowCorrect li {
    display: inline;
}

.answer-showCorrect, .answer-noShowCorrect {
    display: inline;
    padding: 0;
}

.partial .user-answer,
.partial .result .score,
.wrong .user-answer,
.wrong .result .score {
    color: red;
}

.question_data {
    padding-left: 1.4em;

}

.question_data.collapsed *:not(.showQuestionMore) {
    display: none;
}

.question_data.collapsed .showQuestionMore:before {
    content: "Задание >>>";
    color: blue;
    text-decoration: underline;
    cursor: pointer;
    padding-top: 4px;
    display: block;
}

.question_data.expanded .showQuestionMore:before {
    content: "Задание <<<";
    color: blue;
    text-decoration: underline;
    cursor: pointer;
    padding-top: 4px;
    display: block;
}

.question_data.expanded .question-title {
    margin-top: 4px;
    margin-bottom: 4px;
}

.question_data.expanded .question-message {
    margin-top: 4px;
    margin-bottom: 4px;
}

p.total-score {
    font-size: 150%;
    font-family: xkcd, "Comic Sans MS", sans-serif;
    margin-top: 12px;
    margin-bottom: 0;
}

p.total-score .score {
    font-weight: bold;
}

p.test-date {
    font-size: 80%;
    margin: 0;
}

h1.test-title {
    margin-top: 12px;
    margin-bottom: 0;
}

.precept-root .showSentencesButton,
.precept-root .workOnMistakesButton,
.precept-root .workOnMistakesVerifyButton,
.precept-root .workOnMistakesResetButton {
    cursor: pointer;
    text-decoration: underline;
    color: blue;
}

.selection {
    background: rgba(0, 255, 0, 0.2);
}

.hidden {
    display: none !important;
}

.copy-button {
    -webkit-mask-image: var(--copy-button-image);
    mask-image: var(--copy-button-image);
    cursor: pointer;
}

.image-tint-button {
    width: 32px;
    height: 32px;
    display: inline-block;
    cursor: pointer;

    background-color: var(--accent-color);
    background-blend-mode: multiply;
    -webkit-mask-mode: alpha;
    -webkit-mask-size: cover;
    mask-mode: alpha;
    mask-size: cover;
    vertical-align: middle;
}

.toast {
    display: block;
    position: absolute;
    background-color: rgba(220, 220, 220, 0.9);
    padding: 2px 8px;
    border-radius: 4px;
    animation: toast-fadeInOut 2s;
    -webkit-animation: toast-fadeInOut 2s;
    -moz-animation: toast-fadeInOut 2s;
    animation-fill-mode: forwards;
}

@keyframes toast-fadeInOut {
    0% {
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    75% {
        opacity: 1;
    }
    100% {
        opacity: 0;
    }
}

p.copy-url-control {
    width: fit-content;
}

.mistakes-cont .passed:before {
    content: '✔️';
    display: inline-block;
}

.mistakes-cont .failed:before {
    content: '❌';
    display: inline-block;
}

body:has(.user-stats) {
    padding: 8px 0;
    margin: 0;
}

.user-stats th:first-child,
.user-stats td:first-child {
    position: sticky;
    left: 0;
    z-index: 2; /* чтобы первый столбец перекрывал остальные */
    background-color: #fff; /* задаем фон для первого столбца, чтобы он не перекрывал содержимое */
}

.user-stats tr:nth-child(2n) td:first-child {
    background-color: #eee; /* задаем фон для первого столбца, чтобы он не перекрывал содержимое */
}

.user-stats td:first-child {
    background-color: #fff;
    background-image: linear-gradient(to right, rgba(var(--success-level-color), 0.2), rgba(var(--success-level-color), 0.2)),
    linear-gradient(to right, #FFFFFF, #ffffff);
}

.user-stats tr:nth-child(2n) td:first-child {
    background-color: #eee;
    background-image: linear-gradient(to right, rgba(var(--success-level-color), 0.2), rgba(var(--success-level-color), 0.2)),
    linear-gradient(to right, rgba(222, 222, 222, 0.25), rgba(222, 222, 222, 0.25)),
    linear-gradient(to right, #FFFFFF, #FFFFFF);
}

.user-stats th {
    padding: 3px 8px;
}

.user-stats tr:first-child {
    position: sticky;
    top: 0;
    z-index: 100;
    background: #fff;
}

body .user-stats tr:nth-child(2) {
    position: sticky;
    z-index: 100;
    top: 28px;
    background: #fff;
}

table.user-stats {
    border-spacing: 0;
}

.user-stats tr td:last-child,
.user-stats re th:last-child {
    width: 0;
    padding-left: 0;
    padding-right: 0;
    border: none;
}

table.user-stats tr td:last-child::after {
    content: "";
    display: inline-block;
    vertical-align: top;
    min-height: 20px;
}

.popUpInfo {
    max-height: 50vh;
    overflow: auto;
}

.user-stats .popUpInfo {
    display: none;
}

.user-stats td:hover, .user-stats .selected {
    z-index: 10 !important;
}

.user-stats td:hover .popUpInfo,
.popUpInfo:hover,
.user-stats td.selected .popUpInfo {
    display: block;
}

.user-stats .popUpInfo {
    position: absolute;
    top: 80%;
    left: -20%;
    background-color: #fff;
    border: 1px solid #ccc;
    z-index: 10;
    border-radius: 4px;
    box-shadow: 2px 2px 7px #777;
}

.user-stats td:first-child .popUpInfo {
    left: 20%;
}

.test-result-list a {
    display: block;
    padding: 4px 8px;
    text-wrap: nowrap;
    text-decoration: none;
}

.test-result-list a:hover {
    text-decoration: underline;
}

.test-result-list a:last-child {
    padding-bottom: 8px;
}

.user-stats td {
    position: relative;
    padding: 2px 8px;
    border: 2px solid transparent;
}


.user-stats .sl1 {
    --success-level-color: 255, 0, 0;
}

.user-stats .sl2 {
    --success-level-color: 250, 240, 0;
}

.user-stats .sl3 {
    --success-level-color: 0, 200, 0;
}

.user-stats .sl1, .user-stats .sl2, .user-stats .sl3 {
    background-color: rgba(var(--success-level-color), 0.3);
}

.user-stats td.sl1:hover, .user-stats td.sl2:hover, .user-stats td.sl3:hover,
.user-stats td.sl1.selected, .user-stats td.sl2.selected, .user-stats td.sl3.selected {
    border-color: rgba(var(--success-level-color), 1);
}

.user-stats td:hover, .user-stats td.selected {
    box-shadow: 1px 1px 4px #777;
}

.user-stats td.sl1:nth-child(2n),
.user-stats td.sl2:nth-child(2n),
.user-stats td.sl3:nth-child(2n) {
    background-color: rgba(var(--success-level-color), 0.5);
}

.user-stats tr:nth-child(2n),
.user-stats td:nth-child(2n),
.user-stats th:nth-child(2n) {
    background-color: rgba(222, 222, 222, 0.25)
}

.test-result-list .list-header {
    padding: 3px 8px;
    background-color: rgba(0, 100, 255, 0.15)
}

.user-stats td:not(:last-child):after {
    display: block;
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
}

.user-stats td.prSt:after {
    content: "=";
}

.user-stats td.prUp:after {
    content: "\f062";
    color: green;
}

.user-stats td.prDn:after {
    content: "\f063";
    color: red;
}

table.user-stats a.test-list-title {
    display: block;
    padding: 2px 8px;
}

.user-stats td:has(a.test-list-title) {
    padding: 0;
}

p.noMargin {
    margin: 0;
}

.uScore {
    font-weight: bold;
}

.user-info.popUpInfo {
    padding: 2px 0;
}

.user-info.popUpInfo div {
    padding: 2px 8px;
}

.coll-collapsed{
    max-width: 0px;
    overflow:hidden;
    padding: 0!important;
    visibility: hidden;
    width: 0;
    height: 0;
}
.coll-collapsed a{
    display: none;
}
.test-list-title-cell{
    width: auto;
    transition: all 1s ease-in-out;
}

.collapsed-cols-header{
    width: 120px;
}

body.user-stats h4 {
    margin-top: 0.7em;
    margin-bottom: 0.3em;
}

body.user-stats .result-list > div {
    display: block;
    margin-left: 20px;
}

body.user-stats .result-list a {
    display: inline-block;
    padding: 2px 4px;
}

.collapsed > .more::after {
    content: "Развернуть >>>";
}

.collapsible:not(.collapsed) > .more::after {
    content: "<<< Свернуть";
}

.collapsed {
    overflow: hidden;
    height: 2.2em;
}

.collapsible {
    position: relative;
}


body.user-stats h3.results-list-title {
    background-color: rgba(0, 0, 0, 0.1);
    padding: 4px;
    margin: 0;
}

body.user-stats .collapsible .more {
    position: absolute;
    left: 8.1em;
    top: 5px;
    color: red;
    padding-left: 16px;
    padding-top: 0px;
    cursor: pointer;
}

body.user-stats .collapsed h3.results-list-title:after {
    content: "...";
}

body.user-stats .collapsible:not(.collapsed) h3.results-list-title:after {
    content: ":";
}

body.test-result h1 a {
    color: unset;
    text-decoration: unset;
}

body.test-result h1 a:hover {
    text-decoration: underline;
}



body.test-result .question-options {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding-left: 1em;
}
body.test-result .question-option {
    display: flex;
}
body.test-result .question-option *{
    flex: 1 1 0;
    text-align: left;
}
body.test-result .question-option span.option-number{
    flex: 0 0 fit-content;
    display: block;
    padding-right: 0.3em;
}
body.test-result .question-option span.option-number:after{
    content: ". ";
}