html, body {
  margin: 0;
  padding: 0;
  font-family: 'Raleway', sans-serif;
  background: #F5F5F5;
  height: 100%;
  overflow: hidden;
}

* {
  font-family: 'Raleway', sans-serif;
  box-sizing: border-box;
}

body {
  display: flex;
  flex-direction: column;
}

.wrap {
  display: flex;
  width: 100vw;
  flex-grow: 1;
  position: relative;
}

.dropzone {
  display: flex;
  flex-grow: 1;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.placeholder {
  width: 100%;
  max-width: 500px;
  border-radius: 0.5em;
  background: #EEE;
  padding: 2em;
  text-align: center;
}

.placeholder p {
  font-size: 1.2rem;
  color: #999;
}

.viewer {
  width: 100%;
  height: 100%;
  flex-grow: 1;
  flex-shrink: 1;
  position: absolute;
  top: 0;
}

/******************************************************************************
 * Header
 */

.preview {
  width: auto;
  height: 100%;
  flex-grow: 1;
  flex-shrink: 1;
  position: absolute;
  top: 0;
}

.header {
  display: flex;
  background: #353535;
  padding: 0 2em;
  height: 4rem;
/*  line-height: 4rem;*/
  align-items: center;
  overflow-x: hidden;
  overflow-y: hidden;
  white-space: nowrap;
  box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.3);
  z-index: 1;

  -webkit-app-region: drag;
}

.menu {
  height: auto;
  min-height: 3rem;
  background: #454545;
  overflow: visible;
  flex-wrap: wrap;
  padding-bottom: 7px;
}

.header .h1,
.header .item,
.header .separator {
  color: #F5F5F5;
  font-weight: 300;
/*  line-height: 4rem;*/
  margin: 0;
}

.header .h1 {
  color: #F5F5F5;
  font-size: 1.4rem;
  cursor: pointer;
  background-color: transparent;
  border: 0;
  padding: 0;
}

.header .h1 img {
  border-image: 0;
}
.header .item {
  padding: 0 0.8em;
  margin-top: 7px;
  font-size: 0.8rem;
  text-decoration: none;
  color: #F5F5F5;
  transition: background ease 0.2s;

  -webkit-app-region: no-drag;
}

/* prevent selection on fast clics in toggle menu labels */
.header label.item {
  -webkit-touch-callout: none; /* iOS Safari */
    -webkit-user-select: none; /* Safari */
     -khtml-user-select: none; /* Konqueror HTML */
       -moz-user-select: none; /* Firefox */
        -ms-user-select: none; /* Internet Explorer/Edge */
            user-select: none; /* Non-prefixed version, currently
                                  supported by Chrome and Opera */
}

.header .item a {
  font-size: 0.8rem;
  text-decoration: none;
  color: #F5F5F5;
 
}

.header button.item:hover,
.header label.item:hover {
  background: #fff;
}

.header .item img {
  height: 28px;
  margin-bottom: -7px;
}

.header .item svg {
  height: 28px;
  margin-bottom: -9px;
}

.header .item .icon {
  font-size: 1.2rem;
  margin-bottom: 0;
}

.header button.item,
.header label.item,
.header div.item {
  position: relative;
  height: 34px;
  line-height: 35px;
  border: 0;
  background: #ffc107;
  color: #333;
  font-weight: 500;
  border-radius: 2px;
  cursor: pointer;
  margin-right: 0.5em;
}

.header .item-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.header .item-flex {
  display: flex;
  flex-direction: row;
  align-items: center;
}

.header .item-flex .title {
  display: inline-flex;
  flex-direction: column;
  margin-left: 6px;
}

.header .item-flex .name {
  line-height: 1.2em;
}

.header .item-flex .version {
  line-height: 1em;
  font-size: 0.9em;
}

.header label.menu-close {
  padding: 0 4px;
}

.header button.checked,
.header label.checked {
  background: #ffe1a7;
  margin-bottom: -20px;
  height: 50px;
}

.header button.item:hover,
.header label.item:hover {
  color: #000;
}

.header .separator {
  margin: 0 0.2em;
  opacity: 0.2;
}

.header .h1 + .separator,
.header .h1 + .item {
  padding-left: 1em;
}

.flex-grow {
  flex-grow: 1;
}

/******************************************************************************
 * Tools GUI
 */

.gui-wrap {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  overflow: auto;
  pointer-events: none;
}

.gui-wrap > .main {
  pointer-events: all;
}

.item-tool {
  position: relative;
}

.tools-gui {
  position: absolute;
  top: 39px;
  left: 50%;
  margin-left: -150px;
  z-index: 100;
  display: none;
  padding-top: 8px;
}

.header .item-tool:hover > .tools-gui {
  display: block;
}

.tools-gui:hover {
  display: block;
}

.dg li.gui-stats:not(.folder) {
  height: auto;
}

/******************************************************************************
 * Tools result panel
 */

.panel {
/*  width: 50%; */
  height: 100%;
  position: absolute;
  left: 0%;
  top: 0%;
  min-width: 100px;
  max-width: 500px;
  padding: 0;
  text-align: left;
  flex-direction: column;
  z-index: 1;
}

.panel-header {
  z-index: 2;
  display: flex;
  width: 100%;
  height: 2rem;
  background: rgba(0, 0, 0, 1.0);
  color: #F5F5F5;
  font-weight: bold;
  align-items: center;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  box-shadow: 0px 0px 8px 2px rgba(0, 0, 0, 0.1);
}

.panel-header .item {
  padding: 0 0 0 0.5em;
  font-size: 0.8rem;
  text-decoration: none;
  transition: background ease 0.2s;

  -webkit-app-region: no-drag;
}

.panel-header .item img,
.panel-header .item svg {
  height: 28px;
  margin-bottom: -9px;
}

.panel-header .item .icon {
  font-size: 1.2rem;
}

.panel-header button.item,
.panel-header label.item {
  height: 34px;
  line-height: 35px;
  padding: 0 2px;
  border: 0;
  background: #ffc107;
  color: #333;
  font-weight: 500;
  cursor: pointer;
  margin-left: 0.5em;
}

.panel-header button.item:hover,
.panel-header label.item:hover {
  color: #000;
  background: #fff;
}

#panel-content {
  z-index: 2;
  display: flex;
  width: 100%;
  min-height: 20%;
  margin: 0;
  padding: .5em 0;
  border-width: 0 0 0 .5em;
  border-style: solid;
  background: rgba(0, 0, 0, 0.85);
  color: #F5F5F5;
  white-space: pre-wrap;
}

.status-wip {
  border-color: rgba(100, 100, 100, 1.0);
}

.status-ok {
  border-color: rgba(0, 200, 0, 1.0);
}

.status-error {
  border-color: rgba(200, 0, 0, 1.0);
}

#panel-content-wrapper {
  z-index: 2;
  width: 100%;
  max-height: 100%;
  margin: 0;
  overflow-y: auto;
}

.gltf-credits {
  font-size: 0.8rem;
  text-decoration: none;
  color: #a2a2a2;
}

.gltf-credits a {
  text-decoration: none;
  color: #a2a2a2;
}

span.gltf-author,
a.gltf-author {
  font-size: 1rem;
  text-decoration: none;
  color: #FFFFFF;
}

/******************************************************************************
 * Responsive layout
 */

@media screen and (max-width: 543px) {
  .hidden-xs-down {
    display: none;
  }
}

@media screen and (max-width: 767px) {
  .header {
    font-size: 1em;
    padding: 0 0.5em;
  }

  .menu {
    padding-bottom: 7px;
  }

  .hidden-sm-down {
    display: none;
  }
}

@media screen and (max-width: 991px) {
  .hidden-md-down {
    display: none;
  }
}

@media screen and (max-width: 1199px) {
  .hidden-lg-down {
    display: none;
  }
}

@media screen and (max-width: 1899px) {
  .hidden-xl-down {
    display: none;
  }
}

/******************************************************************************
 * Upload Button
 *
 * https://tympanus.net/Tutorials/CustomFileInputs/
 */

.upload-btn {
  margin-top: 2em;
}

.upload-btn input {
  width: 0.1px;
  height: 0.1px;
  opacity: 0;
  overflow: hidden;
  position: absolute;
  z-index: -1;
}

.upload-btn label {
  color: #353535;
  border: 0;
  border-radius: 3px;
  transition: ease 0.2s background;
  font-size: 1rem;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
  display: inline-block;
  overflow: hidden;
  padding: 0.625rem 1.25rem;
}

.upload-btn label:hover {
  background: #DDD;
}

.upload-btn svg {
  width: 1em;
  height: 1em;
  vertical-align: middle;
  fill: currentColor;
  margin-top: -0.25em;
  margin-right: 0.25em;
}


/******************************************************************************
 * Validation report
 */

.report {
  padding: 2em;
  max-width: 860px;
}

.report h1 {
  margin-top: 0;
}

.report p,
.report ul {
  line-height: 1.5em;
}

.report-table {
  text-align: left;
  border-collapse: collapse;
  width: 100%;
}

.report-table thead tr {
  background: #404040;
  color: #FFF;
}

.report-table th,
.report-table td {
  padding: 0.5em 1em;
}

.report-table tr:nth-child(2n) {
  background: #F0F0F0;
}

/******************************************************************************
 * Validation toggle
 */

.report-toggle-wrap.hidden { display: none; }

.report-toggle {
  cursor: pointer;
  display: flex;
  position: absolute;
  bottom: 0;
  left: 20px;
  height: 30px;
  box-shadow: 0px 0px 5px 0 rgba(0, 0, 0, 0.25);
  background: #FFF;
  box-sizing: border-box;

  color: #f0f0f0;
  background: #000;
  border-left: 6px solid #000;
}

.report-toggle.level-1 { color: #444; background: #ffeda0; border-left-color: #feb24c; }
.report-toggle.level-0 { color: #444; background: #f4c2be; border-left-color: #b10026; }

.report-toggle-text {
  line-height: 32px;
  padding: 0 0.5em;
  font-weight: 300;
  font-size: 0.8em;
}

.report-toggle-close {
  width: 30px;
  height: 30px;
  line-height: 30px;
  font-size: 1.5em;
  text-align: center;
}

/******************************************************************************
 * CSS Spinner
 *
 * http://tobiasahlin.com/spinkit/
 */

.spinner {
  width: 40px;
  height: 40px;
  position: absolute;
  left: 50%;
  top: 50%;
  margin: -20px;

  background-color: #333;

  border-radius: 100%;
  -webkit-animation: sk-scaleout 1.0s infinite ease-in-out;
  animation: sk-scaleout 1.0s infinite ease-in-out;
}

@-webkit-keyframes sk-scaleout {
  0% { -webkit-transform: scale(0) }
  100% {
    -webkit-transform: scale(1.0);
    opacity: 0;
  }
}

@keyframes sk-scaleout {
  0% {
    -webkit-transform: scale(0);
    transform: scale(0);
  } 100% {
    -webkit-transform: scale(1.0);
    transform: scale(1.0);
    opacity: 0;
  }
}

/******************************************************************************
 * Dropdown menus
 *
 * https://tutorialzine.com/2015/08/quick-tip-css-only-dropdowns-with-the-checkbox-hack
 */

.menu-checkbox,
.panel-checkbox,
.kiosk-checkbox {
  display: none;
}

.menu,
.panel {
  display: none;
}

.menu-checkbox:checked + .menu,
.panel-checkbox:checked + .panel {
  display: flex;
}

.kiosk-checkbox:checked + header .menu,
.kiosk-checkbox:checked + header .header .item,
.kiosk-checkbox:checked + header .header .separator,
.kiosk-checkbox:checked ~ main .gui-wrap {
  display: none;
}

.kiosk-checkbox:checked + header,
.kiosk-checkbox:checked + header .top-menu {
  position: absolute;
  background-color: transparent;
  width: 130px;
  box-shadow: none;
}

/******************************************************************************
 * Render JSON
 *
 * https://github.com/caldwell/renderjson
 */

.renderjson {
/*  font-family: 'Raleway', sans-serif;*/
    white-space: pre-wrap;
}

.disclosure {
  color: #FFF;
  font-size: 1.2rem;
  text-decoration: none;
}

.disclosure ~ a {
  color: #FFF;
  font-size: 1rem;
  text-decoration: none;
}

.syntax {
  color: #666;
}

.string {
  color: #2cbb2c;
  font-weight: bold;
}

.number {
  color: #d66;
  font-weight: bold;
}

.boolean {
  color: #66d;
  font-weight: bold;
}

.key {
  color: #c92c2c;
}

.keyword {
  color: #d4d;
}

.object.syntax {
  color: #888;
}

.array.syntax {
  color: #888;
}
