@import "../styles/variables.scss";

.editor {
  background-size: 40px 45px;
  background-position-x: -10px;
  background-position-y: -40px;
  min-height: 100vh;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
}

.other h2 {
  font-size: 18px;
  color: var(--text-tertiary);
  margin-bottom: 7px;
}

.other a {
  color: var(--text-secondary);
  text-decoration: underline;
  font-size: 14px;
}

.other ul {
  padding: 0;
  margin: 0;
}

h1 {
  font-size: 24px;
  color: var(--text-tertiary);
}

.ltr {
  text-align: left;
}

.rtl {
  text-align: right;
}

.editor-container {
  border-radius: var(--radius-sm);
  padding-top: 0px;
  padding-left: 0px;
  width: 100%;
  height: 100%;
  position: relative;
  line-height: 20px;
  font-weight: 400;
  text-align: left;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  font-family: var(--font-reenie);
}

.editor-container ul {
  width: 100%;
  padding-left: 0px;
}

.editor-container {
  ul li {
    padding-left: 50px;
    position: relative;
    margin-bottom: 10px;
  }

  &.lp {
    ul li {
      margin: 30px 0;
    }
  }
}

.editor-container ul li:before {
  content: "-> ";
  color: #555555;
  font-family: var(--font-reenie);
  position: absolute;
  left: -8px;
  font-size: 58px;
  top: 0;
}

.editor-container ol {
  width: 100%;
  counter-reset: item;
  font-family: var(--font-reenie);
  padding-left: 20px;

  @include sm {
    padding-left: 30px;
  }
}

.editor-container ol li {
  padding-left: 30px;
  counter-increment: item;
  margin-bottom: 10px;
}
.editor-container ol li:before {
  content: attr(value) ". ";
  font-family: var(--font-reenie);
  position: absolute;
  color: #555555;
  left: 15px;
}

.editor-listitem {
  span {
    width: 100%;
    display: block;
  }
}

.editor-listitem-checked,
.editor-listitem-unchecked {
  position: relative;
  list-style-type: none;
  outline: none;
  padding-left: 50px !important;
}
.editor-listitem-checked span {
  text-decoration: line-through;
  color: #585858;
}

.editor-listitem-checked a,
.editor-listitem-checked a span {
  color: #39d353 !important;
}

.editor-listitem-checked:before,
.editor-listitem-unchecked:before {
  content: "O" !important;
  left: 3px !important;
  transform: scale(1.6, 1.2);
  cursor: pointer;
  display: block;
  position: absolute;
}

.editor-listitem-unchecked:focus:before,
.editor-listitem-checked:focus:before {
  border: none !important;
  outline: none !important;
}
.editor-listitem-unchecked:before {
  color: white;
}
.editor-listitem-checked:before {
  color: rgb(75, 75, 75) !important;
  background-repeat: no-repeat;
}
.editor-listitem-checked:after {
  content: "L";
  cursor: pointer;
  color: #39d353;
  font-size: 70px;
  transform: scale(-1, 1) rotate(-40deg);
  transform-origin: center center;
  position: absolute;
  display: block;
  height: 30px;
  width: 30px;
  left: 15px;
  top: -8px;
  bottom: 0;
  margin: 0;
}

.editor-inner {
  padding: 10px 0 20px 0px;
  position: relative;
  height: 100%;
  width: 100%;
}

.editor-input {
  height: 100%;
  resize: none;
  font-size: 45px;
  caret-color: var(--text-dark);
  position: relative;
  tab-size: 1;
  outline: 0;
  padding: 10px 10px;
  caret-color: var(--text-tertiary);

  @include sm {
    font-size: 60px;
  }

  code {
    display: inline-flex;
    align-items: center;
    font-family: var(--font-cutive);
    color: var(--text-secondary);
    background-color: var(--background-black);
    font-size: 30px;
    padding: 3px 10px;
    border-radius: var(--radius-sm);
    display: inline !important;
  }

  sup {
    font-size: 30px;
    top: -15px;
  }

  sub {
    font-size: 30px;
    bottom: -5px;
  }

  mark {
    border: 1px dashed;
    background: none;
    border-color: var(--accent-primary);
    color: var(--text-secondary);
    font-weight: bold;
    border-radius: var(--radius-md);
    padding: 0 10px;
  }
}

.editor-placeholder {
  color: #353535;
  position: absolute;
  top: 30px;
  left: 10px;
  font-size: 60px;
  line-height: 60px;
  user-select: none;
  display: inline-block;
  pointer-events: none;
}

.editor-text-bold {
  font-weight: bold;
}

.editor-text-italic {
  font-style: italic;
}

.editor-text-underline {
  text-decoration: underline;
}

.editor-text-strikethrough {
  text-decoration: line-through;
}

.editor-text-underlineStrikethrough {
  text-decoration: underline line-through;
}

.editor-link {
  color: rgb(33, 111, 219);
  text-decoration: none;
}

.editor-code {
  background-color: rgb(240, 242, 245);
  display: block;
  padding: 8px 8px 8px 52px;
  line-height: 1.53;
  font-size: 13px;
  margin: 0;
  margin-top: 8px;
  margin-bottom: 8px;
  tab-size: 2;
  overflow-x: auto;
  position: relative;
}

.editor-code:before {
  content: attr(data-gutter);
  position: absolute;
  background-color: #eee;
  left: 0;
  top: 0;
  border-right: 1px solid #ccc;
  padding: 8px;
  color: #777;
  white-space: pre-wrap;
  text-align: right;
  min-width: 25px;
}
.editor-code:after {
  content: attr(data-highlight-language);
  top: 0;
  right: 3px;
  padding: 3px;
  font-size: 10px;
  text-transform: uppercase;
  position: absolute;
  color: rgba(0, 0, 0, 0.5);
}

.editor-tokenComment {
  color: slategray;
}

.editor-tokenPunctuation {
  color: #999;
}

.editor-tokenProperty {
  color: #905;
}

.editor-tokenSelector {
  color: #690;
}

.editor-tokenOperator {
  color: #9a6e3a;
}

.editor-tokenAttr {
  color: #07a;
}

.editor-tokenVariable {
  color: #e90;
}

.editor-tokenFunction {
  color: #dd4a68;
}

.editor-paragraph {
  margin: 0;
  position: relative;
  line-height: 150%;
}

.editor-paragraph:last-child {
  margin-bottom: 0;
}

.editor-heading-h1 {
  font-size: 24px;
  color: rgb(5, 5, 5);
  font-weight: 400;
  margin: 0;
  margin-bottom: 12px;
  padding: 0;
}

.editor-heading-h2 {
  font-size: 15px;
  color: rgb(101, 103, 107);
  font-weight: 700;
  margin: 0;
  margin-top: 10px;
  padding: 0;
  text-transform: uppercase;
}

.editor-quote {
  margin: 0;
  margin-left: 20px;
  font-size: 15px;
  color: rgb(101, 103, 107);
  border-left-color: rgb(206, 208, 212);
  border-left-width: 4px;
  border-left-style: solid;
  padding-left: 16px;
}

.editor-list-ol {
  padding: 0;
  margin: 0;
  line-height: 100%;
}

.editor-list-ul {
  padding: 0;
  margin: 0;
  line-height: 100%;
}

pre::-webkit-scrollbar {
  background: transparent;
  width: 10px;
}

pre::-webkit-scrollbar-thumb {
  background: #999;
}

.debug-timetravel-panel {
  overflow: hidden;
  padding: 0 0 10px 0;
  margin: auto;
  display: flex;
}

.debug-timetravel-panel-slider {
  padding: 0;
  flex: 8;
}

.debug-timetravel-panel-button {
  padding: 0;
  border: 0;
  background: none;
  flex: 1;
  color: #fff;
  font-size: 12px;
}

.debug-timetravel-panel-button:hover {
  text-decoration: underline;
}

.debug-timetravel-button {
  border: 0;
  padding: 0;
  font-size: 12px;
  top: 10px;
  right: 15px;
  position: absolute;
  background: none;
  color: #fff;
}

.debug-timetravel-button:hover {
  text-decoration: underline;
}

.toolbar button.toolbar-item {
  border: 0;
  display: flex;
  background: none;
  border-radius: 10px;
  padding: 8px;
  cursor: pointer;
  vertical-align: middle;
  text-align: center !important;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toolbar button.toolbar-item span {
  text-align: center !important;
  width: 100% !important;
}

.toolbar button.toolbar-item:disabled {
  cursor: not-allowed;
}

.toolbar button.toolbar-item.spaced {
  margin-right: 2px;
}

.toolbar button.toolbar-item i.format {
  background-size: contain;
  display: inline-block;
  height: 18px;
  width: 18px;
  margin-top: 2px;
  vertical-align: -0.25em;
  display: flex;
  opacity: 0.6;
}

.toolbar button.toolbar-item:disabled i.format {
  opacity: 0.2;
}

.toolbar button.toolbar-item.active {
  background-color: #2c2c2c;
  color: white;
}
.toolbar button.toolbar-item.active .text {
  color: white;
}

.toolbar button.toolbar-item.active i {
  opacity: 1;
}

.toolbar .toolbar-item:hover:not([disabled]) {
  background-color: #2c2c2c;
}

.toolbar .divider {
  width: 1px;
  background-color: #eee;
  margin: 0 4px;
}

.toolbar .toolbar-item .text {
  display: flex;
  line-height: 20px;
  width: 200px;
  vertical-align: middle;
  font-size: 14px;
  text-overflow: ellipsis;
  width: 70px;
  overflow: hidden;
  height: 20px;
  text-align: left;
}

.toolbar .toolbar-item .icon {
  display: flex;
  width: 20px;
  height: 20px;
  user-select: none;
  margin-right: 8px;
  line-height: 16px;
  background-size: contain;
}

i.undo {
  background-image: url(../../icons/arrow-counterclockwise.svg);
}

i.redo {
  background-image: url(../../icons/arrow-clockwise.svg);
}

i.bold {
  background-image: url(../../icons/type-bold.svg);
}

i.italic {
  background-image: url(../../icons/type-italic.svg);
}

i.underline {
  background-image: url(../../icons/type-underline.svg);
}

i.strikethrough {
  background-image: url(../../icons/type-strikethrough.svg);
}

i.left-align {
  background-image: url(../../icons/text-left.svg);
}

i.center-align {
  background-image: url(../../icons/text-center.svg);
}

i.right-align {
  background-image: url(../../icons/text-right.svg);
}

i.justify-align {
  background-image: url(../../icons/justify.svg);
}

.preview-list li {
  font-family: var(--font-reenie);
}

.editor-link {
  color: #39d353;
}

.textarea {
  overflow: hidden;
  > div {
    padding: 30px;
  }

  textarea {
    font-size: 20px;
  }
}

.font-2 {
  .editor-placeholder {
    font-size: 35px;
  }

  .editor-listitem {
    margin-bottom: 20px;
  }

  .editor-input {
    font-size: 25px;

    sup {
      font-size: 20px;
      top: -15px;
    }

    sub {
      font-size: 20px;
      bottom: -5px;
    }

    .editor-paragraph {
      line-height: 45px;
    }

    @include sm {
      font-size: 30px;
    }

    ul li:before {
      content: "➤";
      left: 5px;
      font-size: 22px;
    }

    ol li:before {
      left: 25px;
    }

    .editor-listitem-checked:before,
    .editor-listitem-unchecked:before {
      content: "O" !important;
      left: 0px !important;
      transform: scale(1.2, 1);
      top: 3px;
      font-size: 45px;
    }

    .editor-listitem-checked:after {
      font-size: 45px;
      font-family: sans-serif;
      left: 5px;
    }
  }
}

.font-3 {
  .editor-placeholder {
    font-size: 35px;
  }

  .editor-listitem {
    margin-bottom: 15px;
  }

  .editor-paragraph {
    line-height: 55px;
  }

  .editor-input {
    font-size: 25px;

    sup {
      font-size: 20px;
      top: -15px;
    }

    sub {
      font-size: 20px;
      bottom: -5px;
    }

    @include sm {
      font-size: 30px;
    }

    ul li:before {
      content: "▻";
      left: 10px;
      font-size: 32px;
    }

    ol li:before {
      left: 25px;
    }

    .editor-listitem-checked:before,
    .editor-listitem-unchecked:before {
      content: "O" !important;
      left: 0px !important;
      transform: scale(1.2, 1);
      top: 3px;
      font-size: 50px;
    }

    .editor-listitem-checked:after {
      font-size: 35px;
      font-family: sans-serif;
      left: 0px;
    }
  }
}

.daybadge-2,
.daybadge-3 {
  font-size: 35px;
}

.switch-loader svg {
  width: 28px;
}

.select {
  font-size: 11px;
  button,
  div[data-slot="content"] {
    background-color: #272727;
  }
}

* {
  --nextui-content1: 240 0% 8%;
  --nextui-default-100: 240 0% 15.88%;
  --nextui-default-200: 240 0% 20.08%;
}

.cardItem {
  border: 1px solid #1b1b1b;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.cardItemParent {
  &:hover {
    .cardItem {
      transform: scale(1.05);
      border-color: #39d353;
    }
  }
}
