/* 1. Hide Graph View contents */
.graph-view-outer {
  display: none !important;
}

/* 2. Hide the entire right column */
.site-body-right-column {
  display: none !important;
}

/* 3. Expand the center column to take up all free space */
.site-body-center-column {
  flex: 1 1 auto !important;
  width: 100% !important;
  max-width: none !important;
}



.markdown-preview-view .dialog-container h1,
.markdown-preview-view .dialog-container h2,
.markdown-preview-view .dialog-container h3,
.markdown-preview-view .dialog-container h4,
.markdown-preview-view .dialog-container h5,
.markdown-preview-view .dialog-container h6,
.markdown-preview-view .dialog-container,
.markdown-preview-view .dialog-container * {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Reduce spacing after headings inside dialog */
.markdown-preview-view .dialog-container h1,
.markdown-preview-view .dialog-container h2,
.markdown-preview-view .dialog-container h3,
.markdown-preview-view .dialog-container h4,
.markdown-preview-view .dialog-container h5,
.markdown-preview-view .dialog-container h6 {
  margin-top: 0.2em !important;
  margin-bottom: 0.1em !important; /* Reduce the space after headings */
}

/* Reduce spacing for lists and list items */
.markdown-preview-view .dialog-container ol,
.markdown-preview-view .dialog-container ul {
  margin-top: 0.3em !important;
  margin-bottom: 0.3em !important;
  padding-left: 1.5em !important; /* Reduce indentation */
}

/* Reduce spacing for list items */
.markdown-preview-view .dialog-container li {
  margin-top: 0.1em !important;
  margin-bottom: 0.1em !important;
  padding: 0 !important;
}

/* Reduce spacing between a heading and a list that follows it */
.markdown-preview-view .dialog-container h1 + ul,
.markdown-preview-view .dialog-container h2 + ul,
.markdown-preview-view .dialog-container h3 + ul,
.markdown-preview-view .dialog-container h4 + ul,
.markdown-preview-view .dialog-container h5 + ul,
.markdown-preview-view .dialog-container h6 + ul,
.markdown-preview-view .dialog-container h1 + ol,
.markdown-preview-view .dialog-container h2 + ol,
.markdown-preview-view .dialog-container h3 + ol,
.markdown-preview-view .dialog-container h4 + ol,
.markdown-preview-view .dialog-container h5 + ol,
.markdown-preview-view .dialog-container h6 + ol {
  margin-top: 0.2em !important;
}

/* Ensure paragraphs before lists don't have too much space */
.markdown-preview-view .dialog-container p + ul,
.markdown-preview-view .dialog-container p + ol {
  margin-top: 0.2em !important;
}

/* For the first heading in a message, reduce top margin too */
.message .content h1:first-child,
.message .content h2:first-child,
.message .content h3:first-child,
.message .content h4:first-child,
.message .content h5:first-child,
.message .content h6:first-child {
  margin-top: 0.3em !important;
}

/* Target headings followed by text and then lists */
.markdown-preview-view .dialog-container h3 + p {
    margin-top: 0.2em !important;
    margin-bottom: 0.2em !important;
  }
  
  /* Specifically target text before lists */
  .markdown-preview-view .dialog-container p + ul,
  .markdown-preview-view .dialog-container p + ol {
    margin-top: 0.1em !important;
  }
  
  /* Ensure any text paragraphs have minimal spacing */
  .markdown-preview-view .dialog-container p {
    margin-top: 0.3em !important;
    margin-bottom: 0.3em !important;
  }
  
  /* Add a stronger rule for lists anywhere in the container */
  .markdown-preview-view .dialog-container ul,
  .markdown-preview-view .dialog-container ol {
    margin-top: 0.2em !important;
    margin-bottom: 0.2em !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }

  /* Target the line of text between heading and list */
.markdown-preview-view .dialog-container h3 + p + ul {
    margin-top: 0.1em !important;
  }
  
  /* Make sure the paragraph immediately after heading has minimal spacing */
.markdown-preview-view .dialog-container h3 + p {
    margin-top: 0.1em !important;
    margin-bottom: 0.1em !important;
  }

/* Reduce spacing within text elements */
.markdown-preview-view .message .text {
    white-space: pre-wrap;
    line-height: 1.4 !important; /* Tighten line spacing */
  }
  
  /* Adjust padding for content */
  .markdown-preview-view  .message .content {
    padding: 0 !important; /* Remove any padding */
  }
  
  /* Adjust spacing between paragraphs if needed */
  .markdown-preview-view  .message .text p {
    margin-top: 0.5em !important;
    margin-bottom: 0.5em !important;
  }
  
  /* Ensure tight spacing between elements */
  .markdown-preview-view  .speaker {
    margin-bottom: 2px !important; /* Reduce space between speaker name and text */
  }

  .markdown-preview-view   .text {
    font-size: 14px !important;
  }

  .markdown-preview-view body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
    color: #333;
    line-height: 1.6;
}

.markdown-preview-view .dialog-container {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.markdown-preview-view .dialog-header {
    background-color: #4a5568;
    color: white;
    padding: 15px 20px;
    font-weight: bold;
    font-size: 1.2em;
}

.markdown-preview-view .message {
    padding: 15px 20px;
    border-bottom: 1px solid #edf2f7;
    display: flex;
}

.markdown-preview-view .message:last-child {
    border-bottom: none;
}

.markdown-preview-view .human {
    background-color: #f8fafc;
}

.markdown-preview-view .assistant {
    background-color: white;
}

.markdown-preview-view .icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    margin-right: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: white;
}

.markdown-preview-view .human .icon {
    background-color: #3182ce;
}

.markdown-preview-view .assistant .icon {
    background-color: #38a169;
}

.markdown-preview-view .content {
    flex-grow: 1;
}

.speaker {
    font-weight: bold;
    margin-bottom: 5px;
}

.markdown-preview-view .human .speaker {
    color: #3182ce;
}

.markdown-preview-view .assistant .speaker {
    color: #38a169;
}

.markdown-preview-view .text {
    white-space: pre-wrap;
}

.markdown-preview-view .human .text {
    color: #2d3748;
}

.markdown-preview-view .assistant .text {
    color: #1a202c;
}

/* For code blocks */
.markdown-preview-view pre {
    background-color: #f7fafc;
    border-radius: 5px;
    padding: 10px;
    overflow-x: auto;
    border: 1px solid #e2e8f0;
}

.markdown-preview-view code {
    font-family: Consolas, Monaco, 'Andale Mono', monospace;
    font-size: 0.9em;
}
