html {
    background-color: rgb(231, 231, 231);
    font-family: sans-serif;
    padding: 1rem;
	overscroll-behavior: none; /* prevents pull-to-refresh */
}

.main-container {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.box p {
    margin-top: 1rem;
}

.title {
    padding: 2rem 0 1rem 0;
}

#canvas {
    position:fixed;
    padding:0;
    margin:0;

    top:0;
    left:0;

    width: 100%;
    height: 100%;
}

#on-canvas {
    position: fixed;
    top: 0;
    left: 0;

    -webkit-touch-callout: none; /* Safari */
    -webkit-user-select: none; /* Safari */
    -moz-user-select: none; /* Firefox */
    -ms-user-select: none; /* Internet Explorer/Edge */
    user-select: none; /* Nicht-Präfix-Version */
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

#feedback-symbol {
    position: absolute;
    cursor: pointer;
    scale: 1;
    transition: scale 0.5s ease-in-out;
    animation: pulse .3s;
    animation-delay: .5s;
}

#feedback-symbol:hover {
    scale: 1.1;
    transition: scale 0.2s ease-in-out;
    animation: none;
}

#feedback-symbol:active {
    scale: 1.15;
    transition: scale 0.2s ease-in-out;
    animation: none;
}

.particle {
    position: absolute;
    width: 5px;
    height: 5px;
    background-color: #2ea0af;
    border-radius: 50%;
    transform-origin: center;
    z-index: 4;
}

#formula-display {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    background: #35415f;
    color: white;
    width: 9rem;
}

#formula-display p {
    position: fixed;
    display: flex;
    align-items: center;
    padding: 5px;
    font-size: 1rem;
}

#speech-box {
    margin: -31.5px 5px 5px 40px; /* -31.5px trial and error */
    position: relative;
    min-width: 150px;
    max-width: 300px;
    padding: 10px 10px 1.5em;
    background-color: white;
    border: 2px solid #35415f;
    border-radius: 4px;
}

#speech-box.below {
    margin-top: 40px;
    margin-left: -60px;
    max-width: 200px;
}

#speech-box #speech-box-triangle {
    content: "";
    position: absolute;
    border-width: 10px;
    border-style: solid;
    top: 20px;
    left: -20px;
    border-color: transparent #35415f transparent transparent;
}

#speech-box.below #speech-box-triangle {
    top: -20px;
    left: auto;
    border-color: transparent transparent #35415f transparent;
}

#speech-box ol {
    padding-left: 1.5em;
}

#speech-box ol li {
    margin-bottom: 0.5em;
}

.hint-button {
    background: #fff2a9;
    border: 2px solid #35415f;
    border-radius: 3px;
    height: 3em;
    width: 3em;
    position: absolute;
    right: 10%;
    padding: 11px 12px;
    cursor: pointer;
    bottom: -1.5em;
}

.hint-button img {
    filter: opacity(0.6);
}

.hint-button:hover img {
    filter: opacity(0.8);
    transition: 0.3s;
}

.hint-button:active img {
    filter: opacity(1);
    transition: 0.3s;
}

#previous-hint-button {
    margin-right: 3.5em;
}

#previous-hint-button img {
    transform: rotate(180deg);
}

.right-buttons {
    position: absolute;
    right: 10px;
    left: 0;
    display: flex;
    justify-content: flex-end;
    pointer-events: none;
}

.right-buttons * {
    margin: 5px;
    border-radius: 5px;
    padding: 10px 20px;
    font-size: 16px;
    cursor: pointer;
    box-shadow: 0 2px 4px 0 rgba(0,0,0,0.2);
    transition: 0.1s;
    pointer-events: auto;
}

.right-buttons #label-input {
    width: 60vw;
    display: block;
}

.right-buttons #save-opener { /* circle */
    font-size: .6rem;
    padding: .3rem;
    height: 20px;
    width: 20px;
    border: 1px solid lightgray;
}

.right-buttons button {
    color: white;
}

.right-buttons #check-solution {
    background-color: #4CAF50;
    border: 2px solid #4CAF50;
}

.right-buttons #intermediate-check {
    background-color: #4CAF50;
    border: 2px solid #4CAF50;
}

.right-buttons #save {
    background-color: #35415f;
    border: 2px solid #35415f;
}

.right-buttons button:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
    transition: 0.3s;
}

.right-buttons button:active {
    background-color: #ffffff;
    transition: 0.1s;
}

.right-buttons #check-solution:active {
    background-color: #ffffff;
    color: #4CAF50;
    border: 2px solid #4CAF50;
}

.right-buttons #save:active {
    background-color: #ffffff;
    color: #35415f;
    border: 2px solid #35415f;
}

.right-buttons button:focus {
    outline: none;
}

.recognition-line {
    margin-top: -.7em;
    position: absolute;
    transform: translate(-50%, -100%);
    background-color: #ffffff;
    padding: 0.5em;
    border-radius: 4px;
    box-shadow: 0 0 4px 0 rgba(0,0,0,0.2);
}

/* fix for react-latex-next package, needs some research why this is necessary */
span.katex-html {
    display: none;
}