body {
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #333;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  height: 100vh;
}

#chat-container {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 70%;
}

#main-wrapper {
  display: flex;
  flex-grow: 1;
  overflow: hidden;
}

#conversation-header {
  display: flex;
  justify-content: start;
  gap: 40px;
  align-items: center;
  padding: 10px 25px 25px 25px;
  background-color: blur(2px);
}

#conversation-header .current-conversation {
  font-size: 20px;
  font-weight: bold;
}

#conversation-header .edit-button {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  color: #666;
  width: 40px;
  height: 40px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-radius: 8px;
}

#conversation-header .edit-button:hover {
  background-color: #f0f0f0;
}

#chat-wrapper {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(2px); /* Creates the frosted glass effect */
  overflow: hidden;
}

#chat-box {
  flex-grow: 1;
  padding: 20px;
  overflow-y: auto;
  backdrop-filter: blur(2px); /* Creates the frosted glass effect */
  display: flex;
  flex-direction: column;
  gap: 15px;
  direction: ltr;
}

/* Default LTR Styles */
.user-message, .responseMessage {
  text-align: left;
  direction: ltr;
}

/* RTL Overrides */
html[dir="rtl"] .user-message, html[dir="rtl"] .responseMessage {
  text-align: right;
  direction: rtl;
}

#chat-box div.responseMessage {
  margin: 0;
  padding: 15px;
  border-radius: 10px;
  background-color: white;
  width: fit-content;
  max-width: 70%;
  word-wrap: break-word;
  font-size: 16px;
  line-height: 1.4;
  unicode-bidi: isolate;
}

div#streamingContent {
  margin: 0;
  padding: 15px;
  border-radius: 10px;
  background-color: white;
  width: fit-content;
  max-width: 70%;
  word-wrap: break-word;
  font-size: 16px;
  line-height: 1.4;
}

#chat-box div.responseMessage p,
#chat-box div.streamingContent p {
  margin: 0;
  width: fit-content;
  max-width: 100%;
  word-wrap: break-word;
  font-size: 16px;
  line-height: 1.4;
}

#chat-box div.user-message {
  margin: 0;
  padding: 15px;
  border-radius: 10px;
  background-color: #0078d7;
  color: #fff;
  align-self: flex-end;
  white-space: pre-wrap;
}

#chat-box .bot-message {
  margin: 0;
  padding: 15px;
  border-radius: 10px;
  background-color: white;
  width: fit-content;
  max-width: 70%;
  word-wrap: break-word;
  font-size: 16px;
  line-height: 1.4;
}

#ellipsisContainer {
  display: flex;
  width: 100%;
  justify-content: center;
  align-items: center;
  height: 30px;
  backdrop-filter: blur(2px); /* Creates the frosted glass effect */
  gap: 10px;
}

.loading-text {
  font-size: 16px;
  font-weight: normal;
  color: #007bff;
}

.bouncing-dots {
  display: flex;
  gap: 8px;
}

.bouncing-dots div {
  width: 12px;
  height: 12px;
  background-color: #007bff;
  border-radius: 50%;
  animation: bounce 1.4s infinite ease-in-out both;
}

.bouncing-dots div:nth-child(1) {
  animation-delay: -0.32s;
}

.bouncing-dots div:nth-child(2) {
  animation-delay: -0.16s;
}

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

#ellipsisContainer.hidden {
  display: none;
}

.message-input-container {
  display: flex;
  align-items: center;
  background-color: white;
  border-radius: 10px;
  padding: 10px;
  width: 90%;
  margin: 20px auto 20px auto;
  box-shadow: 0px 1px 3px rgba(0, 0, 0, 0.2);
  flex-shrink: 0;
}

.message-input {
  flex-grow: 1;
  overflow-y: auto;
  max-height: 200px;
  min-height: 1.8em;
  height: 1.8em;
  background-color: transparent;
  border: none;
  color: #121212;
  font-size: 16px;
  outline: none;
  resize: none;
}

.message-input::placeholder {
  color: #8e8e93;
}

.send-button {
  background-color: transparent;
  border: none;
  color: #a6a6a8;
  font-size: 24px;
  margin-left: 10px;
  display: flex;
  align-items: center;
}

.send-button.active {
  color: #0078d7;
}

.send-button.active:hover {
  filter: saturate(0.7);
  transition: 0.2s;
}

.send-button:focus {
  outline: none;
}

#stop-button {
  background-color: transparent;
  border: none;
  color: #a6a6a8;
  font-size: 24px;
  cursor: pointer;
  margin-left: 10px;
  display: none;
  align-items: center;
}

#stop-button:hover {
  color: #ffffff;
}

#stop-button:focus {
  outline: none;
}
