@import url("../components/modal.css");
@import url("../components/tabs.css");
@import url("../test-general.css");

html.full_catalog_opened {
    overflow: hidden;
}

.tests_sub,
.has_sub_tests .no_tests_sub {
    display: none;
}

.has_sub_tests .tests_sub {
    display: block;
}

body {
    background-color: var(--secondary_background);
    padding-top: 0;
}

.navbar {
    position: static;
}

h1 {
    font-size: 25px;
}

.creator_header {
    padding: 24px 0;
    background-color: var(--secondary_background);
}

.tabs {
    z-index: 1;
}

section:not(.active) {
    display: none;
}

.draft_alert {
    z-index: 100;
    position: fixed;
    bottom: 24px;
    left: 24px;
    width: 420px;
    max-width: calc(100% - 48px);
    padding: 24px 48px 24px 20px;
    overflow: hidden;
    border-radius: var(--radius);
    background-color: var(--lightblue);
    border: 4px solid var(--blue_border);
}

.close_draft_alert {
    width: 20px;
    height: 20px;
    cursor: pointer;
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    right: 24px;
    top: 24px;
}

.close_draft_alert::before,
.close_draft_alert::after {
    position: absolute;
    margin: auto;
    content: "";  
    width: 2px;
    height: 16px;
    border-radius: 3px;
    background-color: var(--lightgray);
    transition: 0.3s;
}

.close_draft_alert::before {
    transform: rotate(45deg);
}

.close_draft_alert::after {
    transform: rotate(-45deg);
}

.close_draft_alert:hover::before,
.close_draft_alert:hover::after {
    background-color: var(--blue_text);
}

.draft_alert h3 {
    font-size: 22px;
}

.wide_container {
    padding: 0 24px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    max-width: 1268px;
}

.option input[type="radio"] {
    visibility: hidden;
    position: absolute;
    right: 0;
    bottom: 0;
}

.option:active .check,
.option input[type="radio"]:checked~.check {
    border-color: var(--accent);
}

.option .check {
    cursor: pointer;
    position: relative;
    min-width: 32px;
    min-height: 32px;
    border-radius: 7px;
    border: var(--border);
    border-bottom-width: 4px;
    margin-right: 10px;
    transition: all 250ms cubic-bezier(.4, .0, .23, 1);
}

.option input[type="radio"]:checked~.check {
    border: 16px solid var(--accent);
    animation: shrink-bounce 200ms cubic-bezier(.4, .0, .23, 1), border-color 200ms;
}

.option input[type="radio"]:checked~.check:before {
    content: "";
    position: absolute;
    top: -2.5px;
    left: -7.23px;
    border-right: 3px solid transparent;
    border-bottom: 3px solid transparent;
    transform: rotate(45deg);
    transform-origin: 0% 100%;
    animation: checkbox-check 125ms 250ms cubic-bezier(.4, .0, .23, 1) forwards;
}

.ct_field {
    display: block;
    font-size: 17px;
    background-color: transparent;
    resize: none;
    overflow: hidden;
    min-height: 50px;
    max-height: 100px;
    padding: 10px 0;
    width: 100%;
    min-width: 40px;
    border: 0;
    border-radius: 0;
    border-bottom: 2px solid transparent;
    transition: all linear 0.1s;
}

.ct_field:focus {
    border-bottom: 2px solid var(--accent);
    border-width: 3px;
}

.ct_error {
    margin-top: 10px;
    font-weight: var(--main_bold_weight);
    color: var(--red);
}

.start_field .ct_field {
    background-color: var(--white);
    border-radius: var(--radius);
    padding: 15px 24px;
    border: var(--border);
    border-bottom-width: 4px;
    font-weight: var(--main_bold_weight);
}

.q_text {
    min-width: 100%;
    max-width: 100%;
}

.tabs {
    margin-bottom: 36px;
}

.question,
.instr,
.settings,
.add_q {
    border-bottom-width: 4px;
    background-color: var(--white);
    padding-top: 20px;
}

.add_q {
    text-transform: uppercase;
    padding: 35px 10px;
    color: var(--lighter_main);
    font-weight: var(--main_bolder_weight);
    cursor: pointer;
}

.add_q.disabled {
    background-color: var(--secondary_background);
    color: var(--secondary);
}

.add_q span {
    padding: 0 10px 10px;
    border-bottom: 4px solid var(--accent);
}

.number {
    font-family: var(--header_font);
}

.delete {
    color: var(--secondary);
    transition: color linear 0.1s;
}

.delete:hover {
    color: var(--accent);
}

.delete.disabled {
    color: var(--lightgray_2);
    pointer-events: none;
}

.test_footer {
    border-top: 1px solid var(--lightgray);
    margin-left: -26px;
    margin-right: -26px;
    padding: 20px 24px 0;
}

.remove_option {
    margin-left: 15px;
}

.question {
    margin-top: 24px;
}

.question .error {
    display: none;
}

.question.has_error .error {
    display: flex;
}

@media (min-width: 768px) {
    .q_text {
        min-width: 50%;
        max-width: 50%;
    }

    .floating {
        width: 100%;
        top: 0;
        position: fixed;
        z-index: 80;
        box-shadow: rgba(48, 53, 69, 0.08) 0px 4px 16px 0px;
    }
}

/* IMAGE SEARCH */

.image_search table,
.image_search td,
.image_search tr:last-child td {
    border: 0 !important;
}

.add_image {
    padding: 0 !important;
    max-width: 95px;
    min-width: 95px;
    min-height: 70px;
    max-height: 70px;
}

.image.active img {
    border-color: var(--accent);
}

.image.active .add_image {
    color: var(--accent);
}

.has-image .add_image,
.remove_img {
    display: none;
}

.image {
    position: relative;
}

.image img {
    display: none;
    width: 95px;
    max-height: 100px;
    border: var(--border);
    border-radius: 10px;
    object-fit: cover;
    cursor: pointer;
}

.has-image img,
.has-image .remove_img {
    display: flex;
}

.remove_img {
    padding: 6px;
    border-radius: 5px;
    background-color: var(--main);
    position: absolute;
    top: 7px;
    right: 7px;
    cursor: pointer;
    transition: background-color linear 0.1s;
}

.remove_img:hover {
    background-color: var(--accent);
}

.question .results {
    max-height: 600px;
    overflow-y: auto;
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
}

.question .results img {
    width: 200px;
    height: 200px;
    border-radius: 10px;
    cursor: pointer;
}

/* NOT LOGGED */

.hero h1 {
    font-size: 45px;
}

h2 {
    font-family: var(--header_font);
    font-weight: var(--header_weight);
    font-size: 35px;
}

.section {
    padding-top: 40px;
    padding-bottom: 40px;
}

.section p {
    font-size: 20px;
}

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

.bg {
    margin-top: 48px;
    padding-top: 48px;
    background-color: var(--white);
}

.access_desc div,
.answer_desc div {
    display: none;
}

.access_desc[data-text="public"] div[data-text="public"],
.access_desc[data-text="link"] div[data-text="link"],
.answer_desc[data-text="to_teacher"] div[data-text="to_teacher"],
.answer_desc[data-text="to_student"] div[data-text="to_student"] {
    display: block;
}

@media (min-width: 768px) {
    .side_text {
        min-width: 50%;
        max-width: 50%;
    }
    .section img {
        max-width: 45%;
    }
    .section {
        gap: 40px;
    }
}