@font-face {
    font-family: "New Computer Modern";
    src: url("./fonts/NewCM08-Regular.woff2") format("woff2");
    font-weight: normal;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "New Computer Modern";
    src: url("./fonts/NewCM08-Italic.woff2") format("woff2");
    font-weight: normal;
    font-style: italic;
    font-display: swap;
}

@font-face {
    font-family: "New Computer Modern";
    src: url("./fonts/NewCM10-Bold.woff2") format("woff2");
    font-weight: bold;
    font-style: normal;
    font-display: swap;
}

._guimath_flexbox_row {
    display: flex;
    flex-flow: row nowrap !important;
    align-items: center;
    justify-content: center;
}

._guimath_flexbox_column {
    display: flex;
    flex-flow: column nowrap !important;
    align-items: center;
    justify-content: center;
}

._guimath_editor_window {
    --default-font: "New Computer Modern", Helvetica, sans-serif;
    --background-color: rgb(248, 248, 248);
    --background-dark-1: rgb(220, 220, 220);
    --background-dark-2: rgb(199, 199, 199);
    --default-font-color: black;
    --muted-font-color: rgb(80, 80, 80);
    --default-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    --inactive-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    --success-green: rgb(3, 107, 35);
    --error-red: rgb(107, 0, 18);
    font-family: var(--default-font);
}
._guimath_editor_window math {
    font-family: var(--default-font);
}
._guimath_editor_window._guimath_dark_theme {
    --background-color: rgb(42, 42, 42);
    --background-dark-1: rgb(18, 18, 18);
    --background-dark-2: rgb(0, 0, 0);
    --default-font-color: white;
    --default-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    --success-green: rgb(55, 255, 115);
    --error-red: rgb(255, 13, 53);
}
._guimath_editor_window._guimath_grey_theme {
    --background-color: rgb(215, 214, 214);
    --background-dark-1: rgb(185, 185, 185);
    --background-dark-2: rgb(133, 133, 133);
    --default-font-color: black;
    --default-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    --success-green: rgb(3, 107, 35);
    --error-red: rgb(107, 0, 18);
}
._guimath_editor_window._guimath_dark_blue_theme {
    --background-color: rgb(38, 50, 56);
    --background-dark-1: rgb(26, 35, 39);
    --background-dark-2: rgb(19, 24, 26);
    --default-font-color: white;
    --default-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    --success-green: rgb(55, 255, 115);
    --error-red: rgb(255, 13, 53);
}
._guimath_editor_window._guimath_light_blue_theme {
    --background-color: rgb(242, 250, 255);
    --background-dark-1: rgb(195, 209, 215);
    --background-dark-2: rgb(131, 142, 147);
    --default-font-color: black;
    --default-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    --success-green: rgb(3, 107, 35);
    --error-red: rgb(107, 0, 18);
}
._guimath_editor_window._guimath_dark_pink_theme {
    --background-color: rgb(35, 0, 30);
    --background-dark-1: rgb(34, 18, 30);
    --background-dark-2: rgb(19, 6, 17);
    --default-font-color: white;
    --default-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    --success-green: rgb(55, 255, 115);
    --error-red: rgb(255, 13, 53);
}
._guimath_editor_window._guimath_light_pink_theme {
    --background-color: rgb(245, 235, 238);
    --background-dark-1: rgb(213, 195, 199);
    --background-dark-2: rgb(134, 120, 123);
    --default-font-color: black;
    --default-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    --success-green: rgb(3, 107, 35);
    --error-red: rgb(107, 0, 18);
}

._guimath_editor_window {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--default-font-color);
    background-color: var(--background-color);
    border-radius: 1em;
    box-shadow: var(--default-shadow);
    padding: 20px;
    min-width: 280px;
    width: min(600px, 80%);
}

._guimath_editor_window[data-focused="false"] {
    box-shadow: var(--inactive-shadow);
}

._guimath_editor_window svg {
    stroke: var(--default-font-color);
}

._guimath_editor_window button {
    background-color: var(--background-color);
    transition: background-color ease 0.2s;
    color: var(--default-font-color);
}

._guimath_editor_window button:hover {
    background-color: var(--background-dark-1);
}

._guimath_tab_container_container {
    display: flex;
    flex-flow: row wrap;
    font-family: var(--default-font);
    margin-top: 10px;
    padding: 0 4px;
}

._guimath_save_equation svg {
    stroke: var(--success-green);
}

._guimath_clear_equation svg {
    stroke: var(--error-red);
}

._guimath_tab_container {
    padding: 7px 7px 10px 7px;
    font-size: 1.2rem;
    min-width: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1em;
    background-color: var(--background-color);
    transition: background-color ease 0.15s;
    cursor: pointer;
    user-select: none;
    margin: 0 6px;
    border-radius: 6px 6px 0 0;
}

._guimath_tab_container._guimath_active_tab {
    background-color: var(--background-dark-1);
}

._guimath_tab_container:hover {
    background-color: var(--background-dark-1);
}

._guimath_editor_controls {
    display: flex;
    flex-flow: row wrap;
    justify-content: space-between;
}

#_guimath_equation_display {
    padding: 20px 10px;
    margin: 10px;
    border: 1px solid var(--default-font-color);
    border-radius: 10px;
    overflow-x: auto;
    display: flex;
    flex-flow: row nowrap;
    max-width: 100%;
    align-items: center;
    justify-content: center;
}

._guimath_grid {
    display: grid;
    width: 100%;
}

._guimath_tab {
    padding: 0 10px 10px;
    display: none;
    flex-flow: row nowrap;
    overflow-x: auto;
    min-height: 7em;
    align-items: start;
}

._guimath_tab ._guimath_btn {
    background-color: var(--background-color);
    transition: background-color ease 0.15s;
    cursor: pointer;
    margin: 2px;
    min-width: 25px;
    text-align: center;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3px;
    border-radius: 5px;
    font-size: 1.1rem;
}

._guimath_btn:hover {
    background-color: var(--background-dark-1);
}

._guimath_clear_save_buttons, ._guimath_button_container {
    display: flex;
    flex-flow: row wrap;
    font-family: monospace;
    font-size: 1.1rem;
    align-items: center;
    justify-content: center;
}

._guimath_button_container {
    margin: 0 5px;
    background-color: var(--background-color);
    border-radius: 6px;
    transition: background-color ease 0.15s;
    cursor: pointer;
    padding: 5px;
}

._guimath_button_container:hover  {
    background-color: var(--background-dark-1);
}

._guimath_dir_btn {
    margin: 0 5px;
    border: 1px solid transparent;
    border-radius: 3px;
}

._guimath_equation_input {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
}

._guimath_equation_input_preview {
    margin-left: 10px;
}

@keyframes _guimath_blink {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}
._guimath_cursor {
    width: 2px;
    height: 1.2em;
    animation: _guimath_blink 1s steps(1) infinite;
    animation-play-state: paused;
}

._guimath_editor_window[data-focused="true"] ._guimath_cursor {
    animation-play-state: running;
    background-color: var(--default-font-color);
}

._guimath_editor_window[data-focused="false"] ._guimath_cursor {
    animation-play-state: paused;
    background-color: var(--background-dark-2);
}

._guimath_component, ._guimath_block {
    display: flex;
    flex-flow: row nowrap;
    align-items: center;
    justify-content: center;
}

._guimath_text {
    font-style: italic;
    font-size: 1.2em;
}

._guimath_straight_text {
    font-style: normal !important;
    font-size: 1.2em;
}

._guimath_block {
    min-height: 10px;
    min-width: 10px;
    line-height: 0.8;
    font-size: 1em;
    font-style: italic;
    position: relative;
    white-space: pre;
}

._guimath_block::before {
    content: "";
    position: absolute;
    top: 3px;
    bottom: -1px;
    left: -2px;
    right: -2px;
    border: 2px solid transparent;
    border-radius: 2px;
    transition: border-color ease 0.2s;
}

._guimath_text ._guimath_block::before {
    content: none;
}

._guimath_block:hover::before,
._guimath_active_block::before {
    border-color: var(--muted-font-color);
}

._guimath_small_block ._guimath_block,
._guimath_small_block ._guimath_text,
._guimath_small_block ._guimath_straight_text {
    font-size: 0.8em;
}

._guimath_small_block {
    z-index: 2;
}

._guimath_large_block {
    padding-top: 3px;
    margin-right: 5px;
    margin-left: 5px;
    padding-bottom: 3px;
    font-size: 2.5em;
    font-style: normal;
    z-index: 1;
}

._guimath_accent_block {
    padding: 0;
    line-height: 0.5;
}