@font-face {
  font-family: 'MinecraftTen';
  src: url("./assets/MinecraftTen.woff")
}

@font-face {
  font-family: 'MinecraftSeven';
  src: url("./assets/MinecraftTen.woff")
}

* {
  box-sizing: border-box;
}

::-webkit-scrollbar {
  width: 5px;
  height: 12px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 0px;
  margin-left: 2px;
}

::-webkit-scrollbar-thumb {
  background: #888888;
  border-radius: 0px;
}

.save-progress {
  width: 100px;
  height: 6px;
  border: 1px solid white;
  border-radius: 50px;
  display: inline-block;
  vertical-align: middle;
  position: relative;
}

.save-progress .value {
  width: 100px;
  height: 100%;
  background-color: white;
  display: inline-block;
  border-radius: 50px;
  position: absolute;
}

:root {
  /* Variable colors from sister project, MCBE Essentials */
  --lightest-background: #5c63a9;
  --home-background: #4f5590;
  --third-color: #3e4e76;
  --app-background: #443d60;
  --topbar-background: #26203a;
  --category-background: #312658;
  --category-foreground: #ffffff;
  --category-hover-foreground: var(--category-background);
  --category-hover-background: var(--category-foreground);
  --sidebar-background: #312948;
  --menu-button-closed-background: #312948f0;
  --sidebar-button-background: var(--topbar-background);
  --app-main-base-background: #2d2a3b;
  
  --app-inner-background: #4b4a5c;
  --app-inner-inner-background: #5f5e70;
  
  --potential-page-background: #1c1532;
  --potential-app-main-background-color: #352d50;
  --potential-app-inner-background-color: #454158;
  --potential-app-inner-inner-background-color: #585372;
  
  --button-green: #82f782;
  --button-blue: #82c1f7;
  --button-red: #f78282;
  --button-orange: #ef933c;
  --button-purple: #d174e5;
  --button-gray: #cdcbce;
  --button-hover: #cdcbce;
  --font-color: #ffffff;
  
  --input-border: #2D2A3B;
  --input-background: #ACACC1;
  
  --old-category-background: #dad9dc;
  --old-category-foreground: #1a1a2c;
  --old-sidebar-background: #4a4a5c;
  --old-sidebar-button-background: #1a1c2c;
  --old-topbar-background: #2b2b3a;
  --old-font-color: #dad9dc;
  --old-background: #2e3148;
  --discarded-app-background: #4b4f78;
  
  --general-border-radius: 10px;
  --bottom-height: 310px;

  --cursor-color: #2e2eff;
}

.waveform-container {
  position: absolute;
  top: 20px;
  opacity: 0.9;
  left: 228px;
}

.playback-pane {
  position: absolute;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: #000000a3;
  color: white;
  padding: 12px;
}

.playback-pane-table {
  width: 100%;
  height: 100%;
}

.playback-pane-table td {
  border: 1px solid white;
  padding: 2px 12px;
  vertical-align: top;
}

body {
  margin: 0;
  font-family: sans-serif;
  line-height: 1.5;
}

header {
  min-height: 20px;
  display: flex;
  width:100%;
  user-select: none;
  background-color: var(--topbar-background);
  color: white;
  position: sticky;
  top: 0;
  z-index: 1;
  justify-content: space-between;
}

header .watermark {
  color: #c1c1c1;
  padding: 0px 6px;
}

.header-toolbar {
  display: inline-block;
}

.header-toolbar span.context-label {
  padding: 6px 10px; 
  vertical-align: middle;
  cursor: pointer;
  position: relative;
}

.header-toolbar span.context-label:hover {
  background-color: gray;
}

.context-menu {
  position: absolute;
  display: none;
  margin: 0;
  margin-inline-start: 0;
  list-style-type: none;
  padding-inline-start: 0px;
  top: 25px;
  left: 0;
  background-color: var(--topbar-background);
  border-top: 2px solid transparent;
  white-space: nowrap;
}

.header-toolbar span.context-label:hover .context-menu:not(.nested-menu) {
  display: inline-block;
}

.context-menu li, label {
  padding: 2px 16px 2px 8px;
  cursor: pointer;
}

.context-menu li.selected {
  background-color: var(--app-inner-background);
}

.context-menu li:hover, label:hover {
  background-color: var(--home-background);
  /*color: black;*/
}

.nested-menu-header {
  position: relative;
}

.context-menu.nested-menu {
  display: none;
  position: absolute;
  left: 100%;
  top: 0;
  border-top: none;
}

.nested-menu-header:hover > .nested-menu {
  display: inline-block;
}

.app-left {
  background-color: var(--button-gray);
  height: calc(100vh - calc(var(--bottom-height) + 20px));
  display: inline-block;
  width: 65%;
  vertical-align: top;
  position: relative;
}

.app-right {
  background-color: var(--app-background);
  height: calc(100vh - calc(var(--bottom-height) + 20px));
  display: inline-block;
  width: 35%;
  vertical-align: top;
  color: white;
  font-size: 15pt;
  overflow: auto;
}

.app-right-tabs {
  background-color: var(--app-main-base-background);
  display: flex;
  position: sticky;
  top: 0;
  z-index: 20;
}

.app-right-tabs .tab {
  user-select: none;
  padding: 0px 12px;
  border-radius: 12px 12px 0px 0px;
  cursor: pointer;
}

.app-right-tabs .tab:hover {
  background-color: var(--app-inner-inner-background);
}

.app-right-tabs .tab.selected {
  background-color: var(--app-background);
}

.app-right-inner {
  padding: 4px;
  user-select: none;
}

.app-right-inner h1 {
  font-family: 'MinecraftTen';
  margin: 0;
  text-align: center;
  color: white;
  filter: drop-shadow(2px 3px 2px black) drop-shadow(-2px 0px 2px black);
  font-weight: normal;
}

#properties {
  text-align: center;
}

.property-value {
  display: flex;
  align-items: center;
  padding: 0px 6px;
  justify-content: center;
}

.property-value.highlighted {
  animation-name: property-value-fade;
  animation-duration: 1.4s;
}

@keyframes property-value-fade {
  10% {
    background-color: transparent;
    color: unset;
  }

  20% {
    background-color: #69694f;
  }

  80% {
    background-color: #69694f;
  }

  100% {
    background-color: transparent;
    color: unset;
  }
}

.property-value .app-input {
  width: 9em;
  padding: 1px;
  font-family: Consolas;
}

.property-title {
  padding: 0px 6px;
  width: 40px;
}

.property-keyframe-container {
  display: flex;
  align-items: center;
}

.property-keyframe-button {
  background-color: transparent;
  border: none;
  outline: none;
  padding: 0;
  appearance: none;
  width: 25px;
  height: 25px;
  color: white;
  cursor: pointer;
}

.property-keyframe-button:hover {
  background-color: var(--old-background);
}

.property-keyframe-button svg {
  width: 100%;
  height: 100%;
  color: currentColor;
}

.property-keyframe-button-direction { visibility: hidden; }

.property-value.active .property-keyframe-button {
  color: yellow;
}

.property-value.active .property-keyframe-button-interpolation {
  visibility: visible;
}

.property-keyframe-button.visible {
  visibility: visible;
}

.app-bottom {
  height: calc(var(--bottom-height) - 6px);
  min-height: 100px;
  background-color: var(--app-inner-inner-background);
}

.bottom-bar {
  height: 40px;
  background-color: var(--app-inner-background);
  color: white;
  user-select: none;
}

.bottom-button {
  height: 100%;
  cursor: pointer;
  vertical-align: middle;
}

.bottom-button.pushed {
  background-color: #ffffff40;
}

.bottom-button:hover {
  background-color: #ffffff60;
}

.bottom-button.pushed:hover {
  background-color: #ffffff80;
}

.axis-select-container {
  display: inline-block;
  vertical-align: middle;
}

.axis-select-container-title {
  display: inline-block;
  height: 100%;
  vertical-align: middle;
}

.axis-select {
  display: inline-block;
  vertical-align: middle;
}

.axis-select .axis:first-child {
  border-radius: 10px 0px 0px 10px;
}

.axis-select .axis:last-child {
  border-radius: 0px 10px 10px 0px;
}

.axis {
  display: inline-block;
  padding: 3px 9px;
  background-color: var(--menu-button-closed-background);
  cursor: pointer;
}

.axis:hover {
  background-color: var(--button-hover);
  color: black;
}

.axis.axis-x:hover { color: red; }
.axis.axis-y:hover { color: limegreen; }
.axis.axis-z:hover { color: blue; }

.axis.selected {
  background-color: #ffffff80;
}

.dynamic-editor-container {
  height: 100%;
  overflow-x: scroll;
  position: relative;
  user-select: none;
}

.dynamic-editor {
  height: 100%;
  border-spacing: 0;
}

.dynamic-editor td {
  padding: 0;
}

.dynamic-ruler {
  background-color: var(--input-background);
}

.dynamic-ruler td {
  height: 10px;
  border-bottom: 1px solid black;
}

.dynamic-editor td:not(.dynamic-editor-label) {
  width: 60px;
  border-right: 1px solid black;
}

.dynamic-editor td.spacer > * {
  width: 129px;
  z-index: 0;
}

.dynamic-editor-label {
  color: white;
  background-color: #2d2a3bd5;
  text-align: center;
  font-family: Helvetica;
  width: 105px;
  z-index: 4;
}

.dynamic-editor td:not(.dynamic-ruler td):not(.dynamic-editor-label) {
  background: repeating-conic-gradient(hsla(0, 1%, 31%, 0.5) 0% 25%, rgba(110, 110, 110, 0.5) 0% 50%) 50% / 26px 25.2px;
  z-index: 1;
  position: relative;
}

.app-input {
  width: 100px;
  border: 1px solid var(--input-border);
  height: 30px;
  text-indent: 4px;
  background-color: var(--input-background);
  font-size: 15pt;
}

.element-placement {
  position: absolute;
  top: 24px;
  left: 223px;
}

.marker {
  display: inline-block;
  width: 14px;
  height: 14px;
  position: absolute;
  left: 0px;
  cursor: e-resize;
  z-index: 3;
  opacity: 1;
}

.marker.event {
  background-color: violet;
  border-radius: 50px;
  top: 5px;
  /* Each row downwards is 24px. To show halfway, (24/2) + (14/2) */
}

.marker.motion {
  background-color: red;
  transform: rotate(45deg);
  top: 90px;
}

.marker.motion[axis="0"]:not(.disabled) {background-color: red;}
.marker.motion[axis="1"]:not(.disabled) {background-color: limegreen;}
.marker.motion[axis="2"]:not(.disabled) {background-color: blue;}

.element-placement.all-axes .marker.motion[axisdisplay="012"]:not(.disabled):not(.selected) { background: linear-gradient(45deg,rgba(255, 0, 0, 1) 0%, rgba(255, 0, 0, 1) 37%, rgba(0, 255, 0, 1) 37%, rgba(0, 255, 0, 1) 63%, rgba(0, 0, 255, 1) 63%, rgba(0, 0, 255, 1) 100%); }
.element-placement.all-axes .marker.motion[axisdisplay="01"]:not(.disabled):not(.selected) { background: linear-gradient(45deg,rgba(255, 0, 0, 1) 0%, rgba(255, 0, 0, 1) 50%, rgba(0, 255, 0, 1) 50%, rgba(0, 255, 0, 1) 100%); }
.element-placement.all-axes .marker.motion[axisdisplay="12"]:not(.disabled):not(.selected) { background: linear-gradient(45deg,rgba(0, 255, 0, 1) 0%, rgba(0, 255, 0, 1) 50%, rgba(0, 0, 255, 1) 50%, rgba(0, 0, 255, 1) 100%); }
.element-placement.all-axes .marker.motion[axisdisplay="02"]:not(.disabled):not(.selected) { background: linear-gradient(45deg,rgba(255, 0, 0, 1) 0%, rgba(255, 0, 0, 1) 50%, rgba(0, 0, 255, 1) 50%, rgba(0, 0, 255, 1) 100%); }

.marker.motion[domain="Head"] {top: 32px}
.marker.motion[domain="LeftArm"] {top: 57px}
.marker.motion[domain="RightArm"] {top: 82px}
.marker.motion[domain="Body"] {top: 107px}
.marker.motion[domain="LeftLeg"] {top: 132px}
.marker.motion[domain="RightLeg"] {top: 157px}
.marker.motion[domain="rotations"] {top: 182px}
.marker.motion[domain="scale"] {top: 207px}

/*.marker.motion::before {
  content: 'x';
  display: inline-block;
  text-align: center;
  transform: rotate(-45deg) translate(66%, -10%);
}*/

.marker.background {
  opacity: 0.1;
  cursor: default;
  z-index: 2;
}

.marker.selected {
  opacity: 1;
  outline: 1px solid yellow;
  z-index: 4;
  /*filter: drop-shadow(0px 0px 1px #FFFFFF);*/
}

.marker.disabled {
  background-color: #262626;
  z-index: 2;
}

/*.marker::before {
  content: ' ';
  display: inline-block;
  background-color: inherit;
  width: 60px;
  height: 11px;
  position: absolute;
  transform: translate(0%, -50%);
  top: 50%;
  right: 0;
  z-index: -1;
  opacity: 0.6;
}

.marker.motion::before {
  transform: rotate(-45deg);
  top: calc(200% - 5px);
  right: -1px;
}*/

.cursor {
  height: calc(var(--bottom-height) - 58px);
  width: 4px;
  background-color: var(--cursor-color);
  position: absolute;
  z-index: 2;
  left: 228px;
  top:0;
  display: inline-block;
  cursor: ew-resize;
}

.cursor::after {
  content: ' ';
  display: inline-block;
  width: 50px;
  height: 20px;
  background-color: transparent;
  position: absolute;
  transform: translate(-50%, 0%);
  left: 50%;
}

.cursor-indicator {
  background-color: var(--cursor-color);
  color: white;
  padding: 0px 4px;
  position: absolute;
  transform: translate(-50%, 0%);
  display: none;
  text-wrap: nowrap;
}

.cursor-indicator::before {
  content: ' ';
  display: inline-block;
  background-color: var(--cursor-color);
  width: 20px;
  height: 20px;
  position: absolute;
  bottom: 0;
  left: calc(50% + 2px);
  transform: translate(-50%, 9px) rotate(45deg);
  z-index: -1;
}

.cursor:hover .cursor-indicator {
  display: unset;
}

.deletebutton {
  height: 32px;
  image-rendering: pixelated;
  cursor: pointer;
}

.deletebutton:hover {
  filter: drop-shadow(2px 2px 6px white)
}

.drag-selection {
  background-color: #0074ff30;
  position: absolute;
  z-index: 6;
  border: 1px solid #0074ff;
  border-radius: 3px;
}

.row-highlighter {
  height: 25px;
  width: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: rgba(255, 255, 255, 0.15);
  z-index: 0;
}

.overlay {
  background-color: #00000088;
  width: 100%;
  height: 100%;
  position: fixed;
  top: 0;
  z-index: 20;
}

.modal {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 450px;
  transform: translate(-50%, -50%);
  z-index: 21;
  background-color: var(--app-inner-background);
  text-align: center;
  color: white;
  outline: 2px solid var(--input-background);
}

.modal .title-bar {
  width:100%;
  background-color: var(--app-inner-inner-background);
  border-spacing: 0;
  text-align: center;
}

.modal .title-bar .close-button {
  cursor: pointer;
  user-select: none;
  min-width: 15px;
}

.modal .title-bar .close-button:hover {
  background-color: white;
  color: black;
}

.modal-input {
  height: unset;
  font-size: 13pt;
  width: 75px;
}

#context-menu {
  color: white;
  z-index: 19;
  border-top: unset;
  opacity: 0.8;
  user-select: none;
}

#context-menu li:hover {
  opacity: 1;
}

@media only screen and (max-height: 650px) {
  .app-right {
    position: absolute;
    right: 0;
    z-index: 5;
    height: calc(100% - 37px);
  }
}

@media only screen and (max-width: 1300px) {
  .app-right {
    width: 500px;
    position: absolute;
    right: 0;
  }
  
  .app-left {
    width: calc(100% - 500px);
  }
}

@media only screen and (max-width: 750px) {
  .app-left {
    width: 100%;
  }
  
  .app-right {
    width: 100%;
    height: calc(100vh - 230px);
    z-index: unset;
  }
  
  .inPlayback .app-right {
    display: none;
  }
}