body {
    height: 100vh;
    margin: 0px;
}

dialog {
    width: 40%;
    padding: 0px;
}

h3 {
    text-align: center;
}

#login-body, #signup-body {
    margin: 4px;
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.form-group {
    width: 90%;
    margin-bottom: 15px;
}

.form-group>input {
    /* 100%-10px is about 2*(3px of padding, 1.5 of border from default input)
       the 10px should be adjusted if border gets adjusted */
    width: calc(100% - 10px);
    padding: 3px;
    margin: 2px 0 0 0;
}

.form-button-group {
    display: flex;
    justify-content: space-evenly;
}

.form-button-group>button {
    width: 30%;
}

.auth-validation {
    font-family: arial;
    font-size: 10px;
    color: red;
    display: inline-block; /* required for animation */
}

.error-shake {
    animation: shake 0.35s ease-in-out;
}

@keyframes shake {
    0%   { transform: translateX(0); }
    15%, 45%, 75%  { transform: translateX(-4px); }
    30%, 60%  { transform: translateX(4px); }
    90%  { transform: translateX(-2px); }
    100% { transform: translateX(0); }
}

#dialogBackgrounds {
    z-index: 10; /* must be higher than codemirror's z-indexes of 6 */
    position: fixed;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;

    opacity: 0;
    background: rgba(0, 0, 0, 0);
 

    transition:
	opacity 300ms ease,
	background 300ms ease;
}

#dialogBackgrounds.open {
    opacity: 1;
    background: rgba(0, 0, 0, 0.4);
}

#profileDropdown {
    /* fallback if browser doesn't support position anchor */
    position: absolute;
    top: 35px;
    left: 10px;

    /* if browser does support position anchor, these apply */
    position-anchor: --profile_button;
    top: anchor(--profile_button bottom);
    left: anchor(--profile_button left);

    margin: 0;
    padding: 0;
}

#profileDropdown>ul {
    padding: 5px 0;
    list-style: none;
    min-width: 160px;
    margin: 0;
}

#profileDropdown>ul>li {
    padding-top: 2px;
    padding-left: 6px;
}

#profileDropdown>ul>li:hover {
    cursor: pointer;
    background-color: #ccc;
}

#signup-to-login, #login-to-signup {
    cursor: pointer;
    text-decoration: underline;
    color: #0645ad;
}

.rotate {
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    -o-transform: rotate(90deg);
    transform: rotate(90deg);
    display: inline-block;
}

#header {
    height: 40px;
    display: flex;
    flex-flow: row nowrap;
    justify-content: space-between;
    align-items: center;
    background-color: #5F48B5;
    padding-left: 8px;
    padding-right: 8px;
}

button {
    margin: 2px;
}

#mainContainer {
    display: flex;
    justify-content: space-around;
    gap: 0px;
    height: calc(100% - 40px);
}

#terminal {
    flex: 30;
}

#code {
    flex: 30;
    border-right: 2px solid #264649;
}

#graphicsContainer {
    flex: 30;
    border-left: 2px solid #eec037;
}

#codeBar, #terminalBar, #graphicsBar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-left: 4px;
    font-family: arial;
    height: 20px;
}

#codeBar, #collapsedCode {
    background-color: #264649;
    color: white;
}

#terminalBar, #collapsedTerminal {
    background-color: #a0e3dc;
    color: black;
}

#graphicsBar, #collapsedGraphics {
    background-color: #eec037;
}

#graphics {
    height: calc(100% - 20px);
}

#collapsedCode, #collapsedTerminal, #collapsedGraphics {
    display: flex;
    flex: 0.4;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    width: 25px;
    cursor: pointer;
    font-family: arial;
}

#codeLabel, #terminalLabel {
    margin-right: 8px;
}

.minimize {
    width: 16px;
    height: 16px;
    cursor: pointer;
    margin-right: 4px;
}

#editor {
    width: 100%;
    height: calc(100% - 20px);
}

#terminal {
    overflow-y: auto;
}

.terminal-light-theme {
    background-color: #ffffff;
    color: #000000;
}

.terminal-dark-theme {
    background-color: #000000;
    color: #00ff00;
}

#output {
    white-space: pre-wrap;
    font-family: monospace;
    padding: 10px;
}

.line {
    display: flex;
    align-items: center;
}

#repl-input {
    flex: 1;
    min-width: 0;
    font-family: monospace;
    background: #0000ff33;
    color: inherit;
    border: none;
    outline: none;
    padding: 0px;
}

.flexbox-item {
    height: 100%;
    width: 30%;
}

.userInput {
    color: blue;
}

.outputError {
    color: red;
}
