:root {
  --block-outset: 4px;
}

.reveal .slides > section {
  line-height: 1.3;
}

.reveal div:is(.definition, .example, .axiom, .theorem) {
  padding: 0.5em 1em;
  margin: auto;
  border: none;
  border-left: 5px solid var(--foreground-color);
  margin-left: -5px;
  margin-bottom: 0.5em;
  border-radius: 5px;
  box-sizing: border-box;
}

.reveal div.definition {
  border-color: var(--accent5);
  background-color: var(--accent5-bbg);
}

.reveal div.axiom {
  border-color: var(--accent0);
  background-color: var(--accent0-bbg);
}

.reveal div.theorem {
  border-color: var(--accent1);
  background-color: var(--accent1-bbg);
}

:is(.definition, .example, .axiom, .theorem) ol > li {
  padding-left: 0.5em;
}

:is(.definition, .example, .axiom, .theorem) ol > li::marker {
  font-weight: bold;
}

.reveal section.section h1,
.reveal section h1:only-child {
  text-wrap: balance;
}

.reveal section mjx-container[display="true"] {
  margin-top: 0.3em;
  margin-bottom: 0.3em;
}

/* .reveal :is(ul, ol, dl) li:last-child {
  margin-bottom: 0;
} */

.reveal :is(ul, ol, dl) {
  margin-bottom: 0;
}

#mafi-dialog {
  position: relative;
  color: var(--foreground-color);
  background-color: var(--base01);

  font-size: 1.5em;
  text-align: center;
  padding: 0.5em 1em;
  box-shadow: 4px 4px 6px 2px rgba(0, 0, 0, 0.5);
  border: 3px solid var(--greenish);
  border-radius: 0.5em;

  #mafi-input-container {
    position: relative;

    &:has(input:invalid)::after {
      content: "ungültige(s) Zeichen";
      font-size: 0.7em;
      font-style: italic;
      color: var(--redish);
      position: absolute;
      left: 50%;
      top: 100%;
      width: 100%;
      translate: -50% 0;
    }
  }

  & input {
    position: relative;
    color: var(--foreground-color);
    background-color: var(--base02);
    font-size: 1em;

    &::placeholder {
      font-size: 0.8em;
    }

    &:invalid {
      background-color: rgb(from var(--redish) r g b / 0.3);
      outline-color: var(--redish) !important;
    }
  }

  &::backdrop {
    background-color: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(6px);
  }

  #mafi-header {
    font-size: 1.1em;
    font-weight: bold;
    margin-bottom: 0.5em;
  }

  #mafi-question {
    line-height: 2;
  }

  #mafi-feedback {
    position: absolute;
    font-size: 3em;
    display: none;
    left: 50%;
    top: 50%;
    translate: -50% -50%;
    text-shadow: 3px 3px 6px rgba(0, 0, 0, 0.5);
  }

  #mafi-doc {
    font-size: 0.7em;
    margin-top: 1em;
    font-style: italic;
    & tt {
      font-style: normal;
      font-family: monospace;
    }
  }
}
