/**
 * Modern Comments RTL (Right-to-Left) Support
 * For Arabic and other RTL languages
 */

/* ========================================
   RTL GENERAL ADJUSTMENTS
   ======================================== */
[dir="rtl"] .modern-comments-wrapper {
    direction: rtl;
}

[dir="rtl"] .comments-count-wrapper {
    flex-direction: row-reverse;
}

[dir="rtl"] .comments-title {
    flex-direction: row-reverse;
}

/* ========================================
   RTL COMMENT BODY
   ======================================== */
[dir="rtl"] .modern-comment-list .comment-body {
    flex-direction: row-reverse;
    border-left: 1px solid var(--comment-border);
    border-right: 4px solid transparent;
}

[dir="rtl"] .modern-comment-list .comment-body:hover {
    border-left-color: var(--comment-border);
    border-right-color: var(--comment-primary-color);
    transform: translateX(-2px);
}

[dir="rtl"] .comment-content-wrapper {
    text-align: right;
}

/* ========================================
   RTL COMMENT METADATA
   ======================================== */
[dir="rtl"] .comment-author-info .fn {
    margin-right: 0;
    margin-left: 10px;
}

[dir="rtl"] .comment-metadata {
    flex-direction: row-reverse;
}

[dir="rtl"] .comment-metadata .edit-link::before {
    margin-right: 0;
    margin-left: 8px;
}

/* ========================================
   RTL COMMENT ACTIONS
   ======================================== */
[dir="rtl"] .comment-actions {
    flex-direction: row-reverse;
}

[dir="rtl"] .comment-reply a.comment-reply-link {
    flex-direction: row-reverse;
}

/* ========================================
   RTL THREADED COMMENTS
   ======================================== */
[dir="rtl"] .modern-comment-list .children {
    padding-left: 0;
    padding-right: 0;
}

[dir="rtl"] .modern-comment-list .children .comment-body {
    padding-left: 20px;
    padding-right: 60px;
    border-left: none;
    border-right: 3px solid var(--comment-primary-color);
}

[dir="rtl"] .modern-comment-list .children .children .comment-body {
    padding-right: 100px;
}

[dir="rtl"] .modern-comment-list .children .children .children .comment-body {
    padding-right: 120px;
}

/* ========================================
   RTL FORM TITLE
   ======================================== */
[dir="rtl"] .modern-comment-reply-title {
    flex-direction: row-reverse;
}

[dir="rtl"] .modern-comment-reply-title small {
    margin-left: 0;
    margin-right: auto;
}

/* ========================================
   RTL FORM NOTES
   ======================================== */
[dir="rtl"] .comment-notes,
[dir="rtl"] .form-allowed-tags {
    border-left: none;
    border-right: 3px solid var(--comment-primary-color);
}

/* ========================================
   RTL RESPONSIVE
   ======================================== */
@media (max-width: 768px) {
    [dir="rtl"] .modern-comment-list .children .comment-body {
        padding-right: 40px;
        padding-left: 15px;
    }
    
    [dir="rtl"] .modern-comment-list .children .children .comment-body {
        padding-right: 60px;
    }
}

@media (max-width: 480px) {
    [dir="rtl"] .modern-comment-list .children .comment-body {
        padding-right: 30px;
        padding-left: 12px;
    }
    
    [dir="rtl"] .modern-comment-list .children .children .comment-body {
        padding-right: 40px;
    }
    
    [dir="rtl"] .modern-comment-list .children .children .children .comment-body {
        padding-right: 50px;
    }
}
