/* Quill Editor Content Display Styles */
.quill-content {
    line-height: 1.6;
    color: #374151;
}

.dark .quill-content {
    color: #d1d5db;
}

.quill-content h1 {
    font-size: 2rem;
    font-weight: 700;
    margin: 1.5rem 0 1rem 0;
    color: #111827;
}

.dark .quill-content h1 {
    color: #f9fafb;
}

.quill-content h2 {
    font-size: 1.5rem;
    font-weight: 600;
    margin: 1.25rem 0 0.75rem 0;
    color: #111827;
}

.dark .quill-content h2 {
    color: #f9fafb;
}

.quill-content h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem 0;
    color: #111827;
}

.dark .quill-content h3 {
    color: #f9fafb;
}

.quill-content p {
    margin: 0.75rem 0;
}

.quill-content strong {
    font-weight: 600;
}

.quill-content em {
    font-style: italic;
}

.quill-content u {
    text-decoration: underline;
}

.quill-content ol, .quill-content ul {
    margin: 0.75rem 0;
    padding-left: 0;
    list-style: none;
}

/* Nested lists should have margin and proper indentation */
.quill-content li ol, .quill-content li ul {
    margin: 0.5rem 0;
    padding-left: 1.5rem;
}

.quill-content li {
    margin: 0.25rem 0;
    position: relative;
    padding-left: 1.5rem;
}

/* Nested list items should have less margin */
.quill-content li li {
    margin: 0.125rem 0;
}

.quill-content ul li::before {
    content: '🔸';
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

/* Nested ul items use different bullet */
.quill-content ul li ul li::before {
    content: '▫️';
    font-size: 1em;
}

.quill-content ol {
    counter-reset: list-counter;
}

.quill-content ol li {
    counter-increment: list-counter;
}

.quill-content ol li::before {
    content: counter(list-counter) '️⃣';
    position: absolute;
    left: 0;
    font-size: 1.2em;
}

/* Nested ol items use different numbering */
.quill-content ol li ol {
    counter-reset: nested-counter;
}

.quill-content ol li ol li {
    counter-increment: nested-counter;
}

.quill-content ol li ol li::before {
    content: counter(nested-counter, lower-alpha) ')️⃣';
    font-size: 1em;
}

/* Clear any inherited list styling for deeply nested lists */
.quill-content li li li {
    padding-left: 1.2rem;
}

.quill-content li li li::before {
    content: '◦';
    font-size: 0.8em;
}

.quill-content blockquote {
    border-left: 4px solid #e5e7eb;
    padding-left: 1rem;
    margin: 1rem 0;
    font-style: italic;
    color: #6b7280;
}

.dark .quill-content blockquote {
    border-left-color: #4b5563;
    color: #9ca3af;
}

.quill-content a {
    color: #3b82f6;
    text-decoration: underline;
}

.quill-content a:hover {
    color: #1d4ed8;
}

.dark .quill-content a {
    color: #60a5fa;
}

.dark .quill-content a:hover {
    color: #93c5fd;
}

.quill-content img {
    max-width: 100%;
    height: auto;
    margin: 1rem auto;
    border-radius: 0.375rem;
    border: 2px solid #e5e7eb;
    display: block;
}

.dark .quill-content img {
    border-color: #4b5563;
}

.quill-content pre {
    background-color: #f3f4f6;
    padding: 1rem;
    border-radius: 0.375rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.dark .quill-content pre {
    background-color: #1f2937;
    color: #d1d5db;
    border: 1px solid #4b5563;
}

.quill-content code {
    background-color: #f3f4f6;
    padding: 0.125rem 0.25rem;
    border-radius: 0.25rem;
    font-family: 'Courier New', monospace;
}

.dark .quill-content code {
    background-color: #374151;
    color: #d1d5db;
}

/* Table Support */
.quill-content table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
    border: 1px solid #e5e7eb;
}

.dark .quill-content table {
    border-color: #4b5563;
}

.quill-content td, .quill-content th {
    border: 1px solid #e5e7eb;
    padding: 0.5rem 0.75rem;
    text-align: left;
    vertical-align: top;
}

.dark .quill-content td, .dark .quill-content th {
    border-color: #4b5563;
}

.quill-content th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #111827;
}

.dark .quill-content th {
    background-color: #374151;
    color: #f9fafb;
}

.quill-content tbody tr:nth-child(even) {
    background-color: #f9fafb;
}

.dark .quill-content tbody tr:nth-child(even) {
    background-color: #1f2937;
}

/* Code Block Improvements */
.quill-content .ql-code-block-container {
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    margin: 1rem 0;
    overflow-x: auto;
}

.dark .quill-content .ql-code-block-container {
    background-color: #1f2937;
    border-color: #4b5563;
}

.quill-content .ql-code-block {
    background-color: transparent;
    color: #374151;
    font-family: 'Courier New', monospace;
    padding: 1rem;
    margin: 0;
    white-space: pre-wrap;
}

.dark .quill-content .ql-code-block {
    color: #d1d5db;
}