/* General */
.section > .content .right-side, .section > .content .left-side {
  flex-basis: 50%
}

.side-panel {
  position: absolute;
  height: 100%;
  background-color: #262626;
  font-size: 12px;
}

#right-panel {
  right: 0;
  width: 330px;
}

.section > * {
  padding: 8px 10px 0;
  margin-bottom: 20px;
}

.section > h4 {
  background-color: #3c3c3c;
  color: #e3e3e3;
  font-size: 14px;
  font-weight: normal;
  padding-top: 6px;
  padding-bottom: 6px;
  margin-bottom: 0;
  padding-left: 34px;
}

/* General - checkbox wrapper */
.checkbox-wrapper > input[type="checkbox"] {
  margin-right: 4px;
}

.checkbox-wrapper > input[type="checkbox"] + label {
  line-height: 1.2;
}

.checkbox-wrapper {
  display: flex;
}

/* General - color picker */
.color-picker-field-wrapper > label {
  flex-basis: 30%;
  margin-bottom: 0;
  line-height: 1.2;
}

.color-picker-field-wrapper {
  display: flex;
}

.color-picker-field-wrapper > label +* {
  flex-basis: 70%;
}

.color-picker-field-wrapper > label +* > * {
  width: calc(100% - 6px);
  border: none;
  outline: none;
  margin-left: 6px;
}

/* General - show section */

.section input:not(:checked) + * + .content {
  display: none !important;
}

.section > input[type="checkbox"] {
  position: absolute;
  top: 0;
  left: 0px;
  height: 30px;
  width: 100%;
  opacity: 0;
  z-index: 1;
  cursor: pointer;
}

.section {
  position: relative;
}

.section > .collapse-sign {
  position: absolute;
  top: 0;
  left: 0;
}

.section > .collapse-sign > * {
  position: relative;
  font-size: 14px;
  top: -2px;
}

.section > input:not(:checked) + .collapse-sign .fa-chevron-down {
  display: none;
}

.section > input:checked + .collapse-sign .fa-chevron-right {
  display: none;
}


/* Menu open and close */

#toggle-close-menu {
  position: absolute;
  top: 20px;
  right: 100%;
  display: flex;
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
  font-size: 14px;
  align-items: center;
}

.side-panel > .panel-content {
  overflow-y: scroll;
  max-height: 100%;
}

#right-panel.closed {
  width: 0;
}

#toggle-close-menu .button-text::before {
  content: "Tutup";
}

#right-panel.closed #toggle-close-menu .button-text::before {
  content: "Menu";
}

#right-panel.closed #toggle-close-menu .fa-chevron-right {
  display: none;
}

#right-panel:not(.closed) #toggle-close-menu .fa-chevron-left {
  display: none;
}





/* Help section */

#help {
  max-height: 300px;
  overflow-y: scroll;
}

#help h3 {
  font-size: 14px;
  border-bottom: 1px solid #989898;
  padding-bottom: 8px;
}

#help ul {
  padding-left: 22px;
}

#help code {
  font-size: 12px;
  padding: 1px 4px;
  background-color: #16171b;
  color: #7f91ff;
}

#help strong {
  color: white;
  letter-spacing: 0.02rem;
  font-weight: 600;
}

/* quick tool section */

#view-as-buttons {
  display: flex;
}

#view-as-buttons > * {
  width: calc((100% - 8px * 2) / 3);
  margin-right: 8px;
  background-color: #262626;
  color: #dedede;
  padding-bottom: 9px;
}

button.change-view span {
  display: block;
  line-height: 1.2;
}

#view-as-buttons > *:hover {
  background-color: #3a3a3a;
}


/* Animation section */
#animation-section .content {
  display: flex;
}

#animation-section .right-side {
  flex-grow: 1;
}

.section label {
  margin-bottom: 5px;
}

/* Button */
.btn.r-btn {
  padding: 2px 9px;
  font-size: 12px;
}

.btn.r-btn > i {
  margin-right: 8px;
}

/* View section */
#view-section .content {
  display: flex;
}

#view-section .content > * {
  flex-basis: 50%;
}

#shading-mode-choices > * {
  display: flex;
  width: 112px;
  text-align: left;
  border: 1px solid #464646;
  background-color: #1d1d1d;
  color: #b4b4b4;
  padding-top: 3px;
  padding-bottom: 3px;
  transition: all 0.2s ease;
  transition-property: color, background-color;
  align-items: center;
}

#shading-mode-choices > *:first-child {
  border-bottom: none;
  border-top-left-radius: 3px;
  border-top-right-radius: 3px;
}

#shading-mode-choices > * > img {
  margin-right: 8px;
}

#shading-mode-choices > *:last-child {
  border-bottom-left-radius: 3px;
  border-bottom-right-radius: 3px;
}

#shading-mode-choices > *.selected {
  background-color: #626262;
  color: white;
  font-weight: bold;
  letter-spacing: 0.03em;
}

#shading-mode-choices > *:hover {
  background-color: #434343;
}

#shading-mode-choices > .selected:hover {
  background-color: #858585;
}

#object-perspective-menu {
  margin-top: 8px;
}

#object-perspective-menu > label {
  margin-bottom: 0;
}

/* Selected object section */
#selected-section {
  overflow: hidden;
}

#selected-section > .content {
  margin-top: 4px;
}

#selected-utils button {
  margin-right: 8px;
}

#selected-transformational {
  display: flex;
  width: calc(100% + 12px);
  margin-top: 8px;
  margin-right: -12px;
}

#selected-transformational > * {
  display: inline-grid;
  margin-right: 12px;
  grid-template-columns: 10px auto;
  grid-row-gap: 2px;
  grid-column-gap: 3px;
  flex-basis: 33%;
}

#selected-transformational > * > .title-label {
  grid-column: 1 / span 2;
}

#selected-section.no-selection .content > *:not(.no-selection-text) {
  display: none;
}

#selected-section:not(.no-selection) .no-selection-text {
  display: none;
}

#selected-section .no-selection-text {
  font-style: italic;
  color: #ffffff69;
}

/** Light setup */
#light-section .subsection > .left-panel {
  margin-right: 4px;
}

#light-section .subsection.flex {
  display: flex;
}

#light-section .subsection.flex > * {
  flex-basis: 50%;
}

#light-section .subsection > .right-panel {
  margin-left: 4px;
}

#light-section .light-setup > h5 {
  font-size: 14px;
  margin-top: 6px;
}

#light-section > .content > .subsection:first-child {
  border-top: none;
}

#light-section > .content > .subsection {
  border-top: 1px solid #ffffff36;
  padding-top: 5px;
  padding-bottom: 5px;
  position: relative;
}

.subsection.light-setup > button {
  position: absolute;
  right: 0;
  top: 6px;
}

.two-panel-wrapper {
  display: flex;
  padding-top: 7px;
}

.two-panel-wrapper > * {
  flex-basis: 50%;
}

#light-section .two-panel-wrapper > .left-panel {
  flex-basis: 40%;
  margin-right: 12px;
}

#light-section .two-panel-wrapper > .right-panel {
  flex-basis: 60%;
  padding-top: 3px;
}

/* R Slider */
.r-slider-container {
  width: 100%;
  background-color: #494949;
  min-height: 23px;
  overflow: hidden;
  position: relative;
  border: 1px solid #262626;
  border-radius: 4px;
}

.r-slider-container > * {
  position: absolute;
  height: 100%;
  outline: none;
  border: none;
}

.r-slider-progress {
  width: 100%;
  background-color: #717171;
}

.r-slider-container input:focus {
  background-color: #c6c6c6;
  color: black;
}

.r-slider-container > .r-slider-obstructor {
  cursor: w-resize;
  width: 100%;
}

.r-slider-container.grabbing > .r-slider-obstructor {
  cursor: w-resize;
}

.r-slider-container.grabbing input {
  user-select: none;
}

.r-slider-container input::-webkit-outer-spin-button, .r-slider-container input::-webkit-inner-spin-button {
  /* display: none; <- Crashes Chrome on hover */
  -webkit-appearance: none;
  margin: 0;
  /* <-- Apparently some margin are still there even though it's hidden */
}

.r-slider-container input {
  -moz-appearance: textfield;
  /* Firefox */
  width: 100%;
  text-align: center;
  background-color: transparent;
  border: none;
  color: #efefef;
}

.r-slider-container input:focus {
  background-color: #676767;
  color: white;
}

.r-slider-container > .r-slider-prev, .r-slider-container > .r-slider-next {
  display: none;
  outline: none;
  border: none;
  color: #ffffffa6;
  background: none;
}

/* Display next & prev step only if not typing text */
.r-slider-container:not(.grabbing):not([data-disabled]):hover > input:not(:focus) + * + .r-slider-prev, .r-slider-container:not(.grabbing):not([data-disabled]):hover > input:not(:focus) + * + * +.r-slider-next {
  display: block;
}

.r-slider-container > .r-slider-next {
  right: 0;
}

.r-slider-container > .r-slider-prev:hover, .r-slider-container > .r-slider-next:hover {
  color: white;
  background-color: #ffffff36;
}

/* Disabled style */
.r-slider-container[data-disabled] {
  background-color: #393939;
}

.r-slider-container[data-disabled] input {
  color: #ffffff6b;
}

.r-slider-container[data-disabled] .r-slider-progress {
  background-color: #535353;
}

.r-slider-container[data-disabled] .r-slider-obstructor {
  cursor: initial;
}

.r-slider-container[data-disabled]:hover .r-slider-prev, .r-slider-container[data-disabled]:hover .r-slider-next {
  display: none;
}
