/* Chat page styles */
.chat-page {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-width: 900px;
  margin: 0 auto;
}

.chat-header {
  margin-bottom: 20px;
  text-align: center;
}

.chat-header h2 {
  color: var(--primary-color);
  margin-bottom: 5px;
}

.chat-header p {
  color: #777;
  margin: 0;
}

.chat-container {
  display: flex;
  flex-direction: column;
  flex: 1;
  border-radius: 10px;
  background-color: white;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.chat-messages {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  min-height: 400px;
  max-height: calc(100vh - 300px);
  background-color: #f9f9f9;
}

.chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #9e9e9e;
  text-align: center;
  padding: 30px;
}

.chat-empty img {
  width: 80px;
  height: 80px;
  margin-bottom: 15px;
  opacity: 0.7;
}

.chat-message {
  margin-bottom: 16px;
  max-width: 80%;
  clear: both;
}

.chat-message.user {
  margin-left: auto;
}

.chat-message.assistant {
  margin-right: auto;
}

.message-content {
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  word-wrap: break-word;
}

.chat-message.user .message-content {
  background-color: var(--primary-color);
  color: white;
  border-top-right-radius: 4px;
}

.chat-message.assistant .message-content {
  background-color: #e9e9e9;
  color: #333;
  border-top-left-radius: 4px;
}

.chat-input {
  display: flex;
  border-top: 1px solid #eee;
  padding: 15px;
  background-color: white;
}

.chat-input input {
  flex: 1;
  border: 1px solid #ddd;
  border-radius: 24px;
  padding: 12px 20px;
  outline: none;
  font-size: 1rem;
  transition: border-color 0.2s;
}

.chat-input input:focus {
  border-color: var(--primary-color);
}

.chat-input input:disabled {
  background-color: #f5f5f5;
}

.chat-input button {
  width: 48px;
  height: 48px;
  margin-left: 10px;
  border: none;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.2s;
}

.chat-input button:hover {
  background-color: var(--primary-dark);
}

.chat-input button:disabled {
  background-color: #ccc;
  cursor: not-allowed;
}

/* Loading spinner */
.loading-spinner {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #fff;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}
