@import "components/icon.css";
@import "components/icon-button.css";
@import "components/entity-hierarchy.css";

/* Color palette variables */

:root {
  --white: #ffffff;
  --black: #000000;

  /* Slate
  --grey-50: #f8fafc;
  --grey-100: #f1f5f9;
  --grey-200: #e2e8f0;
  --grey-300: #cbd5e1;
  --grey-400: #94a3b8;
  --grey-500: #64748b;
  --grey-600: #475569;
  --grey-700: #334155;
  --grey-800: #1e293b;
  --grey-850: #162032;
  --grey-900: #0f172a;
  --grey-950: #050914; */

  /* Zinc
  --grey-50: #f9fafb;
  --grey-100: #f3f4f6;
  --grey-200: #e5e7eb;
  --grey-300: #d1d5db;
  --grey-400: #9ca3af;
  --grey-500: #6b7280;
  --grey-600: #4b5563;
  --grey-700: #374151;
  --grey-800: #1f2937;
  --grey-850: #18202F;
  --grey-900: #111827; 
  --grey-950: #080b17; */

  /* Gray */
  --grey-50: #fafafa;
  --grey-100: #f4f4f5;
  --grey-200: #e4e4e7;
  --grey-300: #d4d4d8;
  --grey-400: #a1a1aa;
  --grey-500: #71717a;
  --grey-600: #52525b;
  --grey-700: #3f3f46;
  --grey-800: #27272a;
  --grey-850: #202023;
  --grey-900: #18181b;
  --grey-950: #0b0b0e;

  --steel-300: #dde0e6;
  --steel-400: #aaaeb5;
  --steel-500: #7a7e86;
  --steel-600: #4d515a;
  --steel-650: #383c46;
  --steel-675: #2e323c;
  --steel-700: #242832;
  --steel-750: #1D2028;
  --steel-800: #1a1d23;
  --steel-850: #16171c;
  --steel-900: #101115;
  --steel-950: #0a0c0e;

  --light-green: #A2D8B4;
  --green: #47B576;
  --red: #B5494B;
  --bright-red: #EF8784;

  --alert-error: #b5494b;
  --alert-warning: #b5894b;
  --alert-info: #7595b3;
  --alert-disabled: var(--steel-700);
  --alert-error-dark: rgb(33, 31, 36);
  --alert-warning-dark: rgb(33, 33, 36);
  --alert-info-dark: rgb(30, 34, 41);

  --ui-blue: rgba(79, 149, 255, 1.0);
  --ui-blue-30: rgba(79, 149, 255, 0.30);

  --steel-transparent-96: rgb(26, 29, 35, 0.96);
  --steel-transparent-80: rgb(26, 29, 35, 0.80);
  
  --steel-transparent-dark: rgb(46, 50, 60, 0.30);
  --steel-transparent-light: rgb(46, 50, 60, 0.85);

  /* Color assignments */
  --app-bg: var(--steel-950);
  --app-bg-maximized: var(--steel-900);
  --panel-border: var(--steel-850);
  --panel-header-bg: var(--steel-700);
  --panel-header-hover-bg: var(--steel-675);
  --panel-footer-bg: var(--steel-700);
  --panel-bg: var(--steel-850);
  --panel-bg-secondary: var(--steel-800);
  --panel-select: var(--steel-700);
  
  --prop-bg: var(--steel-700);
  --prop-input-bg: var(--steel-750);
  --prop-input-border: var(--steel-650);
  --prop-input-border-focus: var(--green);

  --row-bg: var(--steel-800);
  --cell-bg: var(--steel-transparent-96);
  --cell-bg-hover: var(--steel-transparent-light);
  --cell-header-bg: var(--steel-transparent-dark);

  --primary-text: var(--grey-100);
  --secondary-text: var(--grey-400);
  --tertiary-text: var(--grey-500);

  --label: var(--secondary-text);
  --footer-text: var(--steel-300);
  --error: var(--bright-red);
  --light-hover-bg: var(--steel-700);

  --color-accent-emphasis: var(--ui-blue);
  --color-accent-emphasis-translucent: var(--ui-blue-30);

  /* Text sizes */
  --text-fs-xs: 10px;
  --text-fs-sm: 12px;
  --text-fs-md: 14px;
  --text-fs-lg: 15px;

  --text-lh-xs: 12px;
  --text-lh-sm: 14px;
  --text-lh-md: 16px;
  --text-lh-lg: 18px;

  /* Paddings */

  --p-0: 1px;
  --p-1: 2px;
  --p-2: 4px;
  --p-3: 8px;
  --p-4: 12px;
  --p-5: 16px;

  /* Border Radii */

  --br-0: 1px;
  --br-1: 2px;
  --br-2: 4px;
  --br-3: 8px;
}

/* HTML element styling */

body {
  font-family: Inter, Helvetica, sans-serif;
  font-feature-settings: "liga" 0, "calt" 0;
  font-size: var(--text-fs-md);
  background-color: var(--app-bg);
  color: var(--primary-text);
  margin: 0px;
}

input {
  -webkit-appearance: none; 
  -moz-appearance: none;
  outline: none;
  padding: 5px;
  padding-left: 7px;
  color: inherit;
  font-size: inherit;
  font-family: inherit;
}

textarea {
  -webkit-appearance: none; 
  -moz-appearance: none;
  outline: none;
  line-height: 18px;
  font-weight: 400;
}

pre, pre.span {
  font-size: inherit;
}

span {
  display: inline-flex;
}

pre span {
  display: inline;
}

.noselect {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Old versions of Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome, Edge, Opera and Firefox */
}

.clickable {
  cursor: pointer;
}

span.icon {
  display: inline-flex;
  position: relative;
  margin-left: 3px;
  margin-right: 3px;
}

span.icon > * {
  position: absolute;
  top: calc(50% - 9px);
  width: 18px;
  height: 18px;
  aspect-ratio: 1;
  opacity: 0.4;
}

span.icon::after {
  content: '';
  width: 18px;
}

span.icon div {
  transform: rotate(0deg);
  transition: 0.1s transform ease-out, 0.1s opacity ease-out;
}

span.icon-rotate div {
  transform: rotate(90deg);
}

span.icon-hide div {
  opacity: 0;
}

div.follow {
  background-image: url('../img/follow.png');
  background-size: contain;
  background-position: center center;
  padding-top: 2.5px;
  width: 12px !important;
  height: 12px !important;
  transform: rotate(315deg) !important;
}

div.connecting {
  background-image: url('../img/connecting.png');
  background-size: contain;
  background-position: center center;
  opacity: 0.9 !important;
}

div.connected {
  background-image: url('../img/connected.png');
  background-size: contain;
  background-position: center center;
  opacity: 0.9 !important;
}

div.error {
  background-image: url('../img/error.png');
  background-size: contain;
  background-position: center center;
  background-repeat: no-repeat;
  opacity: 0.9 !important;
}

div.search {
  background-image: url('../img/search.png');
  background-size: contain;
  background-position: center center;
}

div.nav {
  background-image: url('../img/nav-right.png');
  background-size: contain;
  background-position: center center;
}

div.close {
  background-image: url('../img/close.png');
  background-size: contain;
  background-position: center center;
}

/* High level layout */

div.top-box {
  width: 100%;
  height: 36px;
  background-color: var(--panel-header-bg);
  border-color: var(--panel-border);
  border-style: solid;
  border-width: 0px;
  border-bottom-width: 1px;
  padding-bottom: 4px;
}

div.top-content {
  display: flex;
  width: 100%;
  height: 100%;
  border-color: var(--panel-border);
  border-style: solid;
  border-width: 0px;
  border-bottom-width: 1px;
  align-items: center;
  justify-content: center;
}

div.tree-box {
  position: absolute;
  top: 41px;
  left: 0px;
  width: 214px;
  height: calc(100vh - 41px);
  border-style: solid;
  border-width: 0px;
  border-left-color: var(--panel-border);
  border-left-width: 5px;
  border-right-color: var(--panel-border);
  border-right-width: 1px;
}

div.app-box {
  display: flex;
  position: relative;
  top: 41px;
  left: 220px;
  width: calc(100% - 220px);
  height: calc(100vh - 141px);
}

div.left-column {
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  height: 100%;
  overflow-x: auto;
}

div.right-column {
  display: flex;
  flex-direction: column;
  min-width: 400px;
  height: 100%;
  border-style: solid;
  border-width: 0px;
  border-left-width: 1px;
  border-color: var(--panel-border);
  overflow-x: auto;
}

div.query-box {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
}

div.terminal-box {
  background-color: var(--panel-bg);
  border-color: var(--panel-border);
  border-style: solid;
  border-width: 0px;
  border-top-width: 1px;

  width: 100%;
  height: 100px;
}

div.app-title {
  font-size: var(--text-fs-lg);
}

span.app-title-detail {
  background-color: #250201;
  border-style: solid;
  border-width: 1px;
  border-radius: 10px;
  border-color: var(--error);
  color: var(--error);
  font-size: var(--text-fs-md);

  padding-left: 5px;
  padding-right: 5px;  

  font-weight: 300;
  line-height: 1.125em;
  margin-left: 5px;
  transition: 0.3s margin-left, 0.3s opacity;
}

span.app-title-detail-hide {
  width: 0px;
  overflow: hidden;
  margin-left: 0px;
  padding: 0px;
  visibility: hidden;
}

div.play-button-box {
  position: absolute;
  left: 10px;
  top: 8px;
  width: 26px;
  height: 26px;
  cursor: pointer;
}

div.play-button-box img {
  height: 22px;
}

div.save-button-box {
  position: absolute;
  right: 30px;
  top: 8px;
  cursor: pointer;
}

div.share-button-box {
  position: absolute;
  right: 8px;
  top: 8px;
  cursor: pointer;
}

div.load-box {
  position: absolute;
  right: 60px;
  top: 8px;
}

div.save-button-box img {
  height: 25px;
}

div.share-button-box img {
  height: 25px;
}

div.entity-box {
  position: relative;
}

div.result-box {
  position: relative;
}

/* UI elements */

div.entity-tree {
  background-color: var(--steel-800);
  border-color: var(--steel-900);
  border-style: solid;
  border-width: 0px;
  border-left-width: 1px;
  border-right-width: 1px;
  width: calc(100% - 1px);
  height: 100%;
  overflow: auto;
}

text.entity-tree-text {
  fill: var(--primary-text);
  cursor: pointer;
}

text.entity-tree-text::selection {
  background: none;
}

text.entity-tree-text-select {
  fill: var(--primary-text);
}

text.entity-tree-text-disabled {
  fill: var(--secondary-text);
}

image.entity-tree-icon {
  cursor: pointer;
  width: 15px;
  height: 15px;
  opacity: 0.7;
}

image.entity-tree-icon:hover {
  opacity: 1.0;
}

rect.entity-tree-select {
  fill: var(--steel-800);
  border-radius: 2px;
  cursor: pointer;
}

rect.entity-tree-selected {
  fill: var(--steel-650);
}

/* -- begin of inspector -- */
div.inspector  {
  padding: 5px;
}

div.inspector-toggle {
  padding-top: 10px;
  padding-bottom: 5px;
  display: flex;
  align-items: center;
  color: var(--secondary-text);
};

div.inspector-name {
  display: flex;
  flex-direction: row;
  align-items: center;
  cursor: default;
}

div.inspector-icon {
  display: flex;
  width: 15px;
}

div.inspector-components {
  display: flex;
  flex-direction: column;
}

div.inspector-components-with-header {
  margin-bottom: 10px;
}

div.inspector-components-with-header:last-child {
  margin-bottom: 0px;
}

div.inspector-components-content {
  display: flex;
  flex-direction: column;
}

div.inspector-components-nested {
  margin-left: 10px;
}

div.inspector-component {
  display: flex;
  flex-direction: column;
  margin-bottom: 15px;
  padding-top: 5px;
  padding-right: 5px;
}

div.inspector-component-name {
  display: flex;
  align-items: center;
}

div.inspector-component-name {
  color: var(--secondary-text);
  font-weight: 400;
}

div.inspector-component-name div.detail-toggle-summary {
  border-radius: 2px;
  background-color: rgb(35, 40, 51, 0.0);
  transition: 0.3s background-color
}

div.inspector-component-name div.detail-toggle-summary:hover {
  background-color: var(--light-hover-bg);
}

span.inspector-component-object {
}

div.inspector-component-overridden {
  display: flex;
  color: #4F5565;
  text-decoration: line-through;
  font-weight: 400;
}

span.inspector-header {
  position: relative;
  color: var(--green);
  font-weight: 500;
  white-space: nowrap;
}

span.inspector-header:first-child {
  margin-top: 10px;
}

div.inspector-props {
  display: flex;
  flex-wrap: wrap;
  margin-left: 10px;
  flex-direction: column;
  
  border-style: solid;
  border-width: 0px;
  border-left-width: 1px;
  border-color: #232833;
}

div.inspector-props-list {
  display: inline-flex;
}

div.inspector-kv {
  display: flex;
  flex-direction: row;
  align-items: center;

  margin-right: 1px;
  width: 100%;
  justify-content: right;
}

span.inspector-kv-after-key {
  border-top-left-radius: 0px !important;
  border-bottom-left-radius: 0px !important;
}

div.inspector-kv-column-row {
  display: flex;
  flex-direction: row;
  align-items: center;
}

div.inspector-kv-column {
  display: flex;
  flex-direction: column;
  align-items: center;
}

div.inspector-prop {
  display: flex;
  margin-bottom: 1px; /* for when row collapses */
}

div.inspector-prop-object {
  display: flex;
  width: 100%;
  margin-top: 5px;
}

div.inspector-props-list span.inspector-value {
  padding-left: 0px;
  padding-right: 0px;
  white-space: nowrap;
}

span.inspector-key, span.inspector-value {
  padding: var(--p-2);
}

span.inspector-separator {
  padding: var(--p-2);
  color: var(--primary-text);
}

div.inspector-editable-value {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: right;
}

input.inspector-editable-value-input {
  color: white;
  background-color: var(--prop-input-bg);
  border-width: 1px;
  border-style: solid;
  border-color: var(--prop-input-border);
  border-radius: var(--br-2);
  padding: calc(var(--p-3) - 1px);
  width: 180px;
  margin-right: 5px;
  overflow-x: auto;
  transition: 0.1s border-color;
}

input.inspector-editable-value-input:focus {
  border-color: var(--prop-input-border-focus);
}

div.inspector-props span.inspector-key {
  right: 220px;
  cursor: default;
  color: var(--label);
}

div.inspector-props span.inspector-value {
  padding: var(--p-3);
  border-radius: var(--br-2);
  width: 180px;
  margin-right: 5px;
  overflow-x: auto;
  background-color: var(--prop-bg);
}

div.inspector-category {
  margin-top: 5px;
}

div.inspector-category > div.detail-toggle > div.detail-toggle-summary {
  background-color: var(--panel-bg);
  border-radius: 3px;
  padding-top: 5px;
  padding-bottom: 5px;
}

div.inspector-refs {
  border-radius: 3px;
  color: var(--tertiary-text);
  font-size: var(--text-fs-sm);
  padding-left: 8px;
  padding-right: 4px;
  padding-bottom: 8px;
  margin-top: 10px;
  margin-bottom: 4px;
}

div.inspector-alerts {
  background-color: var(--panel-bg);
  border-radius: 3px;
  color: var(--tertiary-text);
  font-size: var(--text-fs-sm);
  padding-left: 8px;
  padding-right: 2px;
  padding-bottom: 4px;
  margin-top: 10px;
}

div.inspector-no-content {
  color: var(--tertiary-text);
  font-size: var(--text-fs-md);
  padding-left: 8px;
  padding-right: 2px;
  padding-top: 4px;
  padding-bottom: 4px;
  margin-top: 10px;
}

span.inspector-value-bool {
  color: #4981B5;
}

span.inspector-value-int {
  color: var(--light-green);
}

span.inspector-value-float {
  color: var(--light-green);
}

span.inspector-value-text {
  color: #B5894B;
}

span.inspector-value-enum, span.inspector-value-bitmask {
  color: #7D67B5;
}

span.inspector-value-error {
  color: var(--alert-error);
}
span.inspector-value-warning {
  color: var(--alert-warning);
}

div.inspector-component-expand-nodata {
  width: 10px;
  text-align: center;
  color: #b4b4b4;
}

div.inspector-component-expand-nodata span {
  text-align: center;
}

a.inspector-link {
  color: var(--green);
  cursor: pointer;
}

a.inspector-link:hover {
  color: white;
}

img.inspector-image {
  display: block;
  object-fit: scale-down;
  max-width: 200px;
  max-height: 100px;
  margin-top: 10px;
  margin-bottom: 20px;
  border-radius: 5px;
}

span.inspector-parent {
  margin-left: 5px;
}

div.inspector-doc {
  display: flex;
  margin-left: 15px;
  margin-bottom: 15px;
}

span.inspector-brief {
  display: flex;
  color: var(--secondary-text);
  margin-right: 5px;
}

span.inspector-link a { 
  color: var(--green);
  text-decoration: none;
  cursor: pointer;
}

div.inspector-entity-name {
  margin-left: 15px;
  margin-bottom: 15px;
  max-width: 380px;
  overflow: hidden;
  /* text-overflow: ellipsis; */
  white-space: nowrap;
}

span.inspector-entity-name {
  color: var(--primary-text);
  margin-right: 5px;
  overflow-x: hidden;
}

span.inspector-entity-name-label {
  font-weight: 500;
}

div.inspector-view {
  border-style: solid;
  border-width: 1px;
  border-left-width: 0px;
  border-right-width: 0px;
  border-top-width: 0px;
  border-color: var(--steel-650);
  margin-left: 2px;
  margin-right: 2px;
}

div.inspector-buttons  {
  padding-top: 0px;
  padding-bottom: 10px;
  margin-left: 2px;
  margin-right: 2px;
}

span.inspector-button  {
  color: var(--primary-text);
  background-color: var(--prop-bg);
  border-radius: 3px;
  padding: 7px;
  padding-left: 10px;
  padding-right: 10px;
  cursor: pointer;
  height: 18px;
}

span.inspector-button a  {
  text-decoration: none;
}

span.inspector-button:hover  {
  background-color: var(--steel-650);
}

span.inspector-button-disabled {
  opacity: 0.5;
  cursor: default;
}

span.inspector-button-disabled:hover {
  background-color: var(--prop-bg);
}


span.inspector-button:active  {
  background-color: var(--steel-600);
}

span.entity-reference span {
  white-space: nowrap;
  display: flex;
  flex-direction: row;
  align-items: center;
}

span.entity-reference-clickable-name {
  transition: 0.3s color;
  cursor: pointer;
}

span.entity-reference-clickable-name:hover {
  color: var(--primary-text);
}

span.entity-parent {
  font-size: var(--text-fs);
  color: var(--green);
}

/* -- end of inspector -- */

div.url-modal {
  position: absolute;
  top: 0px;
  z-index: 99;
  background-color: rgb(0, 0, 0, 0.6);
  width: 100%;
  height: 100%;
}

div.url-modal-hidden {
  display: none;
}

div.hidden {
  display: none;
}

div.url-modal-content {
  position: relative;
  top: calc(20% - 64px);
  margin: 0 auto;
  width: 700px;
  overflow: auto;
  overflow-wrap: anywhere;
  background-color: var(--panel-header-bg);
  padding: 20px;
}

div.url-modal-url-container {
  background-color: var(--panel-bg);
  border-color: #000;
  border-width: 1px;
  border-style: solid;
  border-radius: 3px;
  padding: 20px;
  height: 200px;
}

div.url-modal-url {
  overflow-y: auto;
  height: 100%;
}

div.url-modal-content a {
  color: var(--primary-text);
}

div.url-modal h1 {
  font-size: var(--text-fs-lg);
  line-height: var(--text-lh-lg);
  margin: 0px;
  margin-bottom: 15px;
}

div.editor {
  padding-left: 10px;
  padding-bottom: 3px;
}

div.editor-detail {
  height: 200px;
}

div.error {
  position: relative;
  text-align: center;
  width: 100%;
}

div.error span {
  color: var(--red);
}

div.terminal {
  position: relative;
  top: 5px;
  height: calc(100% - 5px);
  font-family: "Roboto Mono", Menlo, Monaco, "Courier New", monospace;
  font-size: 12px;
}

div.terminal-content {
  position: relative;
  background-color: var(--panel-bg);
  width: 100%;
  height: calc(100% - 1px);
  overflow-x: auto;
  overflow-y: auto;
  white-space: nowrap;

  border-color: #000;
  border-style: solid;
  border-width: 0px;
  border-top-width: 1px;
}

div.terminal-log {
  height: 22px;
  border-style: solid;
  border-width: 0px;
  border-bottom-width: 1px;
}

span.terminal-msg {
  position: relative;
  top: 5px;
  left: 5px;
}

span.terminal-icon img {
  position: relative;
  height: 20px;
  top: 1px;
}

div.terminal-command {
  border-color: #232833;
}

span.terminal-command {
  color: #4981B5;
}

span.terminal-command {
  position: relative;
  top: -5px;
  left: -5px;
}

div.terminal-ok {
  background-color: #02210A;
  border-color: #0B4C1C;
}

span.terminal-ok {
  color: var(--green);
}

div.terminal-error {
  background-color: #250201;
  border-color: #540C06;
}

span.terminal-error {
  color: #EF8784;
}

div.terminal-info {
  border-color: #232833;
}

div.info {
  position: relative;
  top: -30px;
  margin: auto;
  padding: 15px;
  background-color: #000;
  max-width: 80%;  
}

div.info span {
  color: #DDE0E6;
}

span.prompt {
  color: var(--green) !important;
}

span.ecs-entity {
  color: var(--green); 
}

span.ecs-var {
  color: #4981B5; 
}

span.ecs-set {
  color: #7D67B5; 
}

div.invalid * {
  color: rgb(189, 193, 204, 0.3) !important;
}

div.invalid text {
  fill: #4F5565 !important;
}

div.invalid rect, div.invalid img, div.invalid image {
  opacity: 0.0 !important;
}

div.ecs-filter {
  margin: auto;
  padding: 10px;
  background-color: #000;
  margin: 10px;
}

canvas.explorer-canvas {
  cursor: pointer;
  border: solid;
  border-color: var(--panel-bg);
  border-width: 2px;
  border-radius: 5px;
}

canvas.explorer-canvas-focus {
  border-color: var(--green);
}

div.content-container-wrapper {
  border-color: var(--panel-header-bg);
  border-style: solid;
  border-width: 0px;
  border-bottom-width: 4px;
  margin-bottom: 1px;
}

div.content-container-wrapper-overflow {
  display: flex;
  min-height: 31px;
}

div.content-container-wrapper-overflow div.content-container {
  display: flex;
  width: 100%;
}

div.content-container-wrapper-overflow div.content-container div.detail-toggle {
  width: 100%;
}

/* detail toggle */

div.detail-toggle {
  display: flex;
  flex-direction: column;
}

div.detail-toggle-summary {
  display: flex;
  flex-direction: row;
  padding-right: 10px;
}

div.detail-toggle-detail {
  display: flex;
  position: relative;
  flex-direction: inherit;
  overflow: hidden;
  opacity: 1;

  padding-top: 3px;
  transition: padding-top 0.1s ease-out, opacity 0.06s ease-out;;
}

div.detail-toggle-detail-hide {
  padding-top: 0px;
  height: 0px;
  opacity: 0;
}

div.detail-toggle-detail-disable {
  padding-top: 0px;
}

div.detail-toggle-img svg {
  position: relative;
  top: -1px;
  width: 18px;
  margin-left: 3px;
  margin-right: 3px;
}

div.detail-toggle-divider {
  display: flex;
  flex-grow: 1.0;
  margin-left: 10px;
  margin-top: 8px;
  border-top-color: #1B1E25;
  border-top-style: solid;
  border-top-width: 1px;
}

div.maximized {
  position: absolute;
  top: 41px;
  left: 0px;
  width: 100%;
  height: calc(100% - 45px);
  z-index: 10;
  background-color: var(--app-bg-maximized);
}

div.disable {
  display: none;
}

svg text{
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  user-select: none;
}
