* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
:root {
    --AIMblue: #4353A3;
    --darkBlue: #38416D;
    --teal: #5DC8B9;
    --cream: #F1EEDE;
    --grey: #e7e9ec;
    --rust: #AF4510;
    --navy: #12195C;
    --white: #ffffff;
    --lightBlue: #AEBAE4;
  }

body {
font-family: "IBM Plex Sans", sans-serif;
  background-color: #f5f5f5;
  height: 100vh;
  overflow: hidden;
}

.container {
  max-width: 900px;
  margin: 0 auto;
  height: 100vh;
  display: flex;
  flex-direction: column;
  background-color: white;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

.header {
  padding: 0 10px;
  border-bottom: 1px solid #e0e0e0;
  background-color: #fff;
}

.header h1 {
  font-size: 24px;
  color: #333;
  margin: 10px;
}

.chat-container {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
  overflow-y: auto;
  height: 400px;
}

.message {
  display: flex;
  gap: 12px;
  max-width: 85%;
}

.message.user {
  margin-left: auto;
  flex-direction: row-reverse;
}

.message-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 14px;
  flex-shrink: 0;
}

.message.user .message-avatar {
  background-color: var(--AIMblue);
  color: white;
}

.message.assistant .message-avatar {
  background-color: var(--teal);
  color: white;
}

.message-content {
  background-color: #f8f8f8;
  padding: 1rem;
  border-radius: 12px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.message.user .message-content {
  background-color: #AEBAE450;
}

.input-section {
  padding: 20px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  gap: 10px;
  margin-bottom: 15px;
}

#messageInput {
  flex: 1;
  padding: 12px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
}

.send-btn {
  padding: 12px 24px;
  background-color: var(--AIMblue);
  color: white;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  align-self: flex-end;
  line-height: 4;
}

.send-btn:hover:not(:disabled) {
  background-color: var(--rust);
}

.send-btn:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

.loading {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
}

.loading-dot {
  width: 8px;
  height: 8px;
  background-color: var(--teal);
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out;
}

.loading-dot:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dot:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes bounce {
  0%, 80%, 100% {
    transform: scale(0);
  }
  40% {
    transform: scale(1);
  }
}

/* @media screen and (min-width: 750px) {
  .message {
  flex-wrap: wrap;
}
} */

.markdown-table {
  border-collapse: collapse;
  margin: 1em 0;
  width: 100%;
}

.markdown-table th,
.markdown-table td {
  border: 1px solid #ddd;
  padding: 8px;
  text-align: left;
}

.markdown-table th {
  background-color: #f5f5f5;
  font-weight: bold;
}

.markdown-table tr:nth-child(even) {
  background-color: #f9f9f9;
}

.table-container {
  margin: 1em 0;
  overflow-x: auto;
}

.table-container p {
  margin: 0;
}

p {
  margin: 5px 0;
}

h1 {
  margin: 20px 0 10px 0;
}

ul.markdown-list {
  margin-left: 2em;
  margin-top: 0.5em;
  margin-bottom: 0.5em;
  padding-left: 1.5em;
}
 
ul.markdown-list li {
  margin-bottom: 0.4em;
  line-height: 1.5;
}
 
/* Ensure proper spacing between lists and other elements */
ul.markdown-list + p,
p + ul.markdown-list,
ul.markdown-list + h1,
ul.markdown-list + h2,
ul.markdown-list + h3 {
  margin-top: 1em;
}