* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  background: #fdfdfd;
  color: #111;
  font: 300 16px/1.4 sans-serif;
}

body {
  display: flex;
  height: 100vh;
  overflow: hidden;
  width: 100vw;
}

html,
body,
h1,
h2,
h3,
h4,
h5,
h6,
p,
ul,
ol,
dl {
  margin: 0;
  padding: 0;
}

h1 {
  font-size: 2.2rem;
}
h2 {
  font-size: 1.7rem;
}
h3 {
  font-size: 1.4rem;
}
h4 {
  font-size: 1.1rem;
}
h5 {
  font-size: 0.9rem;
}
h6 {
  font-size: 0.7rem;
  text-transform: uppercase;
}

ul,
ol,
dl {
  list-style: none;
}

input,
button,
select {
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
}

button,
input[type="button"],
input[type="submit"] {
  cursor: pointer;
}

button[disabled],
input[type="button"][disabled],
input[type="submit"][disabled] {
  cursor: default;
}

textarea {
  font: 300 0.8rem/1.4 Menlo, Consolas, monospace;
}

.file_browser {
  background: #ddd;
  display: flex;
  flex-direction: column;
  max-width: 30%;
  min-width: 15rem;
  overflow-x: visible;
  overflow-y: auto;
  padding: 1rem;
  position: relative;
  z-index: 100;
}

.file_browser-folders {
  flex: 1 0 auto;
  margin-bottom: 2em;
}

.file_browser-folder {
  background: rgba(0, 0, 0, 0.05);
  padding-bottom: 0.1px;
  margin-top: 1rem;
  position: relative;
}

.file_browser-folder:hover {
  z-index: 10;
}

.file_browser-folder--collapsed > .file_browser-folder_content {
  display: none;
}

.file_browser-folder .file_browser-folder {
  margin: 0.6rem;
}

.file_browser-folder_name {
  background: rgb(149, 197, 183);
  border: 0 none;
  color: inherit;
  display: block;
  font: inherit;
  outline: none;
  overflow: hidden;
  padding: 0.3rem 0.6rem;
  text-align: left;
  text-overflow: ellipsis;
  white-space: nowrap;
  width: 100%;
}

.file_browser-folder_name::before {
  content: "\25be";
  display: inline-block;
  width: 1rem;
}

.file_browser-folder--collapsed > .file_browser-folder_name::before {
  content: "\25b8";
}

.file_browser-folder_name:hover,
.file_browser-folder_name:focus {
  background-color: rgb(183, 224, 212);
}

.file_browser-folder_toolbar {
  display: none;
  flex-direction: column;
  position: absolute;
  right: 0;
  top: 1.98rem;
  z-index: 10;
}

.file_browser-folder_name:hover + .file_browser-folder_toolbar,
.file_browser-folder_toolbar:hover {
  display: flex;
}

.file_browser-folder--collapsed
  > .file_browser-folder_name
  + .file_browser-folder_toolbar {
  display: none;
}

.file_browser-folder_button {
  background: rgb(135, 189, 173);
  border: 0 none;
  display: block;
  font: inherit;
  padding: 0.3em 0.5em;
  text-align: left;
}

.file_browser-folder_button:hover,
.file_browser-folder_button:focus {
  background-color: rgb(183, 224, 212);
}

.file_browser-file {
  color: inherit;
  display: block;
  overflow: hidden;
  padding: 0.3rem 0.6rem;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file_browser-file:hover,
.file_browser-file:focus {
  background: rgba(255, 255, 255, 0.4);
}

.file_browser-file--active {
  font-weight: bold;
}

.account {
  padding: 1rem 0;
}

.workspace_container {
  flex: 1;
}

.workspace {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

.input_area {
  display: flex;
  flex: 1;
  flex-direction: column;
  position: relative;
}

.input_area-form {
  display: flex;
  flex: 1;
  flex-direction: column;
  height: 100%;
  padding: 0.5rem;
}

.input_area-content {
  background: #222;
  border: 0 none;
  box-shadow: inset 1px 1px 5px rgba(0, 0, 0, 0.1);
  color: #fdfdfd;
  flex: 1;
  height: calc(100% - 1rem);
  padding: 0.5rem;
  position: absolute;
  width: calc(100% - 1rem);
}

.output_area {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 0.5rem;
}

.file_preview {
  border: 0 none;
  flex: 1;
  height: 100%;
  width: 100%;
}

.toolbar {
  display: flex;
  font-size: 1rem;
  padding: 0.5rem;
  text-align: right;
}

.toolbar .button {
  background-color: rgb(171, 222, 84);
  border: 0 none;
  color: black;
  padding: 0.4rem 0.7rem;
  text-decoration: none;
}

.toolbar :disabled {
  background-color: #ccc;
  color: #999;
}

.toolbar .open_button {
  background-color: #8cd2a5;
}

.toolbar .delete_button {
  background-color: #dc7f7f;
}

.toolbar .rename_button {
  background-color: #7fc2dc;
}

.toolbar .preview_button {
  background-color: #e4cf68;
}

.preview_form {
  display: flex;
}

.dialog {
  display: none;
  max-height: 80%;
  min-width: 25rem;
  overflow: auto;
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
}

.dialog[open] {
  display: block;
}

.dialog_form_row {
  display: flex;
  font-size: 80%;
  margin: 0.5em 0;
  justify-content: flex-end;
}

.create_file_template > .dialog_form_row {
  margin-top: 0;
  margin-bottom: 0;
  padding: 0.5em;
}

.create_file_template > .dialog_form_row:nth-child(odd) {
  background: rgba(0, 0, 0, 0.03);
}

.dialog_form_label {
  flex: 0 0 25%;
  margin-left: auto;
  text-align: right;
  padding: 0.2em 0;
  cursor: pointer;
}

.dialog_form_input_area {
  flex: 0 0 75%;
  margin-right: auto;
  display: flex;
  margin-left: 0.5em;
}

.dialog_form_field {
  flex: 1 0 auto;
}

.dialog_form_field + .dialog_form_select {
  margin-left: 0.5em;
}

.dialog_form_field_single_checkbox {
  width: 2em;
  height: 2em;
  margin: 0;
}

.dialog_form_input_area_checkboxes {
  columns: 2;
  flex: 0 0 75%;
  max-width: 30rem;
  width: 75%;
  display: block;
}

.dialog_form_input_area_checkboxes_label {
  display: block;
  text-align: right;
  white-space: nowrap;
}

.dialog_form_input_area_checkboxes_label_text {
  display: inline-block;
  margin-right: -2em;
  overflow: hidden;
  padding: 0 2em 0 0;
  text-overflow: ellipsis;
  vertical-align: top;
  width: 100%;
}

.login_form {
  margin: 3rem auto;
  max-width: 40rem;
}

.error {
  color: red;
  font-weight: bold;
}

.upload_area {
  flex: 1 0 auto;
  padding-left: 0.5em;
  text-align: left;
}

.upload_form {
  cursor: pointer;
  display: inline-block;
}

.upload_form[hidden] {
  display: none;
}

.upload_form.is-dragover {
  background-color: #7fc2dc;
}

.upload_file {
  position: absolute;
  left: -9999px;
}

.upload_form label {
  cursor: pointer;
}

label .upload_button {
  pointer-events: none;
}

#upload_button {
  animation: showLate 2s;
  animation-fill-mode: forwards;
  opacity: 0;
}

@keyframes showLate {
  99% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
