/* Container */
.gpt-chat-container {
  border: 1px solid #ccc;
  border-radius: 15px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: #fafafa;
  font-family: Arial, sans-serif;
}

/* Header */
.gpt-chat-header {
  display: flex;
  align-items: center;
  padding: 10px;
  background: #0073aa;
  color: #fff;
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}

.gpt-chat-header .bot-avatar {
  width: 35px;
  height: 35px;
  border-radius: 50%;
  margin-right: 10px;
}

.gpt-chat-header .bot-name {
  font-weight: bold;
  font-size: 16px;
}

/* Chat log */
.gpt-chat-log {
  height: 400px;
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #f9f9f9;
}

/* Message wrapper (for icon + bubble layout) */
.gpt-chat-message-wrapper {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  max-width: 90%;
}

/* Bubble icon (outside bubble) */
.gpt-chat-icon {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
}

/* Message bubbles */
.gpt-chat-message {
  padding: 10px 14px;
  border-radius: 15px;
  word-wrap: break-word;
  font-size: 15px;
  line-height: 1.4;
  max-width: 100%;
}

/* User messages (right aligned) */
.gpt-chat-message-wrapper.user {
  align-self: flex-end;
  flex-direction: row-reverse;
}

.gpt-chat-message.user {
  background: #0073aa;
  color: #fff;
  border-bottom-right-radius: 0;
}

/* Bot messages (left aligned) */
.gpt-chat-message-wrapper.bot {
  align-self: flex-start;
}

.gpt-chat-message.bot {
  background: #e0e0e0;
  color: #333;
  border-bottom-left-radius: 0;
}

/* Input area */
.gpt-chat-input-box {
  display: flex;
  gap: 5px;
  padding: 10px;
  border-top: 1px solid #ddd;
  background: #fafafa;
}

.gpt-chat-input-box input {
  flex: 1;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid #ccc;
  font-size: 15px;
}

.gpt-chat-input-box button {
  padding: 8px 12px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gpt-chat-input-box .send-button {
  background: #0073aa;
  color: #fff;
}

.gpt-chat-input-box .send-button img {
  width: 18px;
  height: 18px;
}

.gpt-chat-input-box .reset-button {
  background: #ccc;
  color: #333;
}

/* Row container for each message */
.gpt-chat-row {
  display: flex;
  align-items: flex-end;
  margin: 5px 0;
  gap: 8px;
}

/* User and bot direction */
.gpt-chat-row.user {
  justify-content: flex-end;
}

.gpt-chat-row.bot {
  justify-content: flex-start;
}

/* Avatar icons outside bubbles */
.gpt-chat-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* Message bubbles */
.gpt-chat-message {
  max-width: 70%;
  padding: 10px 12px;
  border-radius: 15px;
  word-wrap: break-word;
  font-size: 15px;
  line-height: 1.4;
}

.gpt-chat-message.user {
  background: #0073aa;
  color: #fff;
  border-bottom-right-radius: 0;
}

.gpt-chat-message.bot {
  background: #e0e0e0;
  color: #333;
  border-bottom-left-radius: 0;
}

/* System messages */
.gpt-chat-message.system {
  align-self: center;
  background: #ffd966;
  color: #333;
  font-style: italic;
}

/* Thinking indicator */
.thinking {
  display: none;
  color: #888;
  font-size: 14px;
  margin: 4px 0 0 12px; /* slight left indent */
  text-align: left;
  font-style: italic;
}