/* Original contents is available on https://github.com/syumai/go-playground-custom */

/***
 * yjs collaborative editing
 * based on https://github.com/yjs/y-codemirror/blob/v3.0.1/demo/index.html
 */

 .remote-caret {
  position: relative;
  border-left: 2px solid black;
  margin-left: -1px;
  margin-right: -1px;
  box-sizing: border-box;
}
.remote-caret > div {
  white-space: nowrap;
  position: absolute;
  top: -1.05em;
  left: -2px;
  font-size: .8em;
  background-color: rgb(250, 129, 0);
  font-family: Menlo, monospace;
  font-style: normal;
  font-weight: normal;
  line-height: normal;
  user-select: none;
  color: white;
  padding-left: 3px;
  padding-right: 3px;
  z-index: 3;
  transition: opacity .3s ease-in-out;
}
.remote-caret.hide-name > div {
  transition-delay: .7s;
  opacity: 0;
}
.remote-caret:hover > div {
  opacity: 1;
  transition-delay: 0s;
}

/***
 * CodeMirror customization
 */

.CodeMirror {
  border: 0.0625rem solid #c0c2c3;
  background-color: #ffd;
  font-size: 11pt;
  font-family: Menlo, monospace;
  height: calc(100% - 300px);
  width: 100%;
  min-height: 300px;
}

.CodeMirror-gutters {
  background: inherit;
}

span.other-client {
  height: 11pt !important;
  margin: inherit !important;
  display: inherit !important;
}

/***
 * Application configs
 */

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial,
    sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
}

header,
main,
footer {
  width: 100%;
}

header {
  height: 56px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background-color: #007d9c;
  color: #fff;
}

a:hover {
  opacity: 0.8;
}

@media screen and (max-width: 740px) {
  header {
    height: 70px;
  }
}

header .title {
  margin-left: 16px;
  font-size: 1.5rem;
  font-weight: bold;
}

header .header-content {
  display: flex;
  align-items: center;
  margin-right: 16px;
}

header .button-container {
  margin-left: 16px;
  display: flex;
}

header a {
  color: #fff;
}

select {
  margin-right: 9px;
  border-radius: 0.1875rem;
}

button {
  padding: 3px 8px;
  margin-right: 9px;
  border-radius: 0.1875rem;
  box-shadow: 0 2px 5px rgb(0 0 0 / 20%);
  box-sizing: border-box;
  border: none;
  background-color: #f7f9fa;
  color: #007d9c;
  font: bold 0.875rem Roboto, sans-serif;
}

button.primary {
  padding: 3px 14px;
  border: 0.0625rem solid #00add8;
  background-color: #ffffdd;
}

header .link-to-github {
  margin-left: 9px;
}

main {
  width: 100%;
  height: calc(100vh - 52px);
}

@media screen and (max-width: 740px) {
  main {
    height: calc(100vh - 70px);
  }
}

.code-body {
  display: none;
}

.result,
.options {
  width: calc(100% - 16px);
  height: calc(300px - 16px);
  padding: 8px;
}

.result.hidden,
.options.hidden {
  display: none;
}

.result {
  font-size: 0.9rem;
  white-space: pre;
  font-family: Menlo, monospace;
}

.result .line {
  width: 100%;
}

.result .line.stdout {
  color: #000;
}

.result .line.stderr {
  color: #c33;
}

.result .line.system {
  color: #999;
}

.options {
  background-color: #f0f0f0;
}
