.text-editor-content {
    text-align: left !important;
    color: #334155 !important;
    font-size: 16px !important;
    line-height: 1.75 !important;
    font-weight: 400 !important;
}

.text-editor-content,
.text-editor-content * {
    font-family: inherit !important;
    box-sizing: border-box !important;
}

.text-editor-content p {
    margin-top: 0 !important;
    margin-bottom: 1.25em !important;
}

.text-editor-content strong,
.text-editor-content b {
    font-weight: 600 !important;
    color: #0f172a !important;
}

.text-editor-content em {
    font-style: italic !important;
}

.text-editor-content a {
    /* color: #16a34a !important; */
    text-decoration: underline !important;
    text-underline-offset: 3px !important;
    text-decoration-color: rgba(22, 163, 74, 0.3) !important;
    transition: text-decoration-color 0.2s ease, color 0.2s ease !important;
    font-weight: 500 !important;
}

.text-editor-content a:hover {
    color: #15803d !important;
    text-decoration-color: #16a34a !important;
}

.text-editor-content h1,
.text-editor-content h2,
.text-editor-content h3,
.text-editor-content h4,
.text-editor-content h5,
.text-editor-content h6 {
    color: #0f172a !important;
    font-weight: 700 !important;
    margin-top: 2em !important;
    margin-bottom: 1em !important;
    line-height: 1.3 !important;
}

.text-editor-content h1 { font-size: 2.25em !important; margin-top: 0 !important; }
.text-editor-content h2 { font-size: 1.75em !important; border-bottom: 1px solid #e2e8f0 !important; padding-bottom: 0.3em !important; }
.text-editor-content h3 { font-size: 1.375em !important; }
.text-editor-content h4 { font-size: 1.125em !important; }
.text-editor-content h5 { font-size: 1em !important; }

.text-editor-content ul {
    list-style-type: disc !important;
    padding-left: 1.625em !important;
    margin-top: 1.25em !important;
    margin-bottom: 1.25em !important;
}

.text-editor-content ol {
    list-style-type: decimal !important;
    padding-left: 1.625em !important;
    margin-top: 1.25em !important;
    margin-bottom: 1.25em !important;
}

.text-editor-content li {
    margin-top: 0.5em !important;
    margin-bottom: 0.5em !important;
    padding-left: 0.375em !important;
}

.text-editor-content blockquote {
    font-weight: 500 !important;
    font-style: italic !important;
    color: #1e293b !important;
    border-left: 4px solid #16a34a !important;
    background-color: #f0fdf4 !important;
    margin: 1.6em 0 !important;
    padding: 1.2em 1.5em !important;
    border-radius: 0 8px 8px 0 !important;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05) !important;
}

.text-editor-content blockquote p:last-child {
    margin-bottom: 0 !important;
}

.text-editor-content code {
    color: #0f172a !important;
    font-weight: 600 !important;
    font-size: 0.875em !important;
    background-color: #f1f5f9 !important;
    padding: 0.25em 0.4em !important;
    border-radius: 0.25rem !important;
}

.text-editor-content pre {
    color: #f8fafc !important;
    background-color: #0f172a !important;
    overflow-x: auto !important;
    font-size: 0.875em !important;
    line-height: 1.7142857 !important;
    margin-top: 1.7142857em !important;
    margin-bottom: 1.7142857em !important;
    border-radius: 0.5rem !important;
    padding: 1.1428571em 1.4285714em !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06) !important;
}

.text-editor-content pre code {
    background-color: transparent !important;
    border-width: 0 !important;
    border-radius: 0 !important;
    padding: 0 !important;
    font-weight: 400 !important;
    color: inherit !important;
    font-size: inherit !important;
}

.text-editor-content img,
.text-editor-content video {
    margin-top: 2em !important;
    margin-bottom: 2em !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05) !important;
    max-width: 100% !important;
    height: auto !important;
}

.text-editor-content iframe {
    width: 100% !important;
    aspect-ratio: 16 / 9 !important;
    border-radius: 0.75rem !important;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1) !important;
    margin-top: 2em !important;
    margin-bottom: 2em !important;
    border: 0 !important;
}

.text-editor-content hr {
    border-color: #e2e8f0 !important;
    border-top-width: 1px !important;
    margin-top: 3em !important;
    margin-bottom: 3em !important;
}

.text-editor-content table {
    width: 100% !important;
    table-layout: auto !important;
    text-align: left !important;
    margin-top: 2em !important;
    margin-bottom: 2em !important;
    font-size: 0.875em !important;
    line-height: 1.7142857 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border: 1px solid #e2e8f0 !important;
    border-radius: 0.5rem !important;
    overflow: hidden !important;
}

.text-editor-content thead {
    border-bottom: 1px solid #e2e8f0 !important;
    background-color: #f8fafc !important;
}

.text-editor-content thead th {
    color: #0f172a !important;
    font-weight: 600 !important;
    padding: 0.75em 1em !important;
    border-bottom: 1px solid #e2e8f0 !important;
}

.text-editor-content tbody td {
    padding: 0.75em 1em !important;
    border-bottom: 1px solid #f1f5f9 !important;
}

.text-editor-content tbody tr:last-child td {
    border-bottom: 0 !important;
}

.text-editor-content tbody tr:hover td {
    background-color: #f8fafc !important;
}

.text-editor-content * {
    max-width: 100% !important;
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

@media (max-width: 768px) {
    .text-editor-content {
        font-size: 15px !important;
        line-height: calc(1.6em + 5px) !important;
    }

    .text-editor-content h2 {
        font-size: 1.5em !important;
    }

    .text-editor-content h3 {
        font-size: 1.25em !important;
    }

    .text-editor-content blockquote {
        padding: 1em 1.2em !important;
        margin: 1.2em 0 !important;
    }

    .text-editor-content img,
    .text-editor-content video,
    .text-editor-content iframe {
        margin-top: 1.5em !important;
        margin-bottom: 1.5em !important;
        border-radius: 0.5rem !important;
    }
    
    .text-editor-content table {
        font-size: 0.8125em !important;
        display: block !important;
        overflow-x: auto !important;
    }
}

@media (max-width: 480px) {
    .text-editor-content {
        font-size: 14px !important;
    }
    
    .text-editor-content h2 {
        font-size: 1.3em !important;
    }
}

.text-editor-content .text-muted-foreground {
    color: hsl(210deg 8.4% 22.7%) !important;
}
