/* Allow dat.GUI function labels to be full-width */
.function div span {
    width: 100% !important;
}

.dat-info-box {
    line-height: 20px !important;
    height: 20px !important;
    display: grid;
    justify-content: left;
    grid-gap: 1em;
    grid-auto-flow: column; /* somehow puts items in a row */
}

/* don't set height to 20px when closed */
.closed .dat-info-box {
    height: 0!important;
}

.half-button {
    display: inline-block;
    margin-bottom: -4px;
    box-sizing: border-box;
}

/* when closed, half-buttons should go back to block display */
/* Also, it shouldn't have any negative margin. That makes its parent sink weirdly */
.closed .half-button{
    display: block !important;
    margin-bottom: 0;
}

.half-button div {
    display: grid;
    grid-template-columns: auto 27px;
}

.half-button div span {
    grid-column: 1 / span 1;
    width: 100% !important;
}

.half-button div div {
    grid-column: 2 / span 1;
}

.c input[type=checkbox] {
    width: 19px;
    height: 19px;
    margin-top: 4px !important;
    margin-right: 2px !important;
}

#structure-gui {
    position: absolute;
    padding-bottom: 8em;
    left: 0;
    bottom: 0;
    z-index: 2;
}

#command-gui {
    position: absolute;
    right: 0;
    top: 0;
    z-index: 2;
}

#selection-info {
    position: absolute;
    right: 0;
    bottom: 100px;
    z-index: 2;
    background-color: #ffffffaa;
    box-shadow: 0 0 10px #0003;
}

#info-head {
    padding: 0;
}

#info-head-structure {
    padding: 0.5em 1em 0.25em 1em;
    background-color: #ffffffbb;
}

#info-head-name {
    padding: 0.25em 1em 0.5em 1em;
    background-color: #ffffff77;
}

#info-body {
    display: grid;
    grid-template-columns: 30% auto;
    grid-template-rows: 100%;
    grid-gap: 1em;
    padding-left: 1em;
    padding-right: 1em;
}

#info-body div {
    white-space: nowrap;
}

#info-body-field-names {
    text-align: right;
    overflow-x: scroll;
}

#info-body-field-values {
    overflow-x: scroll;
}


#messages {
    color: #777;
    width: 100%;
    height: 4em;
    margin: 0;
    padding: 1em;
    overflow-y: scroll;
    z-index: 1;
    position: absolute;
    left: 0;
    bottom: 0;
}

#messages div:first-child {
    color: #1b1f8a;
}

.warning {
    color: #770000;
}


/* https://loading.io/css/ */

.lds-roller {
  display: inline-block;
  position: relative;
  width: 80px;
  height: 80px;
  z-index: 5;
}
.lds-roller div {
  animation: lds-roller 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
  transform-origin: 40px 40px;
}
.lds-roller div:after {
  content: " ";
  display: block;
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #1b1f8a66;
  margin: -4px 0 0 -4px;
}
.lds-roller div:nth-child(1) {
  animation-delay: -0.036s;
}
.lds-roller div:nth-child(1):after {
  top: 63px;
  left: 63px;
}
.lds-roller div:nth-child(2) {
  animation-delay: -0.072s;
}
.lds-roller div:nth-child(2):after {
  top: 68px;
  left: 56px;
}
.lds-roller div:nth-child(3) {
  animation-delay: -0.108s;
}
.lds-roller div:nth-child(3):after {
  top: 71px;
  left: 48px;
}
.lds-roller div:nth-child(4) {
  animation-delay: -0.144s;
}
.lds-roller div:nth-child(4):after {
  top: 72px;
  left: 40px;
}
.lds-roller div:nth-child(5) {
  animation-delay: -0.18s;
}
.lds-roller div:nth-child(5):after {
  top: 71px;
  left: 32px;
}
.lds-roller div:nth-child(6) {
  animation-delay: -0.216s;
}
.lds-roller div:nth-child(6):after {
  top: 68px;
  left: 24px;
}
.lds-roller div:nth-child(7) {
  animation-delay: -0.252s;
}
.lds-roller div:nth-child(7):after {
  top: 63px;
  left: 17px;
}
.lds-roller div:nth-child(8) {
  animation-delay: -0.288s;
}
.lds-roller div:nth-child(8):after {
  top: 56px;
  left: 12px;
}
@keyframes lds-roller {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
