@import url("../components/sidebar.css");

@import url("../components/modal.css");
@import url("../components/tabs.css");
@import url("../components/star-rating.css");
@import url("../components/checkbox.css");

#question_count {
    font-weight: var(--main_boldest_weight);
}

.test,
.testmode .main,
.testmode nav,
.testmode footer,
.content pre,
.test_results,
.ended_btns,
.ended .test_wrapper,
.ended .check_btn {
    display: none;
}

.testmode .test {
    display: flex;
}

.test {
    top: 0;
    position: absolute;
    min-height: 100%;
    width: 100%;
    background-color: var(--white);
    flex-direction: column;
    justify-content: space-between;

}

.zadanie_container {
    width: 100%;
    padding: 0 15px;
    max-width: 950px;
    margin: auto;
}

.test_wrapper {
    margin: 0 auto;
    font-size: 17px;
    padding-bottom: 30px;
    flex-grow: 1;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
}

.test_results {
    text-align: center;
    /* position: relative; */
    flex-grow: 1;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.res_content {
    font-size: 18px;
    width: 100%;
    position: relative;
}

.test_results h2 {
    font-size: 30px;
}

.ended .test_results {
    display: flex;
}

.ended .ended_btns {
    display: flex;
}

.slim_cont {
    width: 100%;
    max-width: 660px;
}

h1 {
    margin: 10px 0 15px 0;
    padding-bottom: 15px;
    border-bottom: 4px solid var(--accent);
    font-size: 22px;
}

h2,
h3 {
    font-size: 17px;
}

#score {
    padding: 0 15px;
    margin-top: 10px;
}

.starter {
    font-size: 16px;
    margin: auto;
    padding: 24px;
    width: 100%;
    max-width: 900px;
    overflow-x: hidden;
}

.check_btn,
.ended_btns .btn {
    min-width: 100%;
    font-size: 16px;
}

/* AWARDS */

.awards {
    font-size: 18px;
    margin-top: 20px;
}

.awards.xp_only #test_ametist {
    display: none;
}

.awards img {
    height: 30px;
}

.mark {
    min-width: 60px;
    max-width: 60px;
    min-height: 60px;
    max-height: 60px;
    background-color: var(--white);
    border-radius: 100%;
    transform: scale(0);
}

.mark svg {
    width: 24px;
    height: 24px;
}

.correct_answered .mark,
.wrong_answered .mark {
    animation: bounce 0.5s forwards;
}

@keyframes bounce {
    0% {
        transform: scale(0);
    }

    33% {
        transform: scale(1.2);
    }

    66% {
        transform: scale(0.8);
    }

    100% {
        transform: scale(1);
    }
}

.toast {
    display: none;
    left: 0;
    right: 0;
}

.show_toast .toast {
    display: flex;
}

#toast_title {
    display: block;
    font-weight: 700;
    font-size: 21px;
    margin-bottom: 6px;
}

.correct_answered #toast_title,
#toast_right_text {
    color: var(--green);
}

.wrong_answered #toast_title,
#toast_wrong_text {
    color: var(--red);
}

#toast_wrong_text,
#toast_right_text {
    font-size: 15px;
    display: inline-block;
}

#toast_wrong_text,
#wrong_img {
    display: none;
}

.wrong_answered .toast #toast_wrong_text,
.wrong_answered .toast #wrong_img {
    display: inline-block;
}

.wrong_answered .toast #toast_right_text,
.wrong_answered .toast #right_img {
    display: none;
}

.skip,
.toast .use_hint span,
.toast .show_solution span {
    cursor: pointer;
    text-decoration: underline;
}

#toast_right_text .show_solution {
    font-weight: 400;
}

#toast_right_text .show_solution span {
    font-weight: 700;
}

#close_toast {
    width: 20px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    top: 0;
    right: 15px;
    background-color: transparent;
    border: none;
}

#close_toast::before,
#close_toast::after {
    left: 0;
    right: 0;
    top: 0;
    bottom: 0;
    margin: auto;
    content: "";
    position: absolute;
    width: 2px;
    height: 16px;
    border-radius: 3px;
    background-color: var(--red);
    transition: 0.3s;
}

#close_toast::before {
    transform: rotate(45deg);
}

#close_toast::after {
    transform: rotate(-45deg);
}

#close_toast:hover::before,
#close_toast:hover::after {
    background-color: var(--secondary);
}

.correct_answered #close_toast::before,
.correct_answered #close_toast::after {
    background-color: var(--green);
}

.calculator {
    margin: 24px auto 0 auto;
}


/*FOOTER */

.test_footer,
.test_header {
    background-color: var(--white);
    padding: 24px 0;
}

.show_toast .test_footer {
    position: sticky;
    z-index: 89;
    bottom: 0;
}

.correct_answered.show_toast .test_footer,
.correct_answered .toast {
    border-color: #e5fae5;
    background-color: #e5fae5;
}

.correct_answered .check_btn::before {
    background-color: var(--green);
    box-shadow: 0 4px 0 var(--darkgreen);
}

.wrong_answered.show_toast .test_footer,
.wrong_answered .toast {
    border-color: rgb(255, 223, 224);
    background-color: rgb(255, 223, 224);
}

.wrong_answered.show_toast .check_btn:not(:disabled)::before {
    background-color: var(--red);
    box-shadow: 0 4px 0 var(--darkred);
}


/* ANIMATIONS */

#perfectAnimWrapper,
#obrazavrPraise,
#rightAnimWrapper {
    display: none;
    position: absolute;
    pointer-events: none;
}

.anim_wrapper {
    position: absolute;
    bottom: 0;
    right: 0;
    left: 0;
    margin: auto;
    pointer-events: none;
    overflow: hidden;
}

#rightAnimWrapper {
    width: 300px;
    z-index: 99;
    position: relative;
    bottom: -120px;
    display: inline-block;
}

#perfectAnimWrapper {
    width: 100%;
    top: 0;
    position: fixed;
    pointer-events: none;
}

#obrazavrPraise {
    width: 300px;
    right: 10px;
    bottom: -300px;
    transition: all 0.1s ease-out;
}

.praise #obrazavrPraise {
    display: block;
}

#obrazavrMissAnimation,
#obrazavrAnimation {
    display: none;
    pointer-events: none;
    height: 60vh;
    max-height: 500px;
    width: 100%;
    margin-top: 30px;
    transition: all 0.1s ease-out;
}

.phrase {
    transition: all 0.3s ease-out 0.2s;
    opacity: 0;
    position: absolute;
    text-align: center;
    bottom: 150px;
    padding: 16px 24px;
    margin-left: 10px;
    right: 280px;
    font-size: 20px;
    font-weight: 500;
}

.phrase_triangle {
    position: absolute;
    top: 24px;
    left: calc(100% - 5px);
    height: 10px;
    transform: rotate(-90deg);
    width: 20px;
    overflow: hidden;
}

.phrase_triangle::after {
    content: "";
    position: absolute;
    height: 14px;
    width: 14px;
    top: -12px;
    left: 0;
    border-radius: 2px;
    transform: rotate(-45deg);
    background-color: var(--white);
    border: var(--border);
}

.praise .test_wrapper {
    overflow: hidden;
}

.praise .hint_report_bar {
    display: none;
}


.problem_reporter {
    padding: 24px;
    background-color: var(--secondary_background);
    border-radius: 10px;
}

input[name="problem_report"] {
    margin-right: 7px;
}

.problem_desc {
    margin-top: 10px;
    width: 100%;
    resize: vertical;
}

.select-problem label {
    margin-top: 3px;
    display: flex;
    align-items: center;
}

.thanks,
.problem_fill {
    display: none;
}

.comments_section {
    margin-left: 0;
}

/**/

#zadanie_attempts {
    padding: 0;
}

.zadanie_attempt {
    padding: 15px 24px;
}
.zadanie_attempt:not(:first-child) {
    border-top: var(--border);
}
@media (min-width: 500px) {
    .check_btn,
    .ended_btns .btn {
        min-width: 170px;
        font-size: 19px;
    }

    .test_footer {
        border-top: var(--border);
        min-height: 140px;
    }

    .zadanie_inner_footer {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .test_wrapper {
        font-size: 18px;
    }

    .test_results h2 {
        font-size: 42px;
    }

    #close_toast {
        display: none;
    }

    .toast {
        margin-right: 20px;
    }
}

@media (min-width: 768px) {
    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 20px;
    }

    .starter {
        font-size: 17px;
    }

    #toast_title {
        font-size: 25px;
    }

    #toast_wrong_text,
    #toast_right_text {
        font-size: 16px;
    }

    .mark {
        min-width: 80px;
        max-width: 80px;
        min-height: 80px;
        max-height: 80px;
    }

    .mark svg {
        width: 32px;
        height: 32px;
    }
}

@media (max-width: 500px) {
    .praise .test_footer {
        padding-top: 0;
        margin-top: -5px;
    }

    .toast {
        margin-bottom: 20px;
    }
}

@media (max-width: 600px) {
    #obrazavrPraise {
        right: 0;
        margin: auto;
        left: 0;
    }

    .phrase {
        padding: 16px 24px;
        bottom: 270px;
        max-width: 300px;
        width: 100%;
        left: 50%;
        transform: translate(-50%, 0);
        right: auto;
        margin: 0;
    }

    .phrase_triangle {
        left: 100px;
        right: auto;
        top: 100%;
        transform: rotate(0);
    }
}


@media (min-width: 1197px) {
    .test_wrapper {
        font-size: 20px;
    }
    
    h1 {
        font-size: 30px;
    }

    h2 {
        font-size: 22px;
    }
}


@media (min-width: 1600px) {
    .starter {
        transform: translateX(-135px);
    }
}


@media (max-height: 770px) {

    #obrazavrMissAnimation,
    #obrazavrAnimation {
        width: auto;
        height: 50vh;
    }
}