/* ----------------------------
   Chat Layout
----------------------------- */

.chat-page-content {
  position: fixed;
  top: 80px;
  left: 240px;
  right: 0;
  bottom: 0;
  padding: 15px;
  z-index: 0;
  font-family: Poppins;
  font-size: 14px;
  font-style: normal;
  line-height: normal;
}

.chat-container {
  display: flex;
  flex-direction: column;
  height: 480px;
  border: 1px solid #ccc;
  border-radius: 8px;
  overflow: hidden;
}

.chat-box {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background-color: #f0f0f0;
  border-bottom: 1px solid #ccc;
}

.chat-header {
  font-size: 20px;
  font-weight: bold;
}

.chat-warning {
  text-align: center;
  color: red;
  margin-top: 12px;
  font-size: 14px;
}

/* ----------------------------
   Chat Input Area
----------------------------- */
.chat-input-section {
  display: flex;
  padding: 10px;
  background-color: #f9f9f9;
  border-top: 1px solid #ccc;
  gap: 4px;
}

#userPrompt {
  flex: 1;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-family: inherit;
  font-size: 14px;

  outline: none;
  border-color: #aaa;
}

#userPrompt:focus {
  border-color: #007bff;
  box-shadow: none;
  outline: none;
}

#sendButton,
#destroySessionBtn {
  padding: 10px 20px;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
}

#sendButton {
  background-color: #2dafff;
}

#sendButton:hover {
  background-color: #007bff;
}

.end-chat-btn {
  background-color: #dc3545;
}

.end-chat-btn:hover {
  background-color: #a71d2a;
}

/* ----------------------------
   Messages (User / Bot)
----------------------------- */
.message-wrapper {
  display: flex;
  width: 100%;
  margin-bottom: 0.5rem;
}

.message-wrapper.user {
  justify-content: flex-end;
}

.message-wrapper.bot {
  justify-content: flex-start;
}

.user-message,
.bot-message {
  display: inline-block;
  max-width: 75%;
  padding: 0.5rem 0.75rem;
  border-radius: 6px;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
}

.user-message {
  background-color: #cce5ff;
}

.bot-message {
  background-color: #e0e0e0;
  margin-bottom: 1rem;
}

/* ----------------------------
   Reactions / Feedback
----------------------------- */
.reaction-container {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
  height: 24px;
}

.like-icon,
.dislike-icon {
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.like-icon:hover {
  background-color: #d4edda;
}

.dislike-icon:hover {
  background-color: #f8d7da;
}

.liked {
  color: #28a745;
}

.disliked {
  color: #dc3545;
}

.disabled-feedback {
  opacity: 0.5;
  pointer-events: none;
}

/* ----------------------------
   Citations
----------------------------- */
.citation-link {
  color: #007bff;
  text-decoration: none;
}

.citation-link:hover {
  text-decoration: underline;
}

/* ----------------------------
   Typing Placeholder Animation
----------------------------- */
.typing-placeholder {
  display: flex;
  align-items: center;
  gap: 0.4em;
}

.dot-bounce {
  width: 0.6em;
  height: 0.6em;
  background-color: #4b5563;
  border-radius: 50%;
  display: inline-block;
  animation: bounce 0.6s infinite ease-in-out;
}

.dot-bounce:nth-child(1) {
  animation-delay: 0s;
}

.dot-bounce:nth-child(2) {
  animation-delay: 0.15s;
}

.dot-bounce:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes bounce {
  0%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-8px);
  }
}
