:root {
  --top-bar-height: 50px;
  --bg-color: #282c34;
}

html,
body {
  height: 100%;
  margin: 0;
  background-color: var(--bg-color);
  font-family: sans-serif;
}

svg {
  width: 100%;
  pointer-events: none;
}

[hidden] {
  display: none !important;
}

.sr-only {
  position: absolute;
  left: -99999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.notice-warning {
  position: relative;
  border: 1px solid #9a3412;
  border-left-width: 8px;
  padding: 0.5em;
  padding-right: 3em;
  color: white;
  margin-bottom: 0.5em;
}

.notice-close-button {
  color: inherit;
  text-decoration: none;
  font-weight: bold;
  position: absolute;
  top: -10px;
  right: 0;
  font-size: 1.5em;
  padding: 0.5em;
}

.top-bar {
  width: 100%;
  height: var(--top-bar-height);
  display: flex;
  padding: 0.2em;
  border-bottom: 2px solid rgba(0, 0, 0, 0.5);
  box-sizing: border-box;
  z-index: 1000;
  background-color: var(--bg-color);
}

.top-bar a,
.top-bar button {
  display: flex;
  align-items: center;
  border: 0;
  border-radius: 4px;
  border: 2px solid rgba(0, 0, 0, 0.5);
  margin-right: 0.5em;
  line-height: 1;
  background-color: #f0f0dc;
  color: inherit;
  text-decoration: none;
  padding: 0 1em;
  appearance: none;
  cursor: pointer;
  overflow: hidden;
}

.top-bar button#play {
  background-color: #d24040;
  color: #f0f0dc;
}

.top-bar button#stop {
  background-color: #736464;
  color: #101820;
}

.top-bar button#hide-editor.active {
  color: #606060;
}

.editor {
  display: flex;
  flex-flow: row wrap;
  height: calc(100% - var(--top-bar-height));
}

.editor > * {
  width: 100%;
  height: 100%;
  position: relative;
}

.editor .code {
  display: flex;
  flex-direction: column;
}

.code .cm-container {
  flex: 1;
  overflow: hidden;
}

.game {
  position: relative;
}

.game #frame-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
}

.game #frame {
  display: block;
  width: 100%;
  height: 100%;
}

.cm-editor .cm-scroller {
  /* margin-bottom: 3rem; */
}

.mobile-buttons {
  position: fixed;
  display: flex;
  gap: 0.25rem;
  background-color: #101820;
  top: 0;
  left: 0;
  right: 0;
  padding: 0.25em;
}

.mobile-buttons > button {
  display: flex;
  align-items: center;
  padding: 0.5em 1em;
  appearance: none;
  border: 1px solid #101820;
  background-color: #282c34;
  color: #fff;
}

.mobile-buttons svg {
  width: 1em;
}

@media screen and (min-width: 64em) {
  .editor > * {
    flex: 1;
  }

  .game {
    border-left: 2px solid rgba(0, 0, 0, 0.5);
  }
}
