/* 
Copyright 2022 The Manifold Authors.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License. 
*/

html {
  height: 100%;
}

body {
  margin: 0;
  height: 100%;
  overflow: hidden;
  font-family: 'Rubik', sans-serif;
  font-size: 24px;
  line-height: 24px;
  font-weight: 800;
  -webkit-font-smoothing: antialiased;
}

button {
  display: block;
  padding: 0 1em;
  cursor: pointer;
  height: 36px;
  border: none;
  border-radius: 18px;
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

a:link,
a:visited {
  color: black;
  text-decoration: underline;
}

a:hover,
a:active {
  color: black;
  text-decoration: none;
}

button:disabled {
  color: black;
  background-color: #eee !important;
  cursor: auto;
}

button:hover {
  filter: brightness(0.9);
}

.name {
  border: none;
  height: 36px;
  background-color: transparent;
  font-family: 'Rubik', sans-serif;
  font-size: 16px;
  line-height: 24px;
  font-weight: 800;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

.name:focus {
  outline: none;
}

p {
  margin: 8px;
  text-align: left;
}

model-viewer {
  position: relative;
  flex: 3;
  width: 100%;
  background-color: #fff;
}

#console {
  flex: 1;
  min-height: 0;
  /* draggable pane dividers */
  max-height: none;
  /* draggable pane dividers-end */
  overflow-y: scroll;
  background-color: #fff;
  white-space: pre-wrap;
  font-size: 14px;
  font-weight: 100;
  line-height: 20px;
  padding: 8px;
}

.page {
  /* draggable pane dividers */
  --left-pane: 50%;
  --viewer-pane: 75%;
  /* draggable pane dividers-end */

  
  height: 100vh;
  display: flex;
  flex-direction: column;
}


/* draggable pane dividers */
.workbench {
  min-height: 0;
}
 /* draggable pane dividers-end */


.container {
  display: flex;
}

.col {
  position: relative;
  width: 50vw;
}
/* draggable pane dividers-start */
.pane-left {
  width: auto;
  flex: 0 0 var(--left-pane);
  min-width: 220px;
}

.pane-right {
  width: auto;
  flex: 1 1 auto;
  min-width: 220px;
  min-height: 0;
}

#viewer {
  flex: 0 0 var(--viewer-pane);
  min-height: 140px;
}

.splitter {
  flex: 0 0 8px;
  background: #d8c5e5;
  touch-action: none;
}

.splitter:hover {
  filter: brightness(0.9);
}

.splitter-x {
  cursor: col-resize;
}

.splitter-y {
  cursor: row-resize;
}
/* draggable pane dividers-end */



.center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
}

.header {
  background-color: #A288B3;
}

.header .margin {
  font-size: 16px;
  margin: 8px;
}

.dropdown {
  display: none;
  position: absolute;
  z-index: 1;
  width: 100%;
  max-height: 85dvh;
  overflow: auto;
    /* Scrollbar styles for Firefox */
  scrollbar-width: thin;
  scrollbar-color: #777 transparent;
}
  
/* Minimal, borderless scrollbar for dropdown (Windows/Chrome/Edge/Safari) */
.dropdown::-webkit-scrollbar {
  width: 8px;
  background: transparent;
  border: none;
}

.dropdown::-webkit-scrollbar-thumb {
  background: #777;
  border-radius: 8px;
  border: none;
}

.dropdown::-webkit-scrollbar-track {
  background: transparent;
  border: none;
}

.monaco-editor .monaco-scrollable-element > .scrollbar {
    z-index: 0 !important; 
}

.show {
  display: block;
}

.hide {
  display: none;
}

.uparrow {
  display: inline-block;
  position: relative;
  border: solid black;
  border-width: 0 3px 3px 0;
  padding: 3px;
  transform: rotate(-135deg);
}

.down {
  transform: rotate(45deg);
}

.item {
  width: 100%;
  position: relative;
}

#fileDropdown .item > button.item {
  /* Keep room on the right for the trash icon. */
  width: 100%;
  padding-right: 42px;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

#fileDropdown .item > button.item > span {
  display: block;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.top-edit {
  display: inline-block;
  vertical-align: middle;
  height: 36px;
  top: 18px;
  border: none;
  border-radius: 18px;
  -webkit-border-radius: 18px;
  -moz-border-radius: 18px;
  -ms-border-radius: 18px;
  -o-border-radius: 18px;
}

.top-icon {
  display: inline-block;
  vertical-align: middle;
  width: 36px;
  background-size: 24px;
  background-repeat: no-repeat;
  background-position: center;
  background-color: transparent;
}

.squish {
  margin-right: -8px;
}

.icon {
  display: inline-block;
  background-color: transparent;
  position: absolute;
  width: 36px;
  top: 0px;
  right: 0px;
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: center;
}

.undo {
  background-image: url(/icons/undo.png);
}

.redo {
  background-image: url(/icons/redo.png);
}

.star {
  background-image: url(/icons/star.png);
}

.share {
  background-image: url(/icons/share.png);
}

.docs {
  background-image: url(/icons/docs.png);
  width: 36px;
  height: 36px;
  cursor: pointer;
  border: none;
  border-radius: 18px;
  -webkit-border-radius: 18px;
  -moz-border-radius: 18px;
  -ms-border-radius: 18px;
  -o-border-radius: 18px;
}

.edges {
  background-image: url(/icons/edges.png);
}

.cancel {
  background-image: url(/icons/close.png);
  background-size: 20px;
  background-repeat: no-repeat;
  background-position: center;
}

.edit {
  background-image: url(/icons/pencil.png);
}

.trash {
  background-image: url(/icons/trash.png);
}

.play {
  background-image: url(/icons/play.png);
}

.pause {
  background-image: url(/icons/pause.png);
}

.icon:hover {
  box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.1);
}

.top-icon:hover {
  box-shadow: inset 0 0 0 100px rgba(0, 0, 0, 0.1);
}

.blue {
  background-color: rgb(148, 221, 255);
}

.green {
  background-color: rgb(131, 255, 131);
}

.red {
  background-color: rgb(255, 177, 177);
}

#file-margin {
  position: relative;
  width: 250px;
}

#file {
  display: flex;
  align-items: center;
  white-space: nowrap;
  overflow: hidden;
  width: 100%;
}

#current {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#current.renaming {
  /* While typing, show full text (no three dots). */
  overflow: visible;
  text-overflow: clip;
}

#save {
  width: 125px;
}

#animation {
  display: none;
  align-items: center;
  position: absolute;
  width: 100%;
  bottom: 0px;
  margin: 2px;
}

#play {
  position: relative;
  background-color: #0004;
  margin: 8px;
}

.slider {
  position: relative;
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 5px;
  margin-right: 16px;
  background: #0002;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #0004;
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #ccc;
  cursor: pointer;
}

/* draggable pane dividers */
@media only screen and (max-width: 820px) {
  .container {
    flex-direction: column;
    width: 100%;
  }
  .splitter {
    display: none;
  }
  .col {
    width: 100%;
    height: 50%;
  }
  .pane-left,
  .pane-right {
    min-width: 0;
  }
  /* draggable pane dividers-end */


  #file-margin {
    width: calc(100% - 32px);
    max-width: 360px;
  }

  p {
    margin: .2em 1em;
    text-align: center;
  }

  .header .margin {
    margin: 0.2em 16px;
  }

  #button-container {
    flex-direction: row;
    margin-left: 8px;
    margin-right: 8px;
    width: calc(100% - 16px);
  }

  #button-container .margin {
    width: calc(50% - 16px);
    margin: 8px;
  }
}