
:root {
  --splitter-hit-size: 0px;
}

html, body {
  margin: 0;
  padding: 0;
  height: var(--vh);
  width: var(--vw);
  font-family: monospace;
  background-color: #121212;
  color: #f0f0f0;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  font-size: 13px;
  overflow: hidden;
  overscroll-behavior: none;
}

@media (pointer: coarse) and (hover: none) {
  html, body {
    font-size: 12px;
  }
}

header { 
  height: 38px;
  display: flex; 
  align-items: center; 
  justify-content: space-between;
  margin-right: 8px;
  margin-left: 8px;
  gap: 6px;
}

h1 {
  width: 100%;
  margin: 0;
  min-width: 0;
  font-size: 1.4em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;

  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
}

.title-and-status {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 6px;
}

.status-ind {
  min-width: 10px;
  width: 10px;
  height: 10px;
  border-radius: 4px;
  background-color: gray;
  border: 1px solid #444;
}

.status-ind.online {
  background-color: #5a5a5a;
  border: 1px solid #7a7a7a;
}

.status-ind.offline {
  background-color: #2a2a2a;
}

.btn {
  min-width: 0;
  height: 25px;
  width: 100%;
  font-family: monospace;
  background-color: #2a2a2a;
  color: #f0f0f0;
  border: 1px solid #444;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  box-sizing: border-box;
}

.btn-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dropdown {
  display: flex;
  height: 100%;
  position: relative;
}

.dropdown-content {
  display: block;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background-color: #282828;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 999;
  border-radius: 4px;
  width: 100%;
  max-height: 70vh;
  max-width: 100vw;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  border: 1px solid #444;
}

.dropdown-entry {
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
}

.dropdown-content button, .file-manager-list button {
  display: block;
  width: 100%;
  padding: 5px 1px 5px 7px;
  text-decoration: none;
  color: #f0f0f0;
  overflow-x: hidden;
  overflow-y: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  transform-origin: left;
}

.dropdown-content button:hover {
  background-color: #404040;
}

.dropdown-content button:active {
  background-color: #202020;
}

.dropdown-content button.dd-opt-right-click {
  background-color: #101010;
}

.btn:hover {
  background-color: #303030;
}

.btn:active {
  background-color: #202020;
}

#drop-login {
  height: auto;
  min-width: 100px;
  max-width: 150px;
  position: relative;
  font-size: 0.95em;
  margin-top: 5px;
  margin-bottom: 5px;
}
#menu-login {
  box-sizing: border-box;
}

#btn-login {
  height: 28px;
}

#login-text {
  padding: 0px 4px;
}

/*
#btn-login:hover {
  transform: scale(1.03);
}

#btn-login:active {
  transform: scale(0.98);
}
*/

#drop-file-sel {
  width: 220px;
}

#drop-file-sel.fill {
  flex: 1;
  width: auto;
}

#drop-file-act {
  width: 85px;
}

#drop-editor-act-title {
  display: flex;
  position: fixed;
  height: 25px;
  width: 250px;
  left: 50%;
  top: 0;
  transform: translate(-50%, -100%);
  align-items: center;
  justify-content: center;
  background-color: #282828;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  z-index: 999;
  border-radius: 4px;
  border: 1px solid #444;
}

#main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: visible;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  margin-left: 8px;
  margin-right: 8px;
  margin-top: 3px;
  margin-bottom: 8px;
  font-size: 0.85em;
  gap: 5px;
}

#file-manager {
  display: flex;
  flex-direction: column;
  gap: 5px;
  justify-content: center;
}

#file-manager-btns {
  width: 100%;
  display: flex;
  gap: 5px;
  justify-content: center;
}

#file-manager-group {
  flex: 1;
  display: none;
  flex-direction: row;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
}

.file-manager-list {
  flex: 1;
  display: block;
  min-height: 30vh;
  background-color: #202020;
  box-shadow: 0 4px 8px rgba(0,0,0,0.2);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: none;
  border: 1px solid #303030;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
  padding-bottom: 2.5em;
  box-sizing: border-box;
}

#menu-file-sel {
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  z-index: 899;
  border-radius: 4px;
  width: 100%;
}

.file-manager-list button:hover {
  background-color: #404040;
}

.file-manager-list button:active {
  background-color: #181818;
}

.fm-selected-item-highlight-alt-editor {
  background-color: #2a2a2a;
}

.fm-selected-item-highlight-act-editor {
  background-color: #343434;
}

.fm-selected-item-highlight-dd-hl {
  background-color: #101010;
}

.fm-selected-item-highlight-target {
  outline: 1px solid #666;
  outline-offset: -3px;
  /*border: 1px solid #404040;*/
  /*background-color: #181818;*/
}

#file-manager-splitter {
  display: block;
  width: 4px;
  cursor: e-resize;
  border-top-right-radius: 4px;
  border-bottom-right-radius: 4px;
}

#editor-output-group {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: visible;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  gap: 5px;
}

#editor-group {
  flex: 0 0 auto;
  height: 67%;
  width: 100%;
  display: flex;
  flex-direction: column;
  overflow: visible;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  gap: 5px;
}

#editors {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: 0;
  height: 100%;
  gap: 2px;
}

#editor-splitter {
  display: none;
  height: 4px;
  cursor: n-resize;
}

#editor-splitter-v {
  display: none;
  width: 4px;
  cursor: e-resize;
}

.editor-container {
  display: flex;
  flex-direction: column;
  min-height: 0;
  position: relative;
}

#editor-1-container {
  flex: 0 0 auto;
  height: 100%;
  width: 100%;
}

#editor-2-container {
  flex: 1;
  width: 100%;
}

.editor-title {
  display: block;
  position: absolute;
  top: 1px;
  right: 15px;
  opacity: 0.25;
  font-style: italic;
  pointer-events: none;
  z-index: 99;
  font-size: 0.9em;
  width: calc(100% - 50px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: right;
}

.editor {
  flex: 1;
  background-color: #1e1e1e;
  color: #f0f0f0;
  border: none;
  box-sizing: border-box;
  border: 1px solid #303030;
  visibility: hidden;
  border-radius: 4px;
  min-height: 0;
  min-width: 0;
  width: 100%;
  height: 100%;
}

.editor.active-editor {
  border: 1px solid #444444;
  /*box-shadow: 0 0 3px 1px #484848;*/
}

.ace_editor {
  background-color: #1e1e1e;
  color: #f0f0f0;
  font-size: inherit;
  font-family: inherit;
  transition: none;
}

.ace_editor .ace_gutter-cell {
  padding-left: 5px;
  padding-right: 5px;
}

#editor-btns {
  display: flex;
  justify-content: center;
  gap: 5px;
}

#btn-editor-act {
  width: 85px;
}

#btn-run {
  width: 100%;
  min-width: 30px;
}

#btn-run:hover {
    background-color: #303030;
}

#btn-run:active {
    background-color: #202020;
}

.splitter {
  background: #303030;
  flex-shrink: 0;
  margin: 0;
  position: relative;
  touch-action: none;
  pointer-events: auto;
}

.splitter::before {
  content: "";
  position: absolute;
  top: var(--splitter-hit-size);
  bottom: var(--splitter-hit-size);
  left: var(--splitter-hit-size);
  right: var(--splitter-hit-size);
  pointer-events: auto;
  z-index: 199;
}

.splitter:hover {
  background: #383838;
}

#output-splitter {
  height: 4px;
  cursor: n-resize;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

#output-splitter-v {
  display: none;
  width: 4px;
  cursor: e-resize;
  border-top-left-radius: 4px;
  border-bottom-left-radius: 4px;
}

/*.splitter::after {
  content: "";
  position: absolute;
  width: 30px;
  height: 1px;
  background: #101010;
  border-radius: 1px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.splitter:hover::after {
  background: #181818;
}*/

#output-input {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
  gap: 5px;
}

#output-group {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
}

#output-group-h {
  flex: 1 1 auto;
  display: flex;
  flex-direction: row;
  overflow: hidden;
  box-sizing: border-box;
  min-height: 0;
  min-width: 0;
}

#output {
  flex: 1;
  overflow-y: auto;
  padding: 5px;
  background-color: #181818;
  box-sizing: border-box;
  overflow-x: auto;
  margin: 0;
  border: 1px solid #303030;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word; /* change to break-all to break mid word */
  min-height: 0;
  min-width: 0;
}

#input-container {
  display: flex;
  flex-direction: row;
  gap: 5px;
  height: 25px;
  box-sizing: border-box;
}

#input {
  flex: 1;
  min-width: 0;
  vertical-align: middle;
  background-color: #1e1e1e;
  border: 1px solid #303030;
  color: #f0f0f0;
  font-family: monospace;
  border-radius: 4px;
  padding: 0 5px;
  box-sizing: content-box;
}

#input:focus {
  outline: none;
  border-color: #404040;
  /*box-shadow: 0 0 3px 1px #484848;*/
}

#btn-input {
  min-width: 0;
  width: 25px;
}

.hidden {
  display: none !important;
}

button:focus, input:focus, a:focus, textarea:focus, select:focus {
  outline: none;
  border-color: #505050;
}

button:focus-visible, input:focus-visible, a:focus-visible, 
textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: #505050;
}

button, input, select, textarea {
  font-size: inherit;
}

.ace_editor.ace_focus {
  border-color: #505050;
}


* {
  scrollbar-color: #404040 #30303080;
}

* {
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: none;
  -moz-text-size-adjust: none;
  text-size-adjust: none; 
}

@supports selector(::-webkit-scrollbar) {
  ::-webkit-scrollbar {
    width: 12px;
    height: 12px;
  }

  * {
    scrollbar-width: thin;
  }
}

@supports selector(::-webkit-scrollbar-track) {
  ::-webkit-scrollbar-track {
    background: #303030;
  }
}

@supports selector(::-webkit-scrollbar-thumb) {
  ::-webkit-scrollbar-thumb {
    background-color: #303030;
    border-radius: 6px;
    border: 2px solid #303030;
  }
}
/*
@supports selector(::-webkit-scrollbar-thumb:hover) {
  ::-webkit-scrollbar-thumb:hover {
    background-color: #404040 !important;
  }
}

@supports selector(::-webkit-scrollbar-thumb:active) {
  ::-webkit-scrollbar-thumb:active {
    background-color: #404040 !important;
  }
}
*/