@font-face
{
    font-family: 'lixCode';
    src: url(../../FONT/lixCode.ttf);
    font-weight: normal;
    font-size: normal;
}

body {
      background-color: #242424; 
      margin: 0;
      padding: 0;
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
      color: #e0e0e0; 
    }
    #editor {
      position: absolute;
      left: 50%;
      transform: translate(-50%, 0);
      margin: 20px auto;
      width: 80%;
      max-width: 800px;
      overflow: auto;
      padding: 20px;
      border-radius: 8px;
      background-color: transparent; 
      font-size: 1.15rem;
      outline: none;
      min-height: 400px;
      max-height: 85%;
      line-height: 1.6;
      caret-color: #f0f0f0; 
    }

    #editor::-webkit-scrollbar
    {
      display: none;
    }
    #editor:empty::before {
      content: "Start typing...";
      color: #888;
    }

    /* Notion-like Dark Theme Typography */
    h1 { color: #f0f0f0; font-size: 2em; font-weight: 700; margin: 0.8em 0 0.4em; }
    h2 { color: #f0f0f0; font-size: 1.5em; font-weight: 700; margin: 0.8em 0 0.4em; }
    h3 { color: #f0f0f0; font-size: 1em; font-weight: 700; margin: 0.8em 0 0.4em; }
    h4 { color: #f0f0f0; font-size: 0.8em; font-weight: 700; margin: 0.8em 0 0.4em; }
    h5 { color: #f0f0f0; font-size: 0.5em; font-weight: 700; margin: 0.8em 0 0.4em; }
    h6 { color: #f0f0f0; font-size: 0.3em; font-weight: 700; margin: 0.8em 0 0.4em; }

    blockquote {
      border-left: 4px solid #4a4a4a;
      padding-left: 15px;
      margin: 1em 0;
      color: #b0b0b0;
      font-style: italic;
    }
    ul, ol {
      margin-left: 25px;
      padding-left: 0;
    }
    li {
      margin-bottom: 0.2em;
    }
    li > ul, li > ol {
      margin-left: 20px;
      margin-top: 0;
      margin-bottom: 0;
    }
    hr {
      border: none;
      border-top: 1px solid #444;
      margin: 20px 0;
      box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
    }
    pre {
      display: flex;
      flex-direction: row;
      gap: 20px;
      justify-content: space-between;
      align-items: start;
      padding: 5px 5px;
      border-radius: 12px;
      box-sizing: border-box;
      background-color: #242424;
      border: 1px solid #666;
      margin: 1em 0;
      position: relative;
    }
    
    .editor section pre {
      display: flex;
      flex-direction: row;
      gap: 20px;
      justify-content: space-between;
      align-items: start;
      padding: 5px 5px;
      border-radius: 12px;
      box-sizing: border-box;
      background-color: #242424;
      border: 1px solid #666;
    }
    
    .editor section pre i {
      font-size: 1.5em;
      color: #fff;
      cursor: pointer;
      padding: 5px 5px;
      margin-top: 10px;
    }
    
    .editor section pre .code_block {
      font-family: 'lixCode', monospace;
      font-size: 1em;
      background: transparent;
      display: block;
      white-space: pre-wrap;
      overflow-x: auto;
      outline: none;
      border: none;
      width: 100%;
    }
    
    pre i {
      font-size: 1.5em;
      color: #fff;
      cursor: pointer;
      padding: 5px 5px;
      margin-top: 10px;
    }
    
    pre .code_block {
      font-family: 'lixCode', monospace;
      font-size: 1em;
      background: transparent;
      display: block;
      white-space: pre-wrap;
      overflow-x: auto;
      outline: none;
      border: none;
      width: 100%;
    }

    [data-copy-btn] {
      cursor: pointer;
      font-size: 1.2rem;
      transition: transform 0.2s ease;
    }
    
    [data-copy-btn].copied {
      color: green;
      transform: scale(1.3);
    }
    
    pre .copy-button:hover {
      background-color: #555;
      color: #fff;
    }
    pre code {
      background: none;
      padding: 0;
      border-radius: 0;
      color: inherit;
      font-size: inherit;
      display: block; 
      background: none;
      white-space: pre-wrap; /* Preserve whitespace and wrap */
    }

    code[contenteditable="true"] {
    outline: none;
    min-height: 20px;
    display: block;
    white-space: pre;
    font-family: 'Courier New', Consolas, monospace;
}

  code[contenteditable="true"]:empty:before {
      content: attr(data-placeholder);
      color: #888;
      font-style: italic;
      pointer-events: none;
  }

  code[contenteditable="true"]:focus {
      outline: none;
  }

  
  code[contenteditable="true"] * {
      user-select: text;
      -webkit-user-select: text;
      -moz-user-select: text;
      -ms-user-select: text;
  }

    pre button 
    {
        background: none;
        outline: none;
        border: none;
    }
    pre > button > i
    {
      position: sticky;
      top: -10px;
      left: 95%;
      cursor: pointer;
      font-size: 20px;
      z-index: 10;
      display: none;
      padding: 5px 5px;
      border-radius: 10px;
    }
    pre::-webkit-scrollbar {
      height: 6px;
    }

    pre::-webkit-scrollbar-thumb {
      background: #bdbdbde5;
      border-radius: 10px;
    }


    code {
      background-color: #3a3a3a; /* Darker background for inline code */
      padding: 5px 10px;
      border-radius: 4px;
      font-family: 'Fira Code', 'JetBrains Mono', monospace;
      font-size: 0.85em;
      color: #e38a8a; /* Reddish for inline code */
    }
    b, strong { font-weight: bold; color: #f0f0f0; }
    i, em { font-style: italic; color: #c0c0c0; }
    u { text-decoration: underline; color: #9090f0; }
    s { text-decoration: line-through; color: #a0a0a0; }
    mark { background-color: #4a4a20; color: #ffe082; padding: 0.2em 0.4em; border-radius: 3px; } /* Yellowish highlight */

    .bold 
    {
      font-weight: bold;
      color: #f0f0f0; 
    }

    .mark 
    {
      background-color: #4a4a20; 
      color: #ffe082;
      padding: 0.2em 0.4em;
      border-radius: 3px;
    }
    .italic 
    {
      font-style: italic;
      color: #c0c0c0; 
    }
    .strike 
    {
      text-decoration: line-through;
      color: #a0a0a0; 
    }
    .code-inline 
    {
      background-color: #292626; /* Darker background for inline code */
      padding: 5px 10px;
      border-radius: 4px;
      font-family: 'lixCode';
      font-size: 0.85em;
      color: #e38a8a; 
      width: fit-content;
    }
    .underline 
    {
      text-decoration: underline;
      color: #9090f0; 
    }

    .default-text-not-editable 
    {
      color: #888 !important; 
      pointer-events: none; 
    }
    
    

  .controls
  {
    position: absolute;
    bottom: 3%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: row;
    backdrop-filter: blur(10px);
    gap: 15px;
    justify-content: center;
    align-items: center;
    padding: 5px 15px;
    box-sizing: border-box;
    border: 3px solid #474444;
    border-radius: 15px;
  }

  .controls .typography
  {
    display: flex;
    flex-direction: row;
    cursor: pointer;
  }

  .controls .typography:hover > svg 
  {
    fill: #ffffff; 
    transform: scale(1.1);
    transition: fill 0.2s ease, transform 0.2s ease;
  }
.controls .spacer 
{
  height: 30px;
  width: 4px;
  background: #888;
}
.controls > .blockedStyleElements 
{
  padding: 5px 5px;
  box-sizing: border-box;
  border-radius: 10px;
}


  .controls svg 
  {
    height: 30px;
    width: 30px;
    fill: #bab0b0;
    cursor: pointer;
    transition: fill 0.2s ease, transform 0.2s ease;
  }
    .controls svg:hover 
    {
      fill: #ffffff; 
      transform: scale(1.1);
      transition: fill 0.2s ease, transform 0.2s ease;
    }

    .textControls 
    {
      position: absolute;
      bottom: 15%;
      left: 40%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: row;
      flex-wrap: wrap;
      max-width: 290px;
      gap: 10px;
      padding: 10px 20px;
      box-sizing: border-box;
      border-radius: 12px;
      background-color: transparent;
      border: 2px solid #474444;
      opacity: 1;
      pointer-events: auto;
      transition: opacity 0.3s ease, filter 0.3s ease;
      filter: blur(0);
    }
    .textControls.hidden 
    {
      opacity: 0;
      pointer-events: none;
      filter: blur(5px);
      transition: opacity 0.3s ease, filter 0.3s ease;
    }

    .textControls > .heading,
    .textControls > .styles,
    .controls > .styles 
    {
      display: flex;
      flex-direction: row;
      width: 40px;
      box-sizing: border-box;
      border-radius: 8px;
      justify-content: center;
      align-items: center;
      cursor: pointer;
      padding: 10px 10px;
      box-sizing: border-box;
    }

    
    .textControls > .heading 
    .textControls > .styles > svg:hover,
    .textControls > .heading:hover 
    {
      fill: #ffffff; 
      transform: scale(1.1);
      transition: fill 0.2s ease, transform 0.2s ease;
    }
    .textControls > .heading > span 
    {
      font-size: 1.1em;
      color: #f0f0f0; 
    }

    .blockedStyleElements.selected,
    .styles.selected 
    {
      background-color: #3a3333;
      transition: 0.24s; 
    } 

    .deactivated {
    opacity: 0.5 !important;
    pointer-events: none !important;
    cursor: not-allowed !important;
}

.deactivated:hover {
    background-color: transparent !important;
    transform: none !important;
}

.controls > .blockCode 
{
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 10px;
}

.controls >  .languageSelector 
{
  display: flex;
  height: 35px;
  width: 250px;
  border: 2px solid #888;
  border-radius: 8px;
  flex-direction: row;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  box-shadow: inset 4px 4px 12px #1a1a1a, inset -4px -4px 12px #353535;
  background: #242424;
  padding: 15px 10px;
  box-sizing: border-box;
  font-family: "lixCode";
}
.controls >  .languageSelector.hidden 
{
  display: none;
}
.controls > .languageSelector > .languageName
{
  font-size: 1.2em;
  color: #bab0b0;
  width: fit-content;
  font-weight: bold;
  user-select: none;
}
.controls > .languageSelector > .languageIcon > svg
{
  height: 35px;
  width: 35px;
  fill: #bab0b0;
}


.languageSelection 
{
      position: absolute;
      bottom: 15%;
      left: 65%;
      transform: translateX(-50%);
      display: flex;
      flex-direction: column;
      max-width: 250px;
      gap: 10px;
      padding: 10px 20px;
      box-sizing: border-box;
      border-radius: 8px;
      background-color: #1a1a1a7e;
      backdrop-filter: blur(10px);
      border: 2px solid #474444;
      opacity: 1;
      pointer-events: auto;
      transition: opacity 0.3s ease, filter 0.3s ease;
      filter: blur(0);
      max-height: 400px;
      overflow-y: auto;
      opacity: 1;
      pointer-events: all;
      filter: blur(0);
}


.languageSelection.hidden 
{
  opacity: 0;
  filter: blur(10px);
  pointer-events: none;
}
.languageSelection::-webkit-scrollbar
{
  display: none;
}
.languageSelection > .language
{
  font-size: 1.2em;
  color: #888;
  font-family: "lixCode";
  user-select: none;
  padding: 3px 3px;
  box-sizing: border-box;
  cursor: pointer;
}
.languageSelection > .language:hover
{
  color: #888;
  background-color: #3a3333;
  border-radius: 5px;
  transition: 0.2s;
}


table {
  border-collapse: collapse;
  width: 100%;
  margin: 10px 0;
  border: 1px solid #ddd;
  table-layout: fixed;
}

table td {
  border: 1px solid #ddd;
  padding: 8px;
  min-width: 100px;
  min-height: 30px;
  vertical-align: top;
  max-width: 200px;
  word-break: break-word;
}

table td[contenteditable="true"] {
  outline: none;
}


table td {
  line-height: 1.4em;
}

table td p {
  display: block;
  margin-block-start: 0.5em;
  margin-block-end: 0.5em;
  margin-inline-start: 0px;
  margin-inline-end: 0px;
  unicode-bidi: isolate;
}

table td p span.mark 
{
  background-color: #4a4a20;
  color: #ffe082;
  padding: 0.06em 0.2em;
  border-radius: 3px;
}

