/**
 * Copyright 2023 Undistro 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.
 */

body {
  font-family: "Inter", sans-serif;
  margin: 0;
  padding: 0;
  background-color: #fcfcfc;
}

body.dark {
  background-color: #181a1b;
}

main {
  padding: 24px;
}

a {
  color: #8447d1;
  text-decoration: underline;
}

.dark a {
  color: #9551ec;
}

.cel-logo {
  height: 24px;
}

.navbar {
  background-color: white;
  width: 100%;
  height: 72px;
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0, 0, 0, 0.04);
}

.dark .navbar {
  background-color: #1d1f21;
}

.navbar .title {
  color: #243942;
  font-weight: 500;
  font-size: 1.125rem;
}

.navbar .divider {
  width: 1px;
  height: 1rem;
  background: rgba(0, 0, 0, 0.12);
}

.dark .navbar .divider {
  background-color: #ffffff1f;
}

.navbar .logo {
  display: flex;
  align-items: center;
  padding: 0 1rem;
  padding: 1.5rem;
  text-decoration: none;
}

.navbar .logo > * + * {
  margin-left: 1rem;
}

.navbar span {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-size: 16px;
  letter-spacing: 0.01em;
  color: rgba(0, 0, 0, 0.5);
}

.dark .navbar span {
  color: rgb(255, 255, 255, 0.9);
}

.modes__container-holder {
  min-width: 180px;
}

.navbar .modes__container {
  display: flex;
  align-items: center;
  gap: 1rem;
  overflow: hidden;
  border-radius: 1.5rem;
  border: 1px solid #e0e0e0;
  height: 40px;
}

.dark .navbar .modes__container {
  border-color: #3b3d3f;
}

.modes__container .modes__container-holder,
.modes__container button {
  font-weight: 500;
  font-size: 0.875rem !important;
  line-height: 23.8px;
  font-family: Inter;
}

.modes__container span {
  display: flex;
  padding: 0.5rem 1rem;
}

.modes__container button {
  height: 100%;
  border: none;
  border-left: 1px solid #e0e0e0;
  background-color: rgba(132, 71, 209, 0.04);
  color: #8447d1;
  padding: 0.5rem 1rem;
  cursor: pointer;
}

.dark .modes__container button {
  border-left: 1px solid#3B3D3F;
  color: #b27ef4;
}

.nav-links {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: right;
  gap: 16px;
}

.nav-links > button {
  height: 40px;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 24px;
}

.nav-divider {
  content: "";
  width: 1px;
  height: 24px;
  border-radius: 2px;
  background: rgba(0, 0, 0, 0.16);
}

.dark .nav-divider {
  background-color: #ffffff1f;
}

.share-url__container {
  display: none;
  height: 40px;
  padding-left: 8px;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  border-radius: 4px;
  border: 1px solid #e6e6e6;
  background: #fff;
  position: relative;
}

.dark .share-url__container {
  background: #212426;
  border-color: #34383c;
}

.share-url__input {
  display: flex;
  width: 220px;
  flex-direction: column;
  color: rgba(0, 0, 0, 0.6);
  font-size: 12px;
  font-weight: 500;
  line-height: 24px;
  letter-spacing: 0.12px;
  border: none;
}

.dark .share-url__input {
  background: #212426;
  color: #ffffffe5;
}

.share-url__tooltip {
  color: #3eaa63;
  font-size: 12px;
  font-weight: 500;
  line-height: 120%;
  letter-spacing: 0.12px;
  padding: 4px 8px;
  position: absolute;
  border-radius: 4px;
  background: #e6ebe8;
  right: 0;
  bottom: -30px;
  opacity: 0;
  transition: opacity 0.2s ease-in-out;
}

.share-url__input:focus {
  outline: none;
}

.share-url__copy {
  display: flex;
  height: 100%;
  padding: 8px 12px;
  justify-content: center;
  align-items: center;
  gap: 10px;
  background: #f5f5f5;
  border: none;
  cursor: pointer;
}

.dark .share-url__copy {
  background: #2b2e31;
  color: #b57cfc;
}

.dark .share-url__copy g path {
  fill: #b57cfc;
}

.nav-link {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px;
  gap: 8px;

  background-color: rgba(132, 71, 209, 0.08);
  text-decoration: none;
  color: #8447d1;
}

.dark .nav-link {
  background-color: #8447d13d;
  color: #9551ec;
}

/* Containers */
.editor-container {
  display: grid;
  grid-template-columns: repeat(2, calc(50% - 12px));
  /* 3 * 24px = 72px for padding, 72px for navbar, 32px for footer */
  height: calc(100vh - (3 * 24px) - 72px - 32px);
  gap: 24px;
}

.editor-container > div {
  flex: 1;
}

.output-container {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.output-container > * {
  flex: 1;
}

.editor {
  display: flex;
  flex-direction: column;
  border-radius: 8px;
  border: 1px solid #e3e3e3;
  overflow: hidden;
}

.dark .editor {
  border-color: #2a2d32;
}

.editor__header {
  padding: 1rem;
  border-bottom: 1px solid #e3e3e3;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.editor__header.editor__tab {
  display: grid;
  grid-template-columns: 80% 20%;
}

.dark .editor__header {
  background: #25282c;
  border-bottom-color: #33373d;
}

.editor__header .title {
  color: #34454c;
  font-weight: 500;
  font-size: 18px;
  line-height: 40px;
}

.editor__header .output-title {
  color: #fff;
  font-weight: 500;
  font-size: 18px;
  line-height: 40px;
}

.dark .editor__header .title {
  color: #ffffff;
}

.editor__header .description {
  color: #5d7b89;
  font-weight: normal;
  font-size: 14px;
}

.dark .editor__header .description {
  color: #ffffffcc;
}

.editor > .editor__cont {
  height: 100%;
  position: relative;
}

.editor__cont > .editor__input {
  height: 100%;
  font-size: 14px;
}

.editor.editor--output {
  background: #25282c;
  color: white;
}

.editor.editor--output .editor__header {
  border-color: #33373d;
}

.editor__output-holder {
  position: relative;
  height: 100%;
  width: 100%;
  /* overflow-y: auto;
  overflow-x: hidden; */
}

.editor__output-holder .editor__output {
  background: #1d1f21;
  resize: none;
  height: 100%;
  padding: 12px;
  font-size: 14px;
  width: 100%;
}

.editor > .editor__output::placeholder {
  color: #e1e7ea;
}

/* Buttons and Inputs */

.button {
  padding: 4px 24px;
  border-radius: 4px;
  background: #8447d1;
  color: white;
  transition: all 0.2s ease-in-out;
  cursor: pointer;
  border: none;
  font-weight: 500;
  font-size: 14px;
  line-height: 24px;
  height: 32px;
  width: max-content;
  justify-self: flex-end;
}

.dark .button {
  background: #9551ec;
}

.button:hover {
  background: #925cd6;
}

.button:disabled {
  background: #8b8692;
}

.toggle-theme {
  cursor: pointer;
}

.editor-copy-btn {
  cursor: pointer;
  position: absolute;
  top: 10px;
  right: 30px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.editor-copy-icon {
  width: 40px;
  height: 40px;
  margin-bottom: 5px;
  display: none;
}

.copy-hover {
  background-color: white;
  width: 135px;
  height: 33px;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  align-items: center;
  justify-content: center;
  display: none;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.12);
}

.copy-click {
  display: none;
  background-color: #69c98a;
  font-size: 14px;
  font-weight: 500;
  border-radius: 4px;
  width: 68px;
  height: 33px;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.12);
}

/* Footer */

footer {
  display: flex;
  justify-content: space-between;
  color: rgba(0, 0, 0, 0.5);
  margin: 0 24px;
  font-size: 14px;
}

.dark footer {
  color: #ffffffe5;
}

footer .version {
  padding: 4px 8px;
  background: #ebebeb;
  border-radius: 4px;
}

.dark footer .version {
  background-color: #202d32;
}

.version a {
  text-decoration: none;
  color: inherit;
}

.dark .version a {
  color: #ffffffe5;
}

footer .langdef {
  padding: 4px 4px;
  border-radius: 4px;
  margin-left: auto;
}

.dark footer .langdef {
  color: #ffffff29;
}

/* Ace Custom */

.ace-clouds .ace_marker-layer .ace_active-line {
  background: rgba(0, 0, 0, 0.07);
}

.ace-clouds .ace_gutter-active-line {
  background-color: #dcdcdc;
}

.ace-clouds .ace_comment {
  color: #848484;
}

.ace-clouds .ace_string,
.ace-clouds .ace_keyword,
.ace-clouds .ace_meta.ace_tag {
  color: #59328b;
}

.ace-clouds .ace_line,
.ace-clouds .ace_constant.ace_numeric,
.ace-clouds .ace_constant.ace_boolean {
  color: #0e394c;
}

.tippy-tooltip {
  background-color: white;
  color: #3e525b;
  padding: 0;
}

.tippy-backdrop {
  background-color: white;
}

.tippy-content {
  display: flex;
  flex-direction: column;
  border: 1px solid #e3e3e3;
  overflow: hidden;
  border-radius: 0.25rem;
}

.example-item {
  min-width: 280px;
  background-color: white;
  padding: 0.5rem 1rem;
  border: none;
  text-align: left;
  line-height: 24px;
  font-size: 14px;
  color: #3e525b;
  transition: all 0.2s;
  cursor: pointer;
  z-index: 1000;
}

.example-item:hover {
  background-color: rgba(132, 71, 209, 0.08);
}

.examples__button {
  padding: 8px 16px;
  background-color: #fafafa;
  border: 1px solid #e3e3e3;
  border-radius: 4px;
  color: #3e525b;
  display: flex;
  align-items: center;
  gap: 8px;
}

.examples__button > #example-name {
  line-height: 24px;
}

.nice-select > span.current {
  display: block;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nice-select.right {
  transition: none;
}

.nice-select.right.open {
  border: 1px solid rgba(132, 71, 209, 1);
}

.nice-select .optgroup {
  padding-left: 1rem;
}

.nice-select .list .optgroup:not(:nth-child(2)),
.nice-select li[data-value="Blank"] {
  border-top: 1px solid #e3e3e3;
}

.nice-select .list .option {
  color: #3e525b;
}

.nice-select .list .optgroup {
  color: #3e525b;
  font-weight: 500;
}

.nice-select .option.selected.disabled {
  display: none;
}

.dark .nice-select .option.focus,
.nice-select .option.selected.focus {
  background: #2a2d32;
}

.dark .nice-select {
  background: #25282c;
  color: #ffffff;
  border-color: #383c43;
}

.nice-select-dropdown {
  min-width: 300px !important;
}

.dark .nice-select .nice-select-dropdown {
  background: #2a2d32;
  border: 1px solid #383c43;
}

.dark .nice-select .option,
.dark .nice-select .optgroup {
  color: #ffffffd9;
}

.dark .nice-select .option.disabled {
  color: #ffffff;
}

.dark .nice-select .list .optgroup:not(:nth-child(2)),
.dark .nice-select .list li[data-value="Blank"] {
  border-top: 1px solid #383c43;
}

.dark .nice-select .option:hover {
  background-color: #8447d114;
}

.nice-select .list {
  max-height: 50vh;
  overflow-y: scroll;
  padding-bottom: 0 !important;
  padding-top: 1rem !important;
  margin: 0;
}

.nice-select .list::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}

.nice-select .list::-webkit-scrollbar-track {
  background: #f5f5f5;
}

.nice-select .list::-webkit-scrollbar-thumb {
  background: #e3e3e3;
  border-radius: 4px;
}

.cost__header {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cost__header__icon__text {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.cost__header__icon__text .text {
  color: #fff;
  font-size: 18px;
  font-weight: 500;
  line-height: 40px;
}

.cost__header a {
  text-decoration: none;
  font-size: 24px;
  line-height: 0;
  color: #8c97a6;
}

.cost__header a:hover {
  color: #b9c0ca;
}

.cost__header #cost {
  color: #bdcdd5;
  font-size: 18px;
  font-weight: 500;
  line-height: 40px;
}
