/* Quill Editor RTL Styles */

/* RTL Container */
.quill-rtl-container {
    direction: rtl;
    text-align: right;
}

/* Editor Content Area */
.quill-rtl-container .ql-editor {
    direction: rtl;
    text-align: right;
    font-family: Vazir, Tahoma, Arial, sans-serif;
}

/* Toolbar Direction */
.quill-rtl-container .ql-toolbar {
    direction: rtl;
    text-align: right;
}

/* Align toolbar buttons to the right */
.quill-rtl-container .ql-toolbar .ql-formats {
    float: right;
    margin-left: 15px;
    margin-right: 0;
}

/* Fix toolbar button spacing */
.quill-rtl-container .ql-toolbar button {
    float: none;
}

/* Placeholder text alignment */
.quill-rtl-container .ql-editor.ql-blank::before {
    right: 15px;
    left: auto;
    text-align: right;
}

/* List indentation for RTL */
.quill-rtl-container .ql-editor li {
    padding-right: 1.5em;
    padding-left: 0;
}

.quill-rtl-container .ql-editor ol,
.quill-rtl-container .ql-editor ul {
    padding-right: 1.5em;
    padding-left: 0;
}

/* Blockquote border on the right */
.quill-rtl-container .ql-editor blockquote {
    border-right: 4px solid #ccc;
    border-left: none;
    padding-right: 16px;
    padding-left: 0;
    margin-right: 0;
}

/* Code block direction */
.quill-rtl-container .ql-editor pre.ql-syntax {
    direction: ltr;
    text-align: left;
}

/* Link and image alignment */
.quill-rtl-container .ql-editor a {
    direction: rtl;
}

/* Fix dropdown menus in toolbar */
.quill-rtl-container .ql-toolbar .ql-picker-label {
    padding-left: 8px;
    padding-right: 2px;
}

.quill-rtl-container .ql-toolbar .ql-picker-options {
    text-align: right;
}

/* Header styles in RTL */
.quill-rtl-container .ql-editor h1,
.quill-rtl-container .ql-editor h2,
.quill-rtl-container .ql-editor h3,
.quill-rtl-container .ql-editor h4,
.quill-rtl-container .ql-editor h5,
.quill-rtl-container .ql-editor h6 {
    text-align: right;
}

/* Ensure proper text direction for Persian/Arabic */
.quill-rtl-container .ql-editor p,
.quill-rtl-container .ql-editor div {
    direction: rtl;
    text-align: right;
}

/* Fix for numbered lists */
.quill-rtl-container .ql-editor ol > li {
    padding-right: 1.5em;
    padding-left: 0;
}

.quill-rtl-container .ql-editor ol > li::before {
    margin-right: 0;
    margin-left: 0.3em;
    text-align: left;
}

/* Fix for bullet lists */
.quill-rtl-container .ql-editor ul > li::before {
    margin-right: 0;
    margin-left: 0.3em;
}

/* Better font rendering for Persian */
.quill-rtl-container .ql-editor {
    font-size: 16px;
    line-height: 1.8;
}

/* Fix indent for nested lists */
.quill-rtl-container .ql-editor li.ql-indent-1 {
    padding-right: 3em;
    padding-left: 0;
}

.quill-rtl-container .ql-editor li.ql-indent-2 {
    padding-right: 4.5em;
    padding-left: 0;
}

.quill-rtl-container .ql-editor li.ql-indent-3 {
    padding-right: 6em;
    padding-left: 0;
}

/* Direction toggle button */
.quill-rtl-container .ql-direction-rtl::before {
    content: "RTL";
}
