body {
  display: flex;
  flex-direction: column;
  overflow-y: hidden;
}

main {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 100dvh;

  > header {
    background-color: var(--light-beige);
  }
}

section {
  font-family: monospace;
  padding: 0 1rem;
}

#python-editor {
  background-color: var(--real-white);
  display: flex;
  min-height: 6rem;
  overflow: hidden;
  padding-top: 0.5rem;
  position: relative;
}

#line-numbers {
  color: var(--light-gray);
  font-size: inherit;
  line-height: inherit;
  min-width: 1rem;
  padding: 0.5rem 0;
  text-align: right;
  user-select: none;
  -webkit-user-select: none;
  white-space: pre;
  width: 1.2rem;
}

#editor-content {
  flex: 1;
  position: relative;
}

#plain-text {
  background: transparent;
  border: none;
  caret-color: var(--almost-black);
  color: transparent;
  font-family: monospace;
  font-size: inherit;
  height: 100%;
  left: 0;
  line-height: inherit;
  min-height: 6rem;
  padding: 0.5rem;
  position: absolute;
  resize: none;
  top: 0;
  white-space: pre;
  width: 100%;
  z-index: 2;
}

#syntax-highlight {
  font-family: monospace;
  font-size: inherit;
  line-height: inherit;
  min-height: 6rem;
  padding: 0.5rem;
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
  white-space: pre;
  z-index: 0;
}

#hint {
  background-color: var(--red);
  border-radius: 0.25rem;
  bottom: 0.5rem;
  color: var(--real-white);
  font-family: monospace;
  padding: 0.25rem 0.75rem;
  pointer-events: none;
  position: absolute;
  right: 1rem;
  z-index: 3;
}

#button-row {
  background-color: var(--python-blue);
  color: var(--light-gray);
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  justify-content: space-between;
  user-select: none;
}

#button-row-logo {
  color: var(--light-gray);
  font-size: 1.25rem;
  opacity: 0.5;
  padding: 0.5rem 0;

  svg {
    height: 1.5rem;
    width: 1.5rem;
  }
}

#buttons {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0.5rem 0;
}

#run-button, #stop-button, #clear-button {
  background-color: var(--python-yellow);
  color: var(--almost-black);
  gap: 0.5rem;
  justify-content: center;
  padding: 0 1rem;
  width: 7rem;

  svg {
    height: 1rem;
    width: 1rem;
  }
}

#home-button, #expand-button, #share-button {
  background-color: var(--light-gray);
  color: var(--almost-black);
  gap: 0.5rem;
  justify-content: center;
  opacity: 0.5;
  padding: 0 1rem;

  svg {
    height: 1rem;
    width: 1rem;
  }
}

#output {
  background-color: var(--almost-black);
  flex: 1;
}

#output-wrapper {
  overflow: hidden;
}

.hide-all-xterm-cursors {
  .xterm-cursor {
    display: none !important;
  }
}

.osprompt {
  color: var(--python-yellow);
  font-weight: bold;
}

.pythonerror {
  color: var(--red);
  font-weight: bold;
}

.xterm-viewport {
  background-color: var(--almost-black) !important;
  overflow-y: visible !important;
}

.xterm-screen {
  height: auto !important;
}

.xterm-rows {
  color: var(--real-white) !important;
  font-family: inherit !important;
  font-size: inherit !important;
  padding: 0.5rem 0;

  > div {
    height: 1.1rem !important;
    line-height: 1rem !important;
  }
}

.hljs-comment {
  color: var(--red);
}

#popover-content {
  border-radius: 0.5rem;
  box-shadow: 0 0 1rem var(--almost-black);
  left: 50%;
  padding: 1rem;
  position: fixed;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 20rem;

  div {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    text-align: center;
  }
}
