* {
  /*outline: 1px solid red;*/
  box-sizing: border-box;
  /*-webkit-user-select: none;*/
  outline: none;
  /*-webkit-user-drag: none;*/
  --titlebar-height: 30px;
  --urlbar-height: 30px;
  --menu-height: 35px;
  --hover: #00000011;
  scroll-behavior: none;
}

html,
body {
  height: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  background: #fff;
  font-family: "Helvetica Neue", arial, sans-serif;
  font-weight: 400;
  color: #444;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-size: 18px;
  user-select: none;
  cursor: default;
  overflow: hidden;
  -webkit-user-select: none;
  -webkit-user-drag: none;
}

.blur {
  opacity: 1;
}

.focus {
  opacity: 1;
}

ol,
li,
ul {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-bottom: 0 !important;
}

a {
  text-decoration: none !important;
  cursor: pointer;
}

#root {
  height: 100%;
}

.App {
  height: 100%;
  width: 100%;
}

.link {
  color: #fff;
}

.FileListRow {
  width: 100%;

  button {
    all: unset;
    background: #ccc;

    display: block;
    text-align: left;
    width: 100%;
    cursor: pointer;
    font-size: 16px;
  }
}

img {
  max-width: 100%;
  max-height: 100%;
}

form.rjsf {
  button.btn-add::after,
  button.array-item-remove::after {
    height: 15px;
    width: 15px;
    padding: 0px;

    color: black;
  }
  button.btn-add::after {
    content: "+";
  }
  button.array-item-remove::after {
    content: "-";
  }

  label,
  input[type="checkbox"] {
    margin-right: 5px;
  }
  input,
  select {
    background-color: var(--rs-input-bg);
    border: 1px solid #e5e5ea;
    border: 1px solid var(--rs-border-primary);
    border-radius: 6px;
    color: #575757;
    color: var(--rs-text-primary);
    font-size: 14px;
    line-height: 1.42857143;
    padding: 7px 11px;
    -webkit-transition: border-color 0.3s ease-in-out;
    transition: border-color 0.3s ease-in-out;
  }

  div.checkbox input {
    cursor: pointer;
  }

  select {
    padding: 3.5px 11px;
  }

  input:hover:not(:disabled) {
    border-color: #3498ff;
    border-color: var(--rs-input-focus-border);
    outline: 0;
  }

  input:focus {
    -webkit-box-shadow: 0 0 0 3px #3498ff40;
    box-shadow: 0 0 0 3px #3498ff40;
    -webkit-box-shadow: var(--rs-state-focus-shadow);
    box-shadow: var(--rs-state-focus-shadow);
  }

  fieldset[id*="root_hotkeys_list"] {
    border: none;
    div {
      display: inline-block;
    }
  }
  fieldset {
    border: none;
    box-shadow: 1 1 1 black;
  }

  span.required {
    display: none;
  }
}

.Aside {
  height: 100%;
  margin: 0px;
  background: #e6e6e686;
}
.Preview > div {
  width: calc(100% + 10px);
  height: 100%;
  background: #e6e6e686;
}

.Main {
  height: 100%;
}

.react-draggable {
  height: 100%;
  width: 100%;
}

.split {
  display: flex;
  flex-direction: row;
  height: 100%;
}

.gutter {
  margin-right: -2.5px;
  margin-left: -2.5px;
  z-index: 2;
}

.gutter::after {
  content: "";
  transition: 0s background-color;
}

.gutter:hover::after,
.gutter:active::after {
  width: 2.5px;
  height: 100%;
  display: block;
  content: "";
  z-index: 3;
  background-color: #0c6eedb2;
  transition-delay: 0.5s;
}

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

.Menu {
  margin-top: 5px;
  margin-bottom: 5px;
  padding-top: 3px;
  height: var(--menu-height);
}

.FileList {
  overflow: auto;
  /* FIXME: I have no idea where the 10px come from but this works for now */
  height: calc(100vh - calc(10px + calc(var(--menu-height) + var(--titlebar-height))));
  .FileListRow:hover {
    background: var(--hover);
  }

  .FileListRowItem {
    input {
      all: unset;
      width: 100%;
      display: block;
      user-select: contain;
      -webkit-user-select: auto;
      cursor: text;
    }
    div {
      margin-left: 7px;
      text-overflow: ellipsis;
      white-space: nowrap;
      overflow-x: hidden;
    }
  }
}

.ContextMenu {
  position: fixed;
  z-index: 5;
  background: #eeeeee;
  border-radius: 4px;
  -webkit-box-shadow: 0px 0px 15px 1px rgba(0, 0, 0, 0.18);
  box-shadow: 0px 0px 15px 1px rgba(0, 0, 0, 0.18);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0.9;
  color: #333333;
  border: 0.5px solid #33333325;

  li {
    padding: 1px 10px;
  }
  li:first-child {
    border-top-left-radius: 4px;
    border-top-right-radius: 4px;
    padding-top: 2px;
  }
  li:last-child {
    border-bottom-left-radius: 4px;
    border-bottom-right-radius: 4px;
    padding-bottom: 2px;
  }
  li:hover {
    background: #00000011;
  }
}

.UrlBar {
  display: inline-block;
  height: var(--urlbar-height);
  width: calc(100% - 220px);
  padding-left: 10px;
  vertical-align: -4px;
  position: relative;

  .breadcrumbs {
    padding: 5px;
    padding-left: 10px;

    font-size: 14px;
    position: absolute;
    top: 0px;
    left: 5px;
  }

  input {
    margin-left: 5px;
    width: calc(100% - 10px);
    background-color: #0000;
    position: absolute;
    top: 0px;
    left: 0px;
  }

  input:hover {
    opacity: 1;
  }
  input:focus {
    color: #000;
    opacity: 1;
  }
}

.ConfigComponent {
  overflow-y: scroll;
  height: 100%;

  form {
    .errors,
    .text-danger {
      display: none;
    }
  }
}

.Bookmarks {
  ol {
    padding-top: 10px;
    padding-left: 5px;
    display: block;
    li {
      padding: 0px 5px;
    }
    li:hover {
      background: var(--hover);
    }
  }
}

.Preview {
  z-index: 2;
}

.Titlebar {
  height: var(--titlebar-height);
  .titlebar {
    background: white;
    user-select: none;
    display: flex;
    justify-content: flex-end;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
  }
  .titlebar-button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    width: 30px;
    height: 30px;
  }
  .titlebar-button:hover {
    background: var(--hover);
  }
}

div.rs-anim-bounce-in,
div.rs-anim-bounce-out {
  animation-duration: 0.1s !important;
}

div.rs-modal-backdrop,
div.rs-modal-wrapper {
  top: var(--titlebar-height);
  height: calc(100vh - var(--titlebar-height));
}
