/* CKEditor Custom Styles for Persian Content */
.ck-editor {
    direction: rtl;
    text-align: right;
}

/* CKEditor Container */
.ck.ck-editor {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
}

/* CKEditor Toolbar */
.ck.ck-toolbar {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
    border-radius: 0.375rem 0.375rem 0 0;
}

/* CKEditor Content */
.ck.ck-editor__editable {
    background: white;
    border-radius: 0 0 0.375rem 0.375rem;
    min-height: 200px;
}

/* Persian Font Support */
.ck.ck-editor__editable {
    font-family: 'Tahoma', 'Arial', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    direction: rtl;
    text-align: right;
}

/* RTL Support */
.ck.ck-toolbar {
    direction: rtl;
    text-align: right;
}

.ck.ck-toolbar__separator {
    margin: 0 8px;
}

/* Toolbar RTL */
.ck.ck-toolbar__items {
    direction: rtl;
    text-align: right;
}

/* Alignment buttons RTL */
.ck.ck-button[data-cke-tooltip-text*="alignment"] {
    direction: rtl;
}

/* Font dropdown RTL */
.ck.ck-dropdown__panel {
    direction: rtl;
    text-align: right;
}

/* List RTL */
.ck.ck-list {
    direction: rtl;
    text-align: right;
}

/* Editor content RTL */
.ck.ck-editor__editable {
    direction: rtl;
    text-align: right;
}

/* Font family support */
.ck.ck-editor__editable {
    font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
}

/* Persian font support in editor */
.ck.ck-editor__editable[style*="font-family"] {
    font-family: inherit !important;
}

/* RTL alignment support */
.ck.ck-editor__editable p[style*="text-align: right"] {
    text-align: right !important;
}

.ck.ck-editor__editable p[style*="text-align: left"] {
    text-align: left !important;
}

.ck.ck-editor__editable p[style*="text-align: center"] {
    text-align: center !important;
}

.ck.ck-editor__editable p[style*="text-align: justify"] {
    text-align: justify !important;
}

/* Custom Button Styles */
.ck.ck-button {
    border-radius: 4px;
}

.ck.ck-button:hover {
    background-color: #e9ecef;
}

/* Focus Styles */
.ck.ck-editor__editable:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Dropdown Styles */
.ck.ck-dropdown__panel {
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* List Styles */
.ck.ck-list {
    direction: rtl;
}

/* Table Styles */
.ck.ck-table {
    border-collapse: collapse;
    width: 100%;
}

.ck.ck-table td, .ck.ck-table th {
    border: 1px solid #dee2e6;
    padding: 8px;
    text-align: right;
}
