/* Force flowing text format - CSS-only solution for Port 8046 */

/* Hide numbered list numbers completely */
.message-content ol {
    list-style: none !important;
    counter-reset: none !important;
    padding-left: 0 !important;
    margin: 1rem 0 !important;
}

/* Transform list items into flowing paragraphs */
.message-content ol li {
    display: block !important;
    margin: 0.8rem 0 !important;
    padding-left: 0 !important;
    counter-increment: none !important;
}

/* Remove all list item markers */
.message-content ol li::before {
    content: none !important;
    display: none !important;
}

.message-content ol li::marker {
    display: none !important;
}

/* Make list items look like paragraphs */
.message-content li {
    list-style-type: none !important;
    list-style: none !important;
    margin-left: 0 !important;
    padding-left: 0 !important;
    text-indent: 0 !important;
}

/* Transform bold with colon pattern */
.message-content strong:contains(":"),
.message-content b:contains(":") {
    font-weight: 600 !important;
    color: #ffffff !important;
    background: linear-gradient(to bottom, transparent 65%, rgba(66, 153, 225, 0.2) 65%) !important;
    padding: 0 3px !important;
    border-radius: 2px !important;
}

/* Better bold emphasis */
.message-content strong,
.message-content b {
    font-weight: 600 !important;
    color: #ffffff !important;
    background: linear-gradient(to bottom, transparent 65%, rgba(66, 153, 225, 0.15) 65%) !important;
    padding: 0 2px !important;
    margin: 0 1px !important;
}

/* Transform bullet lists too */
.message-content ul {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 1rem 0 !important;
}

.message-content ul li {
    position: relative !important;
    padding-left: 1.5rem !important;
    margin: 0.6rem 0 !important;
    list-style: none !important;
}

/* Simple arrow for bullets */
.message-content ul li::before {
    content: "→" !important;
    position: absolute !important;
    left: 0 !important;
    color: #4299e1 !important;
    font-weight: normal !important;
}

/* Base text formatting */
.message-content {
    font-size: 15px !important;
    line-height: 1.7 !important;
    color: #e2e8f0 !important;
}

/* Paragraphs */
.message-content p {
    margin: 0.9rem 0 !important;
    line-height: 1.7 !important;
}

/* Headers - subtle */
.message-content h1,
.message-content h2,
.message-content h3 {
    margin-top: 1.5rem !important;
    margin-bottom: 0.8rem !important;
    font-weight: 500 !important;
}

.message-content h2 {
    font-size: 1.4rem !important;
    color: #4299e1 !important;
}

.message-content h3 {
    font-size: 1.2rem !important;
    color: #63b3ed !important;
}

/* Code blocks */
.message-content pre {
    margin: 1.2rem 0 !important;
    padding: 1rem !important;
    background: #1a202c !important;
    border-radius: 6px !important;
    border-left: 3px solid #4299e1 !important;
}

/* Inline code */
.message-content code:not(pre code) {
    padding: 2px 6px !important;
    margin: 0 2px !important;
    background: rgba(66, 153, 225, 0.1) !important;
    border-radius: 3px !important;
    color: #90cdf4 !important;
    font-size: 0.92em !important;
}

/* Horizontal rules */
.message-content hr {
    margin: 1.5rem 0 !important;
    border: none !important;
    height: 1px !important;
    background: linear-gradient(to right, transparent, rgba(66, 153, 225, 0.2), transparent) !important;
}

/* Links */
.message-content a {
    color: #4299e1 !important;
    text-decoration: none !important;
    border-bottom: 1px dotted rgba(66, 153, 225, 0.4) !important;
}

.message-content a:hover {
    color: #63b3ed !important;
    border-bottom-style: solid !important;
}

/* Force display override for numbered lists */
.message-content ol[style*="list-style"],
.message-content ul[style*="list-style"] {
    list-style: none !important;
}

/* Remove any inline styles that might override */
.message-content li[style*="list-style"] {
    list-style: none !important;
}

/* Nuclear option - hide all numbers */
.message-content li:first-child::first-letter {
    font-size: 0 !important;
}

/* If numbers still show, make them invisible */
.message-content ol {
    color: inherit !important;
}

.message-content ol li::marker {
    color: transparent !important;
    font-size: 0 !important;
}

/* Transform numbered lists visually into paragraphs */
.message-content ol + p,
.message-content p + ol {
    margin-top: 0.5rem !important;
}

/* Make consecutive list items flow better */
.message-content li + li {
    margin-top: 0.8rem !important;
}

/* Special handling for first list item */
.message-content li:first-child {
    margin-top: 0 !important;
}

/* Special handling for last list item */
.message-content li:last-child {
    margin-bottom: 0 !important;
}
