/* TextEditor RTL and Placeholder Styles */

[dir="rtl"] .ql-editor {
  text-align: right;
  direction: rtl;
}

[dir="rtl"] .ql-toolbar {
  direction: rtl;
}

[dir="rtl"] .ql-toolbar .ql-picker-label {
  text-align: right;
}

[dir="rtl"] .ql-toolbar .ql-formats {
  margin-left: 0;
  margin-right: 15px;
}

[dir="rtl"] .ql-toolbar .ql-formats:first-child {
  margin-right: 0;
}

/* Enhanced placeholder styles for RTL */
.ql-editor.ql-blank::before {
  color: #6b7280 !important;
  content: var(--placeholder-text, "متن خود را وارد کنید...") !important;
  font-style: normal !important;
  pointer-events: none !important;
  position: absolute !important;
  right: 15px !important;
  top: 12px !important;
  left: auto !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

[dir="rtl"] .ql-editor.ql-blank::before {
  right: 15px !important;
  left: auto !important;
}

/* Ensure placeholder shows when editor is focused but empty */
.ql-editor.ql-blank.ql-has-focus::before {
  display: none;
}

/* Custom height for editor */
.h-64 .ql-editor {
  min-height: 160px;
}
