#editor {
    /* height: 100%; */
    display: flex;
    /* flex-direction: column; */
    justify-content: center;
    flex-grow:1;
    width:100%;
}

.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
    padding-left: 1.5em !important;
}

.ql-snow .ql-editor blockquote {
    border-left: 6px solid var(--highlights-body);
    background-color: color-mix(in srgb, var(--container-borders) 80%, transparent));
    margin-bottom: 0px;
    margin-top: 0px;
    padding-left: 20px;
    padding-right:10px;
    background-color: color-mix(in srgb, var(--container-borders) 60%, transparent);
}

.ql-snow .ql-editor h1, .ql-snow .ql-editor h2 {
    /* font-family: var(--font-strong); */
    /* color: #9ECBFF; */
    padding-bottom: 3px;
    font-weight: 500;
}

.ql-snow .ql-editor h3{
    padding-bottom:2px;
    font-weight: 500;
}

.ql-editor li {
    list-style-type: none;
    padding-left: 0em;
    position: relative;
}

.ql-snow .ql-editor .ql-code-block-container {
    background-color: black; 
    color: #f8f8f2;
    overflow: visible;
    white-space: pre;
    overflow: auto;
    width:100%;
    font-family: "jetbrains mono";
    font-size:14px;
}

/* Targeting elements with data-language="xml" */
.ql-code-block[data-language="xml"] {
    white-space: normal;
}

/* Styling elements with data-language="xml" */
.ql-code-block[data-language="xml"] .hljs-tag {
    color: grey; /* Change the color of HTML tags */
}

/* Targeting elements with data-language="xml" */
.ql-code-block[data-language="markdown"] {
    white-space: normal;
}

.ql-snow .ql-editor code {
    background-color: var(--notetile-bg);
}

.ql-editor span {
    border-radius:2px;
}

.ql-editor a {
    color: rgb(102, 163, 224);
    background-color: rgba(102, 163, 224, 0.1);
    padding: 0px 3px 0px 3px;
    border-radius: 5px;
}

.ql-snow .ql-editor a {
    text-decoration: none;
}

.ql-tooltip {
    border-radius:3px;
}

.ql-snow .ql-tooltip::before {
    content:'';
    margin-right:0px;
}

.ql-snow .ql-tooltip a.ql-remove::before {
    content: '🆇';
    margin-left: 8px;
    color: orangered;
}

.ql-snow .ql-tooltip a.ql-action::after {
    border-right: 1px solid #ccc;
    content: '✎';
    margin-left: 16px;
    padding-right: 8px;
    color: black;
}

.ql-snow .ql-tooltip[data-mode="link"]::before {
    content: "";
}

/* Custom styles to override Quill theme */
.ql-editor {
    flex-grow:1;
    background-color: transparent;
    border:none;
    overflow:auto;
    /* min-height: calc(100vh - 52px); */
    min-height: 0;
    height: auto;
    padding-bottom:20vh;
    will-change: scroll-position;
    zoom:1;
}

.ql-container {
    height:auto;
    font-family:inherit;
    font-size:inherit;
    max-width: 800px;
    /* margin:0 auto; */
}

.ql-container.ql-snow {
    border:none;
    box-sizing:border-box;
}

/* Optional: Adjust other components' styles if needed */
.ql-toolbar {
    background-color: transparent;
    color: ghostwhite;
    border:none;
}

.ql-toolbar::before {
    content: '';
    position: absolute;
    width: calc(100% - 50px);
    height: 25px;
    pointer-events: none;
    z-index: 1;
    box-sizing:border-box;
}

/* Custom styles to override Quill toolbar button styles */
.ql-toolbar .ql-picker-options, .ql-toolbar .ql-picker-label, .ql-toolbar .ql-picker {
    color: white; /* Set text color to white */
}

.ql-toolbar .ql-picker-options li {
    background-color: transparent; /* Set background color of dropdown options to black */
}

.ql-toolbar button {
    color: white; /* Set text color of buttons to white */
    background-color: transparent; /* Set background color of buttons to black */
}

.ql-toolbar.ql-snow {
    width:100%;
    background-color: var(--toolbar-background);
    border:none;
    position:sticky;
    z-index:100;
    font-family:x;
    flex-shrink:0;
    padding:6.5px;
    font-size: 16px;
}

.ql-toolbar.ql-snow .ql-formats {
    margin-right: 0;
}

.ql-toolbar button, .ql-stroke, .ql-fill, .ql-code-block, .ql-image, .ql-video, .ql-list, .ql-picker, .ql-picker-label, .ql-picker-options {
    color: white;
}

.ql-snow .ql-stroke {
    stroke:white;
}

.ql-snow .ql-fill, .ql-snow .ql-stroke.ql-fill {
    fill: whitesmoke;
}

.ql-toolbar.ql-snow .ql-picker-options {
    background-color: #333;
}

.ql-editor.ql-blank::before {
    color: var(--body-color);
    opacity:0.5;
    content: attr(data-placeholder);
    left: 15px;
    pointer-events: none;
    position: absolute;
    right: 15px;
}

.ql-editor .ql-video {
    display: block;
    max-width: 100%;
    height: 180px;
    width: 321px;
    margin: 0 auto;
}

.ql-toolbar.ql-snow .ql-picker-label {
    border: 1px solid whitesmoke;
}

.ql-font-roboto {
  font-family: 'Roboto', sans-serif;
}

.ql-toolbar.ql-snow .ql-picker-label {
    border: none;
}

.ql-code-block-container .ql-ui {
    right: 5px;
    top: 5px;
    background-color: transparent;
    color: aliceblue;
    border: 1px solid var(--tile-borders);
    -webkit-appearance: none;
    appearance: none;
    padding: 2px;
    border-radius:5px;
    font-family:inherit;
}

.quill-editor .ql-customImage .ql-customImage:before {
  font-family: 'Font Awesome Solid';
  content: "\f03e"; /* Unicode of the image icon in Font Awesome */
}

.ql-snow .ql-editor img {
    max-width: 100%;
}

p img {
  display: block; /* Ensure the image behaves as a block element */
}

.image-selected {
  border: 1px dashed var(--deleteButton-bg);
  position: relative; /* Ensure relative positioning for absolute ::after */
  touch-action:none;
}

/* Media query for mobile screens */
@media screen and (max-width: 1081px) {
    .ql-toolbar.ql-snow {
        display: block; /* Remove grid display on mobile screens */
        top:0px;
    }

    .ql-editor{
        min-height: calc(100vh - 180px);
    }
}

@media screen and (min-width: 1082px) {
    .ql-editor {
        /* height: calc(100vh - 93px); */
        overflow: auto;
    }
    .ql-editor.ql-blank::before {
        left:60px;
    }
    .ql-toolbar.ql-snow {
        top:0px;
    }
}

.resizable-container {
  position: relative;
  display: inline-block;
  border: 1px dashed #fff; /* Optional: To show the resizable boundary */
}

.resizable-container .resizable-handles {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  border: 2px solid #007bff;
  box-sizing: border-box;
  cursor: move;
  z-index: 10;
}

.hidden {
    display: none !important;
}

.visible {
    display: flex;
}

.katex {
  /* font-family: inherit !important; */
  /* font-style: normal !important; */
  /* font-weight: normal !important; */
  font-size: inherit !important;
}

.katex-mathml {
    display: none;
}

.katex .mrel {
    font-family: KaTeX_Main;
}

.ql-editor li[data-list="bullet"] > .ql-ui::before {
    content: '\2022';
    color: var(--highlights-body);
}

.ql-editor li > .ql-ui::before {
    margin-left: -1.6em;
}

.ql-editor ol {
    padding-left: 1.1em;
    margin: 5px 0px;
}
