@import url('https://fonts.googleapis.com/css2?family=Noto+Serif+JP&display=swap');
@import url("https://use.typekit.net/qfq4azv.css");
@import url('https://fonts.cdnfonts.com/css/satoshi');
                

:root {
    --white: #fff;
    --red: #ff0f0f;
    --orange: #ff9c07;
    --grayest: #222222;
    --grayer: #666666;
    --gray: #cdcdcd;
    --green: #57b000;
    --lightgray: #ededed;
    --title: clamp(36px, 15vmin, 44px);
    --topic: clamp(26px, 10vmin, 36px);
    --subtopic: clamp(20px, 6vmin, 26px);
    --text: clamp(16px, 4vmin, 20px);
}

body {
    background-color: var(--grayest);
    font-family: 'Satoshi';
    color: var(--lightgray);
}

.root {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.outer_grid {
    font-size: var(--text);
    display: grid;
    grid-template-rows: 7vh 93vh
}

.inner_grid {
    font-size: var(--text);
    display: grid;
    grid-template-columns: 1fr 4fr;
}

#user {
    border-right: 2px solid var(--grayer);
    padding-top: clamp(6px, 4vh, 18px);
}

#profile {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: "left";
    column-gap: clamp(3px, 3vmin, 12px);
    padding-left: 1em;
}

#profile img {
    border-radius: 50%;
    display: inline-block;
    width: clamp(60px, 7vh, 90px);
    height: clamp(60px, 7vh, 90px);
    object-fit: cover;
}

#sidebar_buttons {
    display: flex;
    flex-direction: column;
    margin-top: clamp(3px, 5vh, 12px);
}

#main {
    padding: clamp(6px, 4vh, 18px) clamp(12px, 6vw, 48px);
    overflow-y: auto;
}

h1 {
    font-family: 'Satoshi';
    font-size: var(--title);
    font-weight: 900;
    color: var(--orange);
    margin-bottom: 0.2em;
    margin-top: 0px;
}

h2 {
    font-family: 'Satoshi';
    font-size: var(--topic);
    font-weight: 700;
    color: var(--orange);
    margin-bottom: 0.5em;
}

h3 {
    font-family: 'Satoshi';
    font-size: var(--subtopic);
    font-weight: 400;
    color: var(--orange);
    margin: 0px;
}

p,b,em {
    font-family: 'Satoshi';
    font-size: var(--text);
    color: var(--lightgray);
    margin: 0px;
}

a, span {
    font-family: 'Satoshi';
    transition: all 0.2s ease;
    cursor: pointer;
}

a {
    color: var(--lightgray);
    text-decoration: none;
}

a:hover {
    color: var(--orange);
}

button {
    color: #ededed;
    font-size: var(--text);
    background-color: transparent;
    border: none;
    border-radius: 0;
    min-height: fit-content;
}

table {
    width: 100%;
    display: table;
    border-collapse: collapse;
    border: 3px solid var(--orange);
}

th {
    background-color: var(--orange);
    color: var(--grayest);
    padding: 0.5em;
}

td {
    background-color: var(--grayest);
    color: var(--lightgray);
    padding: 0.5em 1em;
    vertical-align: bottom;
}

tr th {
    border-right: 3px solid var(--grayest);
}

tr th:last-child {
    border-right: none;
}

tr td {
    border: 3px solid var(--orange);
    border-top: none;
}

form {
    display: flex;
    flex-direction: column;
    gap: clamp(3px, 3vmin, 12px); 
}

.error {
    color: var(--grayest);
    font-size: var(--text);
    font-weight: 700;
    text-align: center;
}

/* Code for unselectable elements adapted from: https://stackoverflow.com/questions/69430/is-there-a-way-to-make-text-unselectable-on-an-html-page Pointer events, cursor, and list of browser supported is changed. */
.unselectable {
    -moz-user-select: -moz-none;
    -khtml-user-select: none;
    -webkit-user-select: none;
    -ms-user-select: none;
    user-select: none;
    pointer-events: none;
    cursor: default;
}

.form_input {
    width: 100%;
    display: flex; 
    flex-direction: row; 
    column-gap: clamp(3px, 3vmin, 12px);
}

input, textarea {
    font-family: 'Satoshi';
    width: 100%;
    font-size: var(--text);
    padding: clamp(3px, 3vmin, 12px);
    transition: border 0.15s;
    background-color: black;
    border: 2px var(--grayer) solid;
    color: var(--lightgray);
    outline: none;
}

input:focus, textarea:focus {
    border: 2px var(--orange) solid;
}

textarea {
    resize: none;
    overflow: hidden;
    padding-bottom: 0px;
}

.badges_container {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 2vw;
    overflow-x: hidden;
    padding: 0.5em
}

.badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 5em;
}

.badge img {
    height: 5em; 
    margin-bottom: 2vh;
}

.nav_bar {
    background-color: black;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.nav_bar button {
    font-weight: 700;
    min-width: 8em;
    height: 100%;
}

.section {
    padding-bottom: 0.5em;
    margin-bottom: 1em;
    width: 100%;
}

.main_content {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.animated_button, .popup_footer button {
    padding: clamp(3px, 10%, 12px);
    transition: all 0.2s ease;
}

.action_button, .autograde_button, .popup_footer button {
    color: var(--orange);
    border: 3px solid var(--orange);
    font-weight: 700;
    padding: 0.4em 0.8em;
    transition: all 0.2s ease;
    border-radius: 1000px;
}

.action_button, .autograde_button {
    padding: 0.75em 3em;
    width: clamp(300px, 35%, 600px);
}

.action_button:hover:enabled, .popup_footer button:hover {
    background-color: var(--orange);
    color: var(--grayest);
}

.action_button:disabled {
    color: var(--gray);
    border: 3px solid var(--gray);
}

#logout_button:hover {
    background-color: var(--red);
    color: var(--grayest);
}

.selected_button {
    background-color: var(--orange);
    color: var(--grayest);
}

.selected_button:hover {
    background-color: var(--orange);
    color: var(--grayest);
}

.logo_container img {
    width: clamp(100px, 20vmin, 250px);
    margin: 0px;
}

.side_button {
    padding-left: 3vw;
    height: max(60px, 4em);
    transition: padding 0.2s ease;
    text-align: left;
    font-weight: 400;
}

.side_button:hover {
    color: var(--orange);
    padding-left: 4vw;
}

.selected_side_button {
    background-color: var(--orange);
    color: var(--grayest);
    padding-left: 4vw;
    font-weight: 700;
}

.selected_side_button:hover {
    color: var(--grayest);
}

.mcq_button {
    border: 3px solid var(--grayer);
    padding: 1vh 1vw;
    text-align: left;
    width: 100%;
}

.mcq_button:hover:enabled {
    color: var(--orange);
}

.selected_mcq_button {
    border: 3px solid var(--orange);
    background-color: var(--orange);
}

.selected_mcq_button span {
    color: var(--grayest);
}

.create_mcq_options {
    display: flex;
    flex-direction: row;
    align-items: center; 
    column-gap: 3em;
}

.create_mcq_options b {
    margin: 0px;
    color: var(--grayest);
}

#current_page_button {
    padding-left: 4vw;
}

#search_bar {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-right: clamp(10px, 2vw, 50px);
    color: var(--lightgray);
    font: 400 var(--text);
    outline: none;
    border: none;
    padding: 0px 0px 6px 12px;
    border-bottom: 2px solid var(--grayer);
    background-color: transparent;
    transition: border-bottom 0.2s ease;
}

#search_bar:focus {
    border-bottom: 2px solid var(--lightgray);
}

.problem_flair { 
    display: flex;
    flex-direction: row;
    align-items: center;
    column-gap: 2em;
}

/* Popup code adapted from https://www.youtube.com/watch?v=i8fAO_zyFAM. Inputs and structure are changed. */
.popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #000000A0;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.popup_content {
    background-color: var(--grayest);
    border: 3px solid var(--orange);
    width: clamp(300px, 50vw, 800px);
    max-height: 80vh;
    overflow-y: auto;
}

.popup_header {
    display: flex;
    flex-direction: row;
    background-color: var(--orange);
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1em;
    padding: 0.5vh 1vw; 
}

.popup_header h2 {
    color: var(--grayest);
}

.popup_body {
    padding: 0px 1vw;
}

.popup_footer {
    display: flex;
    flex-direction: row;
    justify-content: end;
    padding: 0.5vh 1vw 1vh 1vw;
}

#reject_button, .reject_button {
    border: 3px solid var(--red);
    color: var(--red);
}

#reject_button:hover, .reject_button:hover:enabled, .red_button {
    background-color: var(--red);
    border: 3px solid var(--red);
    color: var(--grayest);
}

#approve_button, .approve_button {
    border: 3px solid var(--green);
    color: var(--green);
}

#approve_button:hover, .approve_button:hover:enabled, .green_button {
    background-color: var(--green);
    border: 3px solid var(--green);
    color: var(--grayest);
}

#rate_container {
    display:"grid";
    grid-template-columns: "1fr 1fr 1fr 1fr 1fr";
    gap:"0px clamp(6px, 3vw, 18px)"
}

#rate_container button {
    text-align: center;
}

#welcome_sign {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 3vh 0px;
}

#welcome_sign p, #welcome_sign b {
    font-size: var(--topic);
    font-weight: 500;
}

#welcome_sign b {
    font-weight: 800;
}