.reveal {
  --r-main-font-size: 36px;
  --r-heading1-size: 1.6em;
  --r-heading2-size: 1.4em;
  --r-heading3-size: 1.2em;
  --r-heading4-size: 1em;
}

/* .reveal .hljs {
  min-height: auto !important;
} */

.reveal .hljs.has-highlights tr:not(.highlight-line) {
  opacity: 0.3 !important;
}

.speakerNotes.current {
  background-color: #dedede;
}

.grid-three-rows {
  display: grid;
  grid-template-rows: auto auto 1fr;
  height: 100vh;
}

.grid-three-rows .third-row {
  overflow: auto;
}

* {
  outline: none;
}

.reveal .slides h1,
.reveal .slides h2,
.reveal .slides h3,
.reveal .slides h4,
.reveal .slides h5 {
  margin: 0px;
}

.reveal .slides h1,
.reveal .slides h2 {
  margin-bottom: 5px;
}

.reveal .hljs-ln-code {
  white-space-collapse: preserve;
  /* color: rgb(171, 178, 191); */
}

.reveal pre.XXSmallCode,
.reveal pre.XXSmallCode .hljs-ln-code {
  font-size: 0.4rem;
}

.reveal pre.XSmallCode,
.reveal pre.XSmallCode .hljs-ln-code {
  font-size: 0.45rem;
}

.reveal pre.smallCode,
.reveal pre.smallCode .hljs-ln-code {
  font-size: 0.5rem;
}

.reveal pre.normalCode,
.reveal pre.normalCode .hljs-ln-code {
  font-size: 0.55rem;
}

.reveal pre.largeCode,
.reveal pre.largeCode .hljs-ln-code {
  font-size: 0.6rem;
}

.reveal pre.XLargeCode,
.reveal pre.XLargeCode .hljs-ln-code {
  font-size: 0.65rem;
}

.reveal pre.XXLargeCode,
.reveal pre.XXLargeCode .hljs-ln-code {
  font-size: 0.75rem;
}

.reveal code {
  padding: 0.85rem;
  box-sizing: border-box;
}

.reveal img,
.reveal video,
.reveal iframe {
  max-width: inherit !important;
  max-height: inherit !important;
}

.reveal pre code {
  max-height: 100%;
}

*[data-layout="row"] {
  display: flex !important;
}

*[data-layout="column"] {
  display: flex !important;
  flex-direction: column !important;
}

*[data-full-screen="true"] {
  top: 0px !important;
  bottom: 0px !important;
  left: 0px !important;
  right: 0px !important;
}

html {
  font-size: 40px;
}

font[size="1"] {
  font-size: 0.5em;
}

font[size="2"] {
  font-size: 0.65em;
}

font[size="3"] {
  font-size: 0.8em;
}

font[size="4"] {
  font-size: 1em;
}

font[size="5"] {
  font-size: 1.25em;
}

font[size="6"] {
  font-size: 1.5em;
}

font[size="7"] {
  font-size: 1.75em;
}

ul,
ol {
  margin-left: 0px !important;
}

pre.allow-execute::before {
  position: absolute;
  top: 1px;
  content: "▶︎ Run";
  display: block;
  cursor: pointer;
  right: 1px;
  font-weight: 400;
  font-size: 1.5em;
  background: #333;
  color: white;
  padding: 8px;
  border-bottom-left-radius: 8px;
}

.html2canvas code,
.html2canvas pre {
  box-shadow: none !important;
}

pre.allow-execute::before:hover {
  background-color: salmon;
}

.section-full-screen {
  top: 0px !important;
  bottom: 0px !important;
  left: 0px !important;
  right: 0px !important;
}

.flex,
.section-flex {
  display: flex !important;
}

.flex.vertical,
.section-flex.vertical {
  flex-direction: column;
}

.bullets {
  flex: 1;
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 40px;
}

.bullets ul,
.bullets ol {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bullets ul {
  list-style-type: square;
}

.bullets.bg li {
  background: white;
  padding: 12px;
  border-radius: 16px;
  opacity: 0.9 !important;
}

.w-70 {
  width: 70%;
}
.w-60 {
  width: 60%;
}
.w-50 {
  width: 50%;
}
.w-40 {
  width: 40%;
}

.f-40 {
  font-size: 0.4rem;
}
.f-50 {
  font-size: 0.5rem;
}
.f-60 {
  font-size: 0.6rem;
}
.f-70 {
  font-size: 0.7rem;
}
.f-80 {
  font-size: 0.8rem;
}
.f-90 {
  font-size: 0.9rem;
}

/* .elementSelected {
  outline: dashed 4px #004c72 !important;
  outline-offset: -2px;
} */

/* .elementHover {
  outline: dashed 4px darkgray !important;
  outline-offset: -2px;
} */

.elementSelected.text-block {
  outline: dashed 4px lightgray;
  outline-offset: -2px;
}

.h-stack {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 8px;
}

.v-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 8px;
}

.slide-editor {
  .v-stack,
  .h-stack {
    /* outline: dashed 4px lightgray; */
  }
}

/****** MANIPULATORS **********/

.no-select {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.manipulator {
  position: absolute;
  border: 1px dashed black;
  pointer-events: none;
}

.handle {
  width: 10px;
  height: 10px;
  border: black 5px solid;
  background-color: white;
  position: absolute;
  pointer-events: auto;
  z-index: 1000000;
}

.top-left {
  top: -10px;
  left: -10px;
  cursor: nwse-resize;
}

.top-right {
  top: -10px;
  right: -10px;
  cursor: nesw-resize;
}

.bottom-left {
  bottom: -10px;
  left: -10px;
  cursor: nesw-resize;
}

.bottom-right {
  bottom: -10px;
  right: -10px;
  cursor: nwse-resize;
}

.rotate {
  top: 50%;
  left: -10px;
  transform: translateY(-50%);
  cursor: grab;
  background-color: red;
}

.handle.move {
  cursor: move;
  background: transparent;
  border: 0px;
}

.handle.move.grab {
  bottom: -10px;
  left: 40px;
  cursor: grab;
  background-color: green;
  width: 20px;
  height: 20px;
}

.handle.move.top {
  left: 14px;
  right: 14px;
  top: -3px;
  height: 5px !important;
  width: unset;
}

.boundary {
  z-index: 1000000;
}

.handle.move.right {
  right: -3px;
  top: 14px;
  bottom: 14px;
  width: 5px !important;
  height: unset;
}

.handle.move.bottom {
  left: 14px;
  right: 14px;
  bottom: -3px;
  height: 5px;
  width: unset;
}

.handle.move.left {
  left: -3px;
  bottom: 14px;
  top: 14px;
  width: 5px;
  height: unset;
}

.reveal img,
figure img {
  width: 100%;
  margin: 0px !important;
  max-width: 100% !important;
  max-height: 100% !important;
  margin: 0px !important;
}

figure {
  margin: 0px;
  padding: 0px;
}

figcaption {
  font-size: 0.5rem;
  background-color: rgba(200, 200, 200, 0.2);
  border-radius: 0px 0px 8px 8px;
  margin-top: -9px;
  padding: 4px 16px;
}

.hide-lines .hljs.has-highlights tr:not(.highlight-line) {
  display: none;
}

.triframe {
  transition: all 0.5s;
  flex-shrink: 0;
  pointer-events: auto;
  flex: 1 0 0%;
  height: calc(100% - 4px);
  border: solid 2px rgb(40, 44, 52);
  /* border-left: none; */
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
  background: url("/images/pie.webp") center center !important;
  background-size: auto 100% !important;
}

.triframe.iframeExecuted {
  background: white !important;
}

.triframecontainer {
  display: flex;
  flex-direction: column;
  position: relative;
  height: 100%;
  width: 100%;
  overflow: hidden;
  border: solid 2px rgb(40, 44, 52);
  border-top-right-radius: 16px;
  border-bottom-right-radius: 16px;
  box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
  background-color: #333;
  font-size: 20px;
}

.triconsole {
  text-align: left;
  max-height: 50%;
  overflow: auto;
}

.triframecontainer .triframe {
  flex: 1;
  height: unset;
  border: 0;
  border-radius: 0;
  border-top-right-radius: 16px;
  box-shadow: none;
}

.tricodewindow {
  display: grid;
  grid-template-columns: 2fr 1fr;
  grid-template-rows: auto 1fr;
  flex-direction: column;
  position: absolute;
  pointer-events: auto;
  margin: 0px;
  gap: 2px;

  div[data-role="toolbar"] {
    grid-row: 1;
    grid-column: span 2;
    margin-left: auto;
  }

  pre {
    margin: 0px !important;
    grid-row: 2;
    grid-column: 1;
    width: 100%;
    border-top-left-radius: 16px;
    border-bottom-left-radius: 16px;
    overflow: hidden;
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);

    /* code {
      height: calc(100% - 2em) !important;
      min-height: calc(100% - 2em) !important;
    } */
  }

  iframe {
    box-shadow: 0px 0px 8px rgba(0, 0, 0, 0.2);
    grid-row: 2;
    grid-column: 2;
    width: 100%;
  }
}

.tricodeeditor {
  position: fixed;
  display: flex;
  flex-direction: column;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  padding: 8px;
}

.tricodeeditortoolbar {
  display: flex;
  justify-content: flex-end;
  padding: 2px;
  background-color: rgba(0, 0, 0, 0.5);
  border-bottom: solid 2px rgb(40, 44, 52);
}

#tricodeedditorframe {
  width: calc(100vw - 16px);
  height: calc(100vh - 16px);
  border: none;
  flex: 1;
}

.reveal ul li li {
  font-size: 0.85em;
  line-height: calc(0.85em + 16px);
}

.slide-header {
  display: flex;
  align-items: center;
  flex-direction: row;
  gap: 8px;
  margin-top: 16px;
}

.slide-header > h2,
.slide-header > h3,
.slide-header > h4,
.slide-header > h5 {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slide-header.vertical {
  flex-direction: column;
  gap: 2px;
  margin-bottom: 8px;
}
