/* style.css */
/* Simple clean styling for the Thinkwise chat interface */

/* Reset default browser margin and padding */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Page background and font */
body {
  font-family: Arial, sans-serif;
  background-color: #f0f2f5;
  display: flex;
  flex-direction: column;
  align-items: center;
  height: 100vh;
  padding: 20px;
}

/* Page title */
h1 {
  color: #333;
  margin-bottom: 20px;
  font-size: 1.5rem;
}

/* The chat message area */
#chat-container {
  width: 100%;
  max-width: 750px;
  flex: 1;
  overflow-y: auto;
  background: white;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* A single message bubble */
.message {
  max-width: 75%;
  padding: 12px 16px;
  border-radius: 18px;
  line-height: 1.6;
  font-size: 0.95rem;
}

/* User message — right side, blue */
.user-message {
  align-self: flex-end;
  background-color: #0078d4;
  color: white;
  border-bottom-right-radius: 4px;
}

/* AI message — left side, light grey */
.ai-message {
  align-self: flex-start;
  background-color: #e8e8e8;
  color: #222;
  border-bottom-left-radius: 4px;
}

/* Area below the chat: input field + send button */
#input-area {
  width: 100%;
  max-width: 750px;
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* Text input field */
#user-input {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid #ccc;
  border-radius: 25px;
  font-size: 1rem;
  outline: none;
}

#user-input:focus {
  border-color: #0078d4;
}

/* Send button */
#send-button {
  padding: 12px 24px;
  background-color: #0078d4;
  color: white;
  border: none;
  border-radius: 25px;
  font-size: 1rem;
  cursor: pointer;
}

#send-button:hover {
  background-color: #005fa3;
}

/* Disabled state while waiting for a response */
#send-button:disabled {
  background-color: #aaa;
  cursor: not-allowed;
}

.message p {
  margin: 6px 0;
}

.message h1,
.message h2,
.message h3,
.message h4 {
  margin: 10px 0 6px 0;
  font-size: 1rem;
  line-height: 1.3;
}

.message ul,
.message ol {
  padding-left: 20px;
  margin: 6px 0;
}

.message li {
  margin-bottom: 3px;
}

.message code {
  background: #f3f3f3;
  padding: 2px 6px;
  border-radius: 4px;
}

.message pre {
  background: #f6f6f6;
  padding: 10px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}

.message a {
  color: #0066cc;
  font-weight: 500;
  text-decoration: underline;
}

.message a:hover {
  text-decoration: none;
}