
/* Styles for Markdown Viewer */
.markdown-viewer {
    display: flex;
    flex-direction: column;
    height: 100%;
    background-color: inherit;
    color: inherit;
    overflow: hidden; /* Prevent overall container from scrolling */
}

.markdown-viewer-header {
    padding: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    flex-shrink: 0; /* Prevent header from shrinking */
}

.markdown-content {
    flex: 1;
    padding: 10px;
    overflow-y: auto; /* Only this container should scroll */
    background-color: #e0e0e0;
    color: inherit;
    margin: 0 10px 0 0 ;
}

.markdown-content-workflow {
    flex: 1;
    padding: 10px;
    overflow-y: auto; /* Only this container should scroll */
    background-color: inherit;
    color: inherit;
    margin: 0 10px 0 0 ;
}

/* Style for rendered markdown - applies to all markdown containers */
#rendered-markdown,
#rendered-tab-content {
    color: #e0e0e0;
    background-color: inherit;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    letter-spacing: 0.8px;
    line-height: 1.6;
    font-weight: 430;
}

/* Headings */
#rendered-markdown h1,
#rendered-markdown h2,
#rendered-markdown h3,
#rendered-tab-content h1,
#rendered-tab-content h2,
#rendered-tab-content h3 {
    color: #e0e0e0;
    margin-top: 0.5em;
    margin-bottom: 0.25em;
}

#rendered-markdown h3,
#rendered-tab-content h3 {
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.15em;
}

/* Paragraphs */
#rendered-markdown p,
#rendered-tab-content p {
    margin-top: 0.2em;
    margin-bottom: 0.3em;
}

/* Lists - unified styles for all markdown and chat containers */
#rendered-markdown ul, 
#rendered-markdown ol,
#rendered-tab-content ul,
#rendered-tab-content ol,
.llm ul,
.llm ol {
    margin-left: 2em;
    margin-bottom: 0.5em;
    margin-top: 0.5em;
    display: block;
    padding-left: 0.5em;
    list-style-position: outside;
}

#rendered-markdown li,
#rendered-tab-content li,
.llm li {
    margin-bottom: 0.4em;
    display: list-item;
    padding-left: 0.3em;
}

#rendered-markdown ul ul, 
#rendered-markdown ol ol,
#rendered-markdown ul ol,
#rendered-markdown ol ul,
#rendered-tab-content ul ul,
#rendered-tab-content ol ol,
#rendered-tab-content ul ol,
#rendered-tab-content ol ul,
.llm ul ul, 
.llm ol ol,
.llm ul ol, 
.llm ol ul {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
}

/* List style types */
#rendered-markdown ul,
#rendered-tab-content ul,
.llm ul {
    list-style-type: disc;
}

#rendered-markdown ul ul,
#rendered-tab-content ul ul,
.llm ul ul {
    list-style-type: circle;
}

#rendered-markdown ol,
#rendered-tab-content ol {
    list-style-type: decimal;
}

/* Blockquotes */
#rendered-markdown blockquote,
#rendered-tab-content blockquote {
    border-left: 4px solid #555 !important;
    padding-left: 16px !important;
    margin-left: 0 !important;
}

/* Mermaid diagram styles - applies to all containers */
.markdown-content .mermaid polygon,
.markdown-content-workflow .mermaid polygon,
#rendered-tab-content .mermaid polygon {
    fill: rgba(255, 255, 255, 0.9) !important;
}

/* Override SVG text to be dark */
.markdown-content .mermaid .label,
.markdown-content-workflow .mermaid .label,
#rendered-tab-content .mermaid .label {
    color: #000000 !important;
    font-weight: normal !important;
}

.markdown-content .mermaid text,
.markdown-content-workflow .mermaid text,
#rendered-tab-content .mermaid text {
    fill: #000000 !important;
    font-weight: normal !important;
}

.markdown-content .mermaid .node rect,
.markdown-content .mermaid .node circle,
.markdown-content .mermaid .node polygon,
.markdown-content .mermaid .node path,
.markdown-content-workflow .mermaid .node rect,
.markdown-content-workflow .mermaid .node circle,
.markdown-content-workflow .mermaid .node polygon,
.markdown-content-workflow .mermaid .node path,
#rendered-tab-content .mermaid .node rect,
#rendered-tab-content .mermaid .node circle,
#rendered-tab-content .mermaid .node polygon,
#rendered-tab-content .mermaid .node path {
    stroke: #000000 !important;
}

/* Make all arrow parts blue and thicker */
.markdown-content .mermaid .edgePath .path,
.markdown-content .mermaid .flowchart-link,
.markdown-content .mermaid line,
.markdown-content-workflow .mermaid .edgePath .path,
.markdown-content-workflow .mermaid .flowchart-link,
.markdown-content-workflow .mermaid line,
#rendered-tab-content .mermaid .edgePath .path,
#rendered-tab-content .mermaid .flowchart-link,
#rendered-tab-content .mermaid line {
    stroke: #5aa0d5 !important;
    stroke-width: 4px !important;
}

.markdown-content .mermaid .arrowheadPath,
.markdown-content .mermaid marker path,
.markdown-content-workflow .mermaid .arrowheadPath,
.markdown-content-workflow .mermaid marker path,
#rendered-tab-content .mermaid .arrowheadPath,
#rendered-tab-content .mermaid marker path {
    fill: #5aa0d5 !important;
    stroke: #5aa0d5 !important;
}

/* Edge thickness classes */
.edge-thickness-normal,
.markdown-content .mermaid .edge-thickness-normal,
.markdown-content-workflow .mermaid .edge-thickness-normal,
#rendered-tab-content .mermaid .edge-thickness-normal {
    stroke-width: 4px !important;
}

.edge-thickness-thick,
.markdown-content .mermaid .edge-thickness-thick,
.markdown-content-workflow .mermaid .edge-thickness-thick,
#rendered-tab-content .mermaid .edge-thickness-thick {
    stroke-width: 5px !important;
}

/* Improve marker visibility */
.markdown-content .mermaid marker,
.markdown-content-workflow .mermaid marker,
#rendered-tab-content .mermaid marker {
    fill: #5aa0d5 !important;
}

/* Additional styles for edge paths */
.markdown-content .mermaid .edgePaths .path,
.markdown-content-workflow .mermaid .edgePaths .path,
#rendered-tab-content .mermaid .edgePaths .path {
    stroke: #5aa0d5 !important;
    stroke-width: 4px !important;
}

.markdown-content .mermaid .edgeLabel,
.markdown-content-workflow .mermaid .edgeLabel,
#rendered-tab-content .mermaid .edgeLabel {
    background-color: rgba(204, 241, 235, 0.9) !important;
    color: #000000 !important;
}

.mermaid-container1, 
.mermaid-container2 {
    margin: 0 auto;
}

/* Style for code blocks */
#rendered-markdown pre,
#rendered-tab-content pre {
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 12px;
    overflow-x: auto;
    margin: 15px 0;
}

#rendered-markdown code,
#rendered-tab-content code {
    font-family: monospace;
    color: #e6e6e6;
}

/* Ensure scrollbar styling is consistent */
.markdown-content::-webkit-scrollbar {
    width: 8px;
}

.markdown-content::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.markdown-content::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

/* Container styling to maintain consistency */
.content__section {
    display: grid;
    grid-template-columns: 45% 0.1% 54.9%;
    height: 100%;
}

/* Ensure divider is visible */
.divider {
    background-color: rgba(255, 255, 255, 0.1);
    width: 100%;
    cursor: ew-resize;
}

.markdown-content .highlight-red,
.markdown-content-workflow .highlight-red,
#rendered-tab-content .highlight-red,
#rendered-markdown .highlight-red {
    color: #d9534f;
}

.markdown-content .highlight-blue,
.markdown-content-workflow .highlight-blue,
#rendered-tab-content .highlight-blue,
#rendered-markdown .highlight-blue {
    color: #4f71d9;
}

.markdown-content .highlight-green,
.markdown-content-workflow .highlight-green,
#rendered-tab-content .highlight-green,
#rendered-markdown .highlight-green {
    color: #88b651;
}

#rendered-tab-content table,
#rendered-markdown table,
.markdown-content table,
.markdown-content-workflow table {
    width: 80%;
    border-collapse: collapse;
    margin: 10px 10px;
}

#rendered-tab-content th,
#rendered-markdown th,
.markdown-content th,
.markdown-content-workflow th{
    border: 1px solid rgba(255, 255, 255, 0.25);
    background-color: rgb(40, 40, 40);
    padding: 10px 10px;
    text-align: center;
    font-weight: bold;
}

#rendered-tab-content td,
#rendered-markdown td,
.markdown-content td,
.markdown-content-workflow td {
    border: 1px solid rgba(255, 255, 255, 0.25);
    padding: 10px 10px;
    text-align: left;
}
