/* Quill.js Content Display Styles - Tailwind CSS Compatible */

.ql-editor {
  box-sizing: border-box;
  line-height: 1.75;
  min-height: 100%;
  outline: none;
  overflow-y: auto;
  tab-size: 4;
  -moz-tab-size: 4;
  text-align: left;
  white-space: pre-wrap;
  word-wrap: break-word;
}

/* Paragraphs */
.ql-editor p {
  margin-bottom: 1rem;
  margin-top: 0;
}

/* Headings */
.ql-editor h1 {
  font-size: 2.25rem;
  font-weight: 700;
  line-height: 2.5rem;
  margin-bottom: 1.5rem;
  margin-top: 2rem;
  color: #111827;
}

.ql-editor h2 {
  font-size: 1.875rem;
  font-weight: 700;
  line-height: 2.25rem;
  margin-bottom: 1.25rem;
  margin-top: 1.75rem;
  color: #111827;
}

.ql-editor h3 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 2rem;
  margin-bottom: 1rem;
  margin-top: 1.5rem;
  color: #111827;
}

.ql-editor h4 {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.75rem;
  margin-bottom: 0.75rem;
  margin-top: 1.25rem;
  color: #111827;
}

.ql-editor h5 {
  font-size: 1.125rem;
  font-weight: 600;
  line-height: 1.75rem;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
  color: #111827;
}

.ql-editor h6 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5rem;
  margin-bottom: 0.5rem;
  margin-top: 1rem;
  color: #374151;
}

/* Text Formatting */
.ql-editor strong,
.ql-editor b {
  font-weight: 700;
}

.ql-editor em,
.ql-editor i {
  font-style: italic;
}

.ql-editor u {
  text-decoration: underline;
}

.ql-editor s {
  text-decoration: line-through;
}

.ql-editor sub {
  vertical-align: sub;
  font-size: 0.75em;
}

.ql-editor sup {
  vertical-align: super;
  font-size: 0.75em;
}

/* Links */
.ql-editor a {
  color: #2563eb;
  text-decoration: underline;
  transition: color 0.2s;
}

.ql-editor a:hover {
  color: #1d4ed8;
}

/* Lists */
.ql-editor ol,
.ql-editor ul {
  margin-bottom: 1rem;
  margin-top: 1rem;
  padding-left: 2rem;
}

.ql-editor ol {
  list-style-type: decimal;
}

.ql-editor ul {
  list-style-type: disc;
}

.ql-editor li {
  margin-bottom: 0.5rem;
  padding-left: 0.5rem;
}

.ql-editor ol > li,
.ql-editor ul > li {
  list-style-position: outside;
}

.ql-editor ol ol,
.ql-editor ol ul,
.ql-editor ul ol,
.ql-editor ul ul {
  margin-top: 0.5rem;
  margin-bottom: 0.5rem;
}

.ql-editor ul ul {
  list-style-type: circle;
}

.ql-editor ul ul ul {
  list-style-type: square;
}

/* Blockquotes */
.ql-editor blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 1rem;
  margin-left: 0;
  margin-right: 0;
  margin-bottom: 1rem;
  margin-top: 1rem;
  font-style: italic;
  color: #4b5563;
  background-color: #f3f4f6;
  padding: 1rem;
  border-radius: 0.25rem;
}

/* Code Blocks */
.ql-editor pre {
  background-color: #1f2937;
  color: #f9fafb;
  overflow: visible;
  border-radius: 0.375rem;
  padding: 1rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
  white-space: pre-wrap;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875rem;
  line-height: 1.5;
}

.ql-editor code {
  background-color: #f3f4f6;
  color: #dc2626;
  padding: 0.125rem 0.375rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
}

.ql-editor pre code {
  background-color: transparent;
  color: inherit;
  padding: 0;
  border-radius: 0;
}

/* Images */
.ql-editor img {
  max-width: 100%;
  height: auto;
  border-radius: 0.375rem;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

/* Videos */
.ql-editor video {
  max-width: 100%;
  height: auto;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

/* Horizontal Rule */
.ql-editor hr {
  border: none;
  border-top: 2px solid #e5e7eb;
  margin: 2rem 0;
}

/* Text Alignment */
.ql-editor .ql-align-center {
  text-align: center;
}

.ql-editor .ql-align-right {
  text-align: right;
}

.ql-editor .ql-align-justify {
  text-align: justify;
}

/* Text Indent */
.ql-editor .ql-indent-1 {
  padding-left: 3rem;
}

.ql-editor .ql-indent-2 {
  padding-left: 6rem;
}

.ql-editor .ql-indent-3 {
  padding-left: 9rem;
}

.ql-editor .ql-indent-4 {
  padding-left: 12rem;
}

.ql-editor .ql-indent-5 {
  padding-left: 15rem;
}

.ql-editor .ql-indent-6 {
  padding-left: 18rem;
}

.ql-editor .ql-indent-7 {
  padding-left: 21rem;
}

.ql-editor .ql-indent-8 {
  padding-left: 24rem;
}

/* Font Sizes */
.ql-editor .ql-size-small {
  font-size: 0.75rem;
}

.ql-editor .ql-size-large {
  font-size: 1.5rem;
}

.ql-editor .ql-size-huge {
  font-size: 2.5rem;
}

/* Font Families */
.ql-editor .ql-font-serif {
  font-family: Georgia, "Times New Roman", serif;
}

.ql-editor .ql-font-monospace {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

/* Text Colors */
.ql-editor .ql-color-red {
  color: #dc2626;
}

.ql-editor .ql-color-orange {
  color: #ea580c;
}

.ql-editor .ql-color-yellow {
  color: #ca8a04;
}

.ql-editor .ql-color-green {
  color: #16a34a;
}

.ql-editor .ql-color-blue {
  color: #2563eb;
}

.ql-editor .ql-color-purple {
  color: #9333ea;
}

/* Background Colors */
.ql-editor .ql-bg-red {
  background-color: #fee2e2;
}

.ql-editor .ql-bg-orange {
  background-color: #ffedd5;
}

.ql-editor .ql-bg-yellow {
  background-color: #fef3c7;
}

.ql-editor .ql-bg-green {
  background-color: #dcfce7;
}

.ql-editor .ql-bg-blue {
  background-color: #dbeafe;
}

.ql-editor .ql-bg-purple {
  background-color: #f3e8ff;
}

/* Direction */
.ql-editor .ql-direction-rtl {
  direction: rtl;
  text-align: inherit;
}

/* Formulas */
.ql-editor .ql-formula {
  display: inline-block;
  background-color: #f3f4f6;
  padding: 0.25rem 0.5rem;
  border-radius: 0.25rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.875em;
}

/* Tables (if using table module) */
.ql-editor table {
  border-collapse: collapse;
  width: 100%;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

.ql-editor table td,
.ql-editor table th {
  border: 1px solid #e5e7eb;
  padding: 0.5rem;
}

.ql-editor table th {
  background-color: #f9fafb;
  font-weight: 600;
  text-align: left;
}

.ql-editor table tr:nth-child(even) {
  background-color: #f9fafb;
}

/* Empty paragraph fix */
.ql-editor p:empty::before,
.ql-editor h1:empty::before,
.ql-editor h2:empty::before,
.ql-editor h3:empty::before,
.ql-editor h4:empty::before,
.ql-editor h5:empty::before,
.ql-editor h6:empty::before {
  content: '\200B';
}

/* First and last element margins */
.ql-editor > *:first-child {
  margin-top: 0;
}

.ql-editor > *:last-child {
  margin-bottom: 0;
}
