:root {
    --font-size: 16px;
    --global-font: "Inter", Helvetica, Arial, sans-serif;
}

#loading-screen {
    height: 100%;
    width: 100%;
    color: #686868;

    grid-column: 2;
    grid-row: 1;
}

.hidden {
    display: none !important;
}

html, body {
    margin: 0;
    overflow: hidden;
    font-family: var(--global-font);
    height: 100%;
    font-size: var(--font-size);
    line-height: 1.5;
}
html {
    background-color: #191919;
    color: white;
}

body {
    position: relative;
}

.question-sidebar-button .inline-circle {
    transition: background-color 150ms ease;
}

.question-sidebar-button-success .inline-circle {
    background-color: #226a22;
}

.question-sidebar-button-error .inline-circle {
    background-color: #a91a0a;
}

.sidebar-button {
    border: solid;
    border-width: 2px;
    border-color: transparent;

    background-color: transparent;
    text-align: left;
    font-size: var(--font-size);
    color: white;
    font-family: inherit;

    transition: border-color 100ms ease, background-color 100ms ease;

    border-radius: 8px;
    padding: 6px 8px;
    min-height: 40px;
    width: 100%;
    margin: 2px 0;
    display: block;
    box-sizing: border-box;

    cursor: pointer;

    position: relative;

    z-index: 2;

    user-select: none;

    font-weight: 500;
    
    -webkit-tap-highlight-color: transparent;

    display: grid;
    grid-template-columns: 32px 1fr;
    align-items: center;

    touch-action: manipulation;
}

.checkpoint-sidebar-button {
    background-image: url('../images/checkerboard.png');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: right;
    overflow: hidden;
    margin: 4px 0;
}

.checkpoint-sidebar-button .inline-big {
    transition: color 150ms ease;
}

.checkpoint-sidebar-button-success .inline-big {
    color: #288028;
}

.sidebar-button > span {
    display: block;
}

.sidebar-button:hover:not(.sidebar-button-selected) {
    border-color: #393939;
    background-color: #ffffff15;
}

.sidebar-button:active:not(.sidebar-button-selected) {
    border-color: #595959;
    background-color: #ffffff2b;
}

.sidebar-button-selected {
    border-color: transparent;
    background-color: #ffffff14;
}

.sidebar-button-selected:hover {
    border-color: #ffffff1f;
}

.sidebar-button-selected:active {
    border-color: #494949;
    background-color: #2c2c2c;
}

.inline-circle {
    border-radius: 12px;
    width: 24px;
    height: 24px;
    background-color: #ffffff2e;
    text-align: center;
    box-sizing: border-box;
    line-height: 24px;
    display: inline-block;
    font-weight: bold;

    user-select: none;
}

.inline-big {
    width: 24px;
    height: 24px;
    text-align: center;
    box-sizing: border-box;
    line-height: 24px;
    margin-right: 2px;
    font-size: 1.4em;
    display: inline-block;
}

#main-wrap {
    width: 100%;
    height: 100%;
    display: grid;
    grid-template-columns: 300px 1fr;
}

.vert-center {
    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

#question-sidebar {
    grid-column: 1;
    grid-row: 1;
    position: relative;
    background-color: #121212;
    
    width: 100%;
    height: 100%;

    overflow-y: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
}

#question-sidebar-wrap {
    width: 100%;
    padding: 12px;
    box-sizing: border-box;

    transition: opacity 200ms ease;
    opacity: 1;
}

.invisible {
    opacity: 0 !important;
}

#question-area {
    grid-column: 2;
    grid-row: 1;
    height: 100%;

    transition: opacity 200ms ease;
}

.main-page {
    display: none;
    width: 100%;
    padding: 32px 32px;
    box-sizing: border-box;
}

.content-page > p .katex-display {
    overflow-x: auto;
    overflow-y: hidden;
    margin: 0;
    padding: 1em 0
}

.katex {
    font-size: 1em !important;
}

.content-page > *:not(h1):not(h2):not(.math-input-error-area *):not(button) {
    font-family: 'KaTeX_Main', Georgia, 'Times New Roman', Times, serif;
    font-size: 1.21em;
}

.content-page > .math-input {
    width: calc(100% + 4px);
    margin-left: -2px;
}

.content-page a {
    color: white;
    border-radius: 6px;
    background-color: #ffffff17;

    padding: 0 4px;
    text-decoration: none;

    transition: background-color 250ms ease;
}

.content-page a:hover {
    background-color: #ffffff24;
}

.content-page a::after {
    content: ' open_in_new';
    font-family: 'Material Icons';
    font-weight: normal;
    font-style: normal;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    line-height: 1;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    font-feature-settings: 'liga';
    -webkit-font-feature-settings: 'liga';
    -webkit-font-smoothing: antialiased;
    vertical-align: middle;
    margin-bottom: 1px;
    margin-left: 3px;
    color: #aaaaaa;
}

#ign-input {
    resize: none;
    color: white;
    background-color: #292929;
    border-radius: 8px;

    transition: border-color 100ms ease;
    border-radius: var(--textarea-radius);
    border-style: solid;
    border-color: #494949;
    border-width: 2px;

    padding: 8px;

    width: 100%;

    box-sizing: border-box;

    touch-action: manipulation;

    outline: none;
}

#ign-input {
    border-color: #5c5c5c;
}

#ign-input:focus {
    border-color: #2d6cc0;
}

hr {
    height: 2px;
    border-radius: 1px;
    border-style: none;
    background-color: #ffffff1e;
}

/* Custom Scrollbar */
/* width */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}
 
/* Track */
::-webkit-scrollbar-track {
    background: transparent;
}
  
/* Handle */
::-webkit-scrollbar-thumb {
    background: rgb(77, 77, 77);
    border-radius: 2px;
}
  
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
    background: #5c5c5c;
}