/* Custom styles for the Jekyll theme */

/* Ensure code blocks wrap on mobile and lists within them display correctly */
pre {
  white-space: pre-wrap !important; /* Preserves whitespace and wraps text */
  word-wrap: break-word !important; /* Breaks words if they overflow container */
  overflow-wrap: break-word !important; /* Newer property for wrapping, preferred */
  line-height: 1.5 !important; /* Ensure adequate line spacing */
}

/* Also apply to inline code elements if they appear in pre blocks */
pre code {
  white-space: pre-wrap !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  display: block; /* Ensure each code line acts as a block */
}

/* Ensure general code elements also wrap without breaking words unnaturally */
code {
  word-wrap: break-word !important; /* Breaks words if they overflow container */
  overflow-wrap: break-word !important; /* Newer property for wrapping, preferred */
  word-break: normal; /* Override break-all if it was applied globally */
}

/* Styling for rendered user prompts */
.user-prompt-rendered {
  background-color: #f0f8ff; /* Light blue background */
  border-left: 5px solid #007bff; /* Blue border */
  padding: 1em;
  margin-bottom: 1em;
  border-radius: 0 5px 5px 0;
  overflow-wrap: break-word; /* Ensure long lines break */
  word-wrap: break-word; /* Compatibility */
  word-break: break-word; /* Break long words if necessary */
  hyphens: auto; /* Allow hyphenation if possible */
}

/* Styling for rendered LLM responses */
.llm-response-rendered {
  background-color: #f9f9f9; /* Light gray background */
  border-left: 5px solid #28a745; /* Green border */
  padding: 1em;
  margin-bottom: 1em;
  border-radius: 0 5px 5px 0;
  overflow-wrap: break-word; /* Ensure long lines break */
  word-wrap: break-word; /* Compatibility */
  word-break: break-word; /* Break long words if necessary */
  hyphens: auto; /* Allow hyphenation if possible */
}
