:root {
  --primary-color: #e3e3e3;
  --secondary-color: #fefefe;
  --primary-accent-color: #7395ae;
  --secondary-accent-color: #557a95;
  --accent-color-hover: #6488a2;
  --off-color: #b0a295;
}

body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  background-color: var(--primary-color);
  user-select: none;
  padding: 0;
}

.wrapper {
  width: 100%;
  border-radius: 6px;
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 24%);
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  background-color: var(--primary-accent-color);
  color: var(--secondary-color);
  border-radius: 6px 6px 0 0;
  overflow: hidden;
}

.tabs .tab {
  padding: 1rem;
  cursor: pointer;
}

.tabs .tab.active {
  background-color: var(--secondary-accent-color);
}

.tab:hover {
  background-color: var(--accent-color-hover);
}

#form-wrapper {
  background-color: var(--secondary-color);
  box-shadow: 0 1px 3px rgb(0 0 0 / 12%), 0 1px 2px rgb(0 0 0 / 24%);
  border-radius: 0 0 6px 6px;
  overflow: hidden;
}

#submit-wrapper, #submit, .login .submit {
  background-color: var(--primary-accent-color);
  color: var(--secondary-color);
  border-radius: 6px 6px 0 0;
  border: none;
  padding: 0.5rem;
  cursor: pointer;
  font-weight: bold;
}

footer {
  padding-top: 1rem;
}

footer .matrikel-nb {
  font-weight: bold;
  display: flex;
  justify-content: flex-end;
  padding-right: 2rem;
}

footer .controls {
  display: flex;
  justify-content: space-between;
}

#previous,
#next {
  background-color: var(--primary-accent-color);
  color: var(--secondary-color);
  width: 50px;
  height: 50px;
  display: flex;
  justify-content: center;
  text-align: center;
  font-size: 30px;
  line-height: 50px;
  cursor: pointer;
}

#previous {
  border-radius: 0 6px 0 0;
}

#next {
  border-radius: 6px 0 0 0;
}

.questions {
  padding: 2rem 2rem 0 2rem;
}

.question {
  display: none;
  justify-content: space-between;
}

.question .question-inner {
  display: flex;
  flex-direction: column;
  min-height: 500px;
  flex-basis: 60%;
}

.question .question-header {
  font-size: 32px;
  line-height: 20px;
}

.question .points {
  color: #928f8f;
  margin-bottom: 1rem;
}

.question label {
  margin-bottom: 0.5rem;
}

.question .image-wrapper {
  margin-left: 5%;
  display: flex;
  align-items: center;
}

.question .programming-skill-wrapper {
  position: relative;
  height: 100%;
  width: 100%;
}

.question .CodeMirror {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
}

#toasts-container {
  position: fixed;
  top: 1rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.toast {
  position: relative;
  padding: 0.5rem;
  border-radius: 0.5rem;
  margin-bottom: 0.5rem;
  animation: toast-in 0.5s cubic-bezier(0, 0.79, 0.21, 1.08);
  color: var(--secondary-color);
}

.toast.successful {
  background-color: #529b52;
}

.toast.failed {
  background-color: #ff6961;
}

@keyframes toast-in {
  from {
    transform: translateY(-100px);
  }
  to {
    transform: translateY(0);
  }
}

#submit-wrapper.disabled {
  cursor: wait;
}

#submit-wrapper.disabled #submit {
  pointer-events: none;
}

@media print {
  * {
    display: none;
  }
}

@media only screen and (max-width: 800px) {
  html {
    height: 100%;
  }

  body {
    height: calc(100% - 6em);
    display: flex;
    flex-direction: column;
  }

  #form-wrapper, #question-form, .questions {
    display: flex;
    flex: 1;
  }

  #form-wrapper {
    overflow: initial;
  }

  #question-form {
    flex-direction: column;
  }

  .question {
    flex: 1;
  }
}

.login-failed {
  color: red;
  font-weight: bold;
}

.login {
  width: initial;
  align-self: center;
  background-color: var(--secondary-color);
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 500px;
  border-radius: 6px;
}

.login img {
  border-radius: 6px 6px 0 0;
}

.login div {
  margin: auto;
  transform: translateY(-25%);
}

.login .submit {
  border-radius: 6px;
  width: 145px;
}

.login .submit:hover {
  background-color: var(--accent-color-hover);
}
