/* Rich Text Content Styles - For HTML content from RichTextEditor */
/* Apply these styles to any container displaying HTML from database */

.rich-content h1 {
    font-size: 2em;
    font-weight: bold;
    margin-top: 0.67em;
    margin-bottom: 0.67em;
    line-height: 1.3;
}

.rich-content h2 {
    font-size: 1.5em;
    font-weight: bold;
    margin-top: 0.83em;
    margin-bottom: 0.83em;
    line-height: 1.3;
}

.rich-content h3 {
    font-size: 1.17em;
    font-weight: bold;
    margin-top: 1em;
    margin-bottom: 1em;
    line-height: 1.3;
}

.rich-content h4 {
    font-size: 1em;
    font-weight: bold;
    margin-top: 1.33em;
    margin-bottom: 1.33em;
    line-height: 1.3;
}

.rich-content h5 {
    font-size: 0.83em;
    font-weight: bold;
    margin-top: 1.67em;
    margin-bottom: 1.67em;
    line-height: 1.3;
}

.rich-content h6 {
    font-size: 0.67em;
    font-weight: bold;
    margin-top: 2.33em;
    margin-bottom: 2.33em;
    line-height: 1.3;
}

.rich-content p {
    margin-top: 1em;
    margin-bottom: 1em;
    line-height: 1.6;
}

.rich-content ul {
    list-style-type: disc;
    padding-left: 1.5rem;
    margin-top: 1em;
    margin-bottom: 1em;
}

.rich-content ol {
    list-style-type: decimal;
    padding-left: 1.5rem;
    margin-top: 1em;
    margin-bottom: 1em;
}

.rich-content ul ul {
    list-style-type: circle;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.rich-content ul ul ul {
    list-style-type: square;
}

.rich-content ol ol {
    list-style-type: lower-alpha;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

.rich-content ol ol ol {
    list-style-type: lower-roman;
}

.rich-content li {
    margin-bottom: 0.5em;
}

.rich-content blockquote {
    border-left: 4px solid #d1d5db;
    padding-left: 1rem;
    font-style: italic;
    color: #4b5563;
    margin: 1.5em 0;
}

.rich-content pre {
    background-color: #1e293b;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
    margin: 1em 0;
    font-family: 'Courier New', Courier, monospace;
}

.rich-content code {
    background-color: #f1f5f9;
    color: #1e293b;
    padding: 0.2em 0.4em;
    border-radius: 0.25rem;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.9em;
}

.rich-content pre code {
    background-color: transparent;
    color: inherit;
    padding: 0;
}

.rich-content a {
    color: #2563eb;
    text-decoration: underline;
}

.rich-content a:hover {
    color: #1d4ed8;
}

.rich-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.5rem;
    margin: 1em 0;
}

.rich-content strong {
    font-weight: bold;
}

.rich-content em {
    font-style: italic;
}

.rich-content u {
    text-decoration: underline;
}

.rich-content s,
.rich-content del {
    text-decoration: line-through;
}

.rich-content mark {
    background-color: #fef08a;
    padding: 0.1em 0.2em;
    border-radius: 0.125rem;
}

/* Text alignment */
.rich-content [style*="text-align: left"] {
    text-align: left;
}

.rich-content [style*="text-align: center"] {
    text-align: center;
}

.rich-content [style*="text-align: right"] {
    text-align: right;
}

.rich-content [style*="text-align: justify"] {
    text-align: justify;
}

/* Horizontal rule */
.rich-content hr {
    border: none;
    border-top: 2px solid #e5e7eb;
    margin: 2em 0;
}

/* Table styles */
.rich-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1em 0;
}

.rich-content table th,
.rich-content table td {
    border: 1px solid #e5e7eb;
    padding: 0.5rem;
    text-align: left;
}

.rich-content table th {
    background-color: #f9fafb;
    font-weight: bold;
}

/* Text colors - preserve inline styles */
.rich-content [style*="color"] {
    /* Color is preserved from inline style */
}

/* Background colors/highlights - preserve inline styles */
.rich-content [style*="background-color"] {
    /* Background color is preserved from inline style */
}

/* Font sizes - preserve inline styles */
.rich-content [style*="font-size"] {
    /* Font size is preserved from inline style */
}
