/* תיקוני RTL לכל המערכת */

/* תיקון רשימות Quill לכיוון RTL */
.ql-editor ol,
.ql-editor ul {
    padding-right: 2em !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

.ql-editor ol li,
.ql-editor ul li {
    list-style: none !important;
    position: relative !important;
    padding-right: 0 !important;
    padding-left: 0 !important;
    margin-right: 0 !important;
    margin-left: 0 !important;
}

/* תיקון מיקום המספרים ברשימות מספרות */
.ql-editor ol li::before {
    position: absolute !important;
    right: -2em !important;
    width: 1.5em !important;
    text-align: center !important;
    direction: rtl !important;
}

/* תיקון מיקום התבליטים ברשימות נקודות */
.ql-editor ul li::before {
    position: absolute !important;
    right: -1.5em !important;
    width: 1em !important;
    text-align: center !important;
    direction: rtl !important;
}

/* תיקון רשימות עם יישור שמאל */
.ql-editor .ql-align-left ol,
.ql-editor .ql-align-left ul {
    padding-left: 2em !important;
    padding-right: 0 !important;
    direction: ltr !important;
}

.ql-editor .ql-align-left ol li::before {
    right: auto !important;
    left: -2em !important;
}

.ql-editor .ql-align-left ul li::before {
    right: auto !important;
    left: -1.5em !important;
}

/* תיקון רשימות עם יישור מרכז */
.ql-editor .ql-align-center ol,
.ql-editor .ql-align-center ul {
    padding-right: 2em !important;
    padding-left: 2em !important;
}

/* תיקון indent ברשימות RTL */
.ql-editor .ql-indent-1:not(.ql-direction-rtl) {
    padding-left: 3em !important;
    padding-right: 0 !important;
}

.ql-editor .ql-indent-1.ql-direction-rtl,
.ql-editor .ql-indent-1 {
    padding-right: 5em !important;
    padding-left: 0 !important;
}

/* תיקון עמקים נוספים */
.ql-editor .ql-indent-2 {
    padding-right: 7em !important;
    padding-left: 0 !important;
}

.ql-editor .ql-indent-3 {
    padding-right: 9em !important;
    padding-left: 0 !important;
}

/* תיקונים לתוכן שיעורים שמוצג בקבצים אחרים */
.lesson-content ol,
.lesson-content ul {
    margin: 12px 25px 12px 0 !important;
    padding-right: 2em !important;
    padding-left: 0 !important;
}

.lesson-content li {
    position: relative !important;
    list-style: none !important;
}

/* תיקון מיקום המספרים ברשימות מספרות בתוכן שיעורים */
.lesson-content ol li::before {
    position: absolute !important;
    right: -2em !important;
    width: 1.5em !important;
    text-align: center !important;
    direction: rtl !important;
}

/* תיקון מיקום התבליטים ברשימות נקודות בתוכן שיעורים */
.lesson-content ul li::before {
    position: absolute !important;
    right: -1.5em !important;
    width: 1em !important;
    text-align: center !important;
    direction: rtl !important;
}

/* תיקון רשימות עם יישור שמאל בתוכן שיעורים */
.lesson-content .ql-align-left ol,
.lesson-content .ql-align-left ul {
    padding-left: 2em !important;
    padding-right: 0 !important;
    direction: ltr !important;
}

.lesson-content .ql-align-left ol li::before {
    right: auto !important;
    left: -2em !important;
}

.lesson-content .ql-align-left ul li::before {
    right: auto !important;
    left: -1.5em !important;
}

/* תיקונים למובייל */
@media (max-width: 768px) {
    .ql-editor ol,
    .ql-editor ul,
    .lesson-content ol,
    .lesson-content ul {
        padding-right: 1.5em !important;
        padding-left: 0 !important;
    }
    
    .ql-editor ol li::before,
    .lesson-content ol li::before {
        right: -1.5em !important;
        width: 1.2em !important;
    }
    
    .ql-editor ul li::before,
    .lesson-content ul li::before {
        right: -1.2em !important;
        width: 0.8em !important;
    }
}
