*,
*::before,
*::after {
  box-sizing: inherit;
}

html {
  box-sizing: border-box;
}

body,
html {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
}

body {
  /* width: 100vw; */
  /* height: 100vh; */
  display: flex;
  flex-direction: column;
  overflow: hidden;

  &.rotated {
    flex-direction: row-reverse;
  }
}

body.rotated {
  .output {
    flex: 0 0 75%;
  }

  .editor {
    flex: 0 0 25%;
  }
}

.output {
  border: 1px solid red;
  flex: 0 0 80%;
  /* overflow: auto; */

  #output-frame {
    width: 100%;
    height: 100%;
  }
}

.editor {
  flex: 0 0 20%;
  position: relative;

  #editor-input,
  #editor-pretty {
    position: absolute;
    inset: 0;
    font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
    font-weight: normal;
    font-size: 14px;
    white-space: pre;
    tab-size: 2;
    overflow: auto;
    border: 0;

    margin: 0;
    padding: 8px;
  }

  #editor-input {
    resize: none;
    color: transparent;
    background: none;
    caret-color: #a9b1d6;
  }

  #editor-pretty {
    background-color: #1a1b26;
    color: #a9b1d6;

    .hl-identifier {
      color: #e0af68;
    }

    .hl-string {
      color: #9ece6a;
    }

    .hl-sigil {
      color: #bb9af7;
    }

    .hl-class {
      color: #7dcfff;
    }

    .hl-orientation {
      color: #565f89;
    }

    .hl-error {
      background-color: rgba(247, 118, 142, 0.25);
      text-decoration: wavy underline #f7768e;
      text-decoration-skip-ink: none;
    }
  }
}

#editor-tooltip {
  font-family: ui-monospace, 'Cascadia Code', 'Source Code Pro', Menlo, Consolas, 'DejaVu Sans Mono', monospace;
  font-weight: normal;
  font-size: 14px;

  position: fixed;
  display: none;
  background: #24283b;
  color: #a9b1d6;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: pre;
  z-index: 1000;
  pointer-events: none;
  /* max-width: 200px; */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

#rotate {
  position: fixed;
  right: 0;
  bottom: 0;
  font-size: 2em;
  cursor: pointer;
}
