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

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

.cards_sub,
.has_sub_cards .no_cards_sub {
    display: none;
}

.has_sub_cards .cards_sub {
    display: block;
}

.navbar {
    position: static;
}

html.full_catalog_opened {
    overflow: hidden;
}

h1 {
    font-size: 25px;
}

.gap_10 {
    gap: 10px;
}

#test_field {
    visibility: hidden;
}

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

.card,
.add_card {
    border-bottom-width: 4px;
    background-color: var(--white);
    margin-bottom: 24px;
    padding-top: 20px;
}

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

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

.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;
}

.mainrow {
    padding-top: 15px;
    width: 100%;
    gap: 32px;
}

.card .term, 
.card .value {
    width: 100%;
    flex-grow: 1;
}

.underline_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 var(--main);
    transition: all linear 0.1s;
}

.underline_field:focus {
    border-color: var(--accent);
    border-width: 3px;
}

.underline_field:focus ~ label {
    color: var(--accent);
}

.underline_field + label {
    display: block;
    margin-top: 7px;
    text-transform: uppercase;
    font-weight: var(--main_bold_weight);
    color: var(--secondary);
    display: block;
}

.start_field .underline_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);
}


.flex_grow {
    flex-grow: 1;
}

.start_field .underline_field + label.red {
    text-transform: none;
}

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

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

#back_link:hover {
    color: var(--accent);
    transition: 0.1s linear color;
}

/* IMAGE SEARCH */

.image[data-img="term"],
.has_term_img .add_term_image {
    display: none;
}

.has_term_img .image[data-img="term"] {
    display: block;
}

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

.gsc-tabsArea,.gsc-cursor {
    display: none !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);
}

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

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

/* LANDING */

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

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

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

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

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

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

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

.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;
}

/* IMPORT */

.ai_modal_opener {
    display: flex;
}

.import_opener span::before,
.import_opener span {
    width: 18px;
    height: 2px;
    background-color: var(--lightgray);
    border-radius: 100vh;
}

.import_opener span {
    display: inline-block;
    vertical-align: middle;
    margin-right: 15px;
    position: relative;
    margin-top: -2px;
}

.import_opener span::before {
    content: "";
    transform: rotate(90deg);
    position: absolute;
    left: 0;
    top: 0;
}

#import_modal .modal-content, 
#ai_modal .modal-content {
    width: 100%;
    max-width: 1200px;
}

#import_data,
#ai_data {
    width: 100%;
}

.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;
}

@keyframes shrink-bounce {
    0% {
        transform: scale(1);
    }
    33% {
        transform: scale(.85);
    }
    100% {
        transform: scale(1);
    }
}

@keyframes checkbox-check {
    0% {
        width: 0;
        height: 0;
        border-color: var(--white);
        transform: translate3d(0, 0, 0) rotate(45deg);
    }
    33% {
        width: 4px;
        height: 0;
        transform: translate3d(0, 0, 0) rotate(45deg);
    }
    100% {
        width: 4px;
        height: 10px;
        border-color: var(--white);
        transform: translate3d(0, -10px, 0) rotate(45deg);
    }
}

.custom_sep {
    max-width: 55px;
    margin-left: 5px;
}

.definition {
    background: var(--white);
    margin-bottom: 24px;
    border: var(--border);
    border-bottom-width: 4px;
    border-radius: Var(--radius);
    padding: 24px;
    display: flex;
    position: relative;
}


@media (min-width: 768px) {
    .side_text {
        min-width: 50%;
        max-width: 50%;
    }
    .section img {
        max-width: 45%;
    }
    .section {
        gap: 40px;
    }
    .definition {
        font-size: 19px;
        flex-direction: row;
    }
    .definition .term {
        min-width: 40%;
        max-width: 40%;
        word-break: break-word;
        padding-right: 24px;
        border-right: 2px solid var(--secondary_background1);
    }

    .definition .def {
        flex-grow: 1;
    }

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

#unis_list,
#faculty_list {
    position: absolute;
    z-index: 2;
    top: calc(100% + 10px);
    width: 100%;
    border: var(--border);
    background-color: var(--white);
    border-radius: var(--radius);
    overflow: hidden;
}

#unis_list div,
#faculty_list div {
    cursor: pointer;
    width: 100%;
    padding: 10px 15px;
}

#unis_list div:hover,
#faculty_list div:hover {
    background-color: var(--secondary_background);
}