#status {
  border-radius: 4px;
  height: 8px;
  left: -12px;
  position: absolute;
  width: 8px;
}

.status-success {
  background-color: var(--fgColor-success);
}

.status-attention {
  background-color: var(--fgColor-attention);
}

.status-danger {
  background-color: var(--fgColor-danger);
}

#editor {
  display: flex;
  height: calc(80% - 8px);
}

#codemirror {
  background-color: var(--bgColor-default);
  border: 1px solid var(--borderColor-default);
  margin: 0;
  width: calc(50% - 8px);
}

#textarea {
  background-color: var(--bgColor-default);
  border: 1px solid var(--borderColor-default);
  border-radius: 0;
  color: inherit;
  font-family:
    ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono",
    monospace;
  font-size: 14px;
  height: 100%;
  line-height: inherit;
  padding: 16px;
  resize: none;
  width: 100%;
}

#textarea::placeholder {
  color: var(--fgColor-muted);
}

#textarea:focus {
  outline: 2px solid var(--focus-outlineColor);
  outline-offset: -1px;
}

.gutter {
  align-items: center;
  color: var(--borderColor-default);
  display: flex;
  justify-content: center;
}

.gutter.gutter-horizontal {
  cursor: col-resize;
}

.gutter.gutter-vertical {
  cursor: row-resize;
}

.gutter + #markdown {
  margin-left: 0;
}

.gutter + #file-drop {
  margin-top: 0;
}

#markdown {
  margin-left: 16px;
  width: calc(50% - 8px);
}

#file-drop {
  background-color: var(--bgColor-default);
  border: 1px solid var(--borderColor-default);
  height: calc(20% - 8px);
  margin-top: 16px;
  overflow: auto;
  padding: 16px;
  position: relative;
}

#file-drop.files-drag-enter {
  border-color: var(--fgColor-accent);
}

#files {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin-top: 16px;
}

.file {
  align-items: center;
  background-color: var(--bgColor-neutral-muted);
  border-radius: 6px;
  display: flex;
  padding-left: 8px;
  padding-right: 6px;
}

.file > button {
  align-items: center;
  background-color: transparent;
  border: none;
  color: inherit;
  cursor: pointer;
  display: flex;
  font-size: 18px;
  height: 32px;
  justify-content: center;
  margin-left: 8px;
  padding: 0;
}

.file > button:hover {
  color: var(--fgColor-accent);
}

#files-loader {
  bottom: 0;
  display: none;
  justify-content: center;
  left: 0;
  padding-top: 16px;
  position: absolute;
  right: 0;
  top: 0;
}

#loader {
  display: flex;
}

@media screen and (max-width: 768px) {
  #editor {
    flex-direction: column;
  }

  #codemirror {
    height: calc(50% - 8px);
    width: auto;
  }

  .gutter + #markdown {
    margin-top: 0;
  }

  #markdown {
    height: calc(50% - 8px);
    margin-left: 0;
    margin-top: 16px;
    width: auto;
  }
}

@supports (-webkit-touch-callout: none) {
  #textarea {
    font-size: 16px;
  }

  @media (min-width: 768px) {
    #textarea {
      font-size: 14px;
    }
  }
}
