/* Quill RTL / Persian overrides — طوس واشر */

/* Base editor container */
.ql-container {
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 1rem !important;
    border-radius: 0 0 8px 8px !important;
    border-color: var(--border, #d1d9e0) !important;
    direction: rtl;
    text-align: right;
    /* Override Quill core's `.ql-container{height:100%}` which, inside a flex
       row/column, makes the editor balloon to fill the parent's height and
       ignores min-height. Let it grow by content from min-height instead. */
    height: auto !important;
    min-height: 70px;
    background: #ffffff;
}

.ql-editor {
    direction: rtl !important;
    text-align: right !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 0.95rem !important;
    line-height: 1.9 !important;
    padding: 10px 16px !important;
    /* Same reason as .ql-container above — override core height:100%. */
    height: auto !important;
    min-height: 54px;
    color: #1a2332;
}

/* Placeholder RTL */
.ql-editor.ql-blank::before {
    right: 16px !important;
    left: unset !important;
    font-style: normal !important;
    color: #9aa5b4 !important;
    font-family: "Vazirmatn", sans-serif !important;
    font-size: 0.9rem !important;
}

/* Toolbar */
.ql-toolbar {
    border-radius: 8px 8px 0 0 !important;
    border-color: var(--border, #d1d9e0) !important;
    background: #f8fafc !important;
    padding: 6px 8px !important;
    direction: rtl !important;
    display: flex;
    flex-wrap: wrap;
    gap: 2px;
}

.ql-toolbar .ql-formats {
    margin: 0 4px 0 0 !important;
    border-left: 1px solid #e2e8f0;
    padding-left: 4px;
}
.ql-toolbar .ql-formats:last-child { border-left: none; }

/* Toolbar buttons */
.ql-toolbar button {
    padding: 3px 5px !important;
    border-radius: 4px !important;
    height: 28px !important;
    width: 28px !important;
    box-shadow: none !important;
    background: transparent !important;
    border: none !important;
    color: #1a2e44 !important;
    transition: background 0.15s !important;
}
.ql-toolbar button:hover,
.ql-toolbar button.ql-active {
    background: #e8ecf0 !important;
    color: #1a2e44 !important;
}
.ql-toolbar .ql-stroke { stroke: #1a2e44; }
.ql-toolbar .ql-fill { fill: #1a2e44; }
.ql-toolbar button:hover .ql-stroke,
.ql-toolbar button.ql-active .ql-stroke { stroke: var(--accent, #e67e22); }

/* Picker dropdowns */
.ql-toolbar .ql-picker {
    color: #1a2e44 !important;
    font-family: "Vazirmatn", sans-serif !important;
}
.ql-picker-options { direction: rtl; }

/* Focus state */
.ql-container.ql-snow:focus-within {
    border-color: var(--primary, #1a2e44) !important;
    box-shadow: 0 0 0 2px rgba(26,46,68,0.12) !important;
}

/* Wrapper used by our init code */
.quill-wrapper { margin-bottom: 10px; }
.quill-wrapper .ql-container { min-height: 70px; }

/* Compact variant for reply forms */
.quill-compact .ql-container { min-height: 90px; }
.quill-compact .ql-editor { min-height: 80px; }
