* {
  box-sizing: border-box;
}
body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
/* Campus Cafe Chatbot Styles */

/* Chatbot Container */
.chatbot-container {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: 400px;
  z-index: 10000;
  font-family: "Nunito Sans", sans-serif;
  display: flex;
  align-items: stretch;
  pointer-events: none; /* Allow clicks to pass through when hidden */
}

/* Chatbot Toggle Button */
.chatbot-toggle {
  width: 48px;
  height: 48px;
  background: linear-gradient(180deg, #1fcf62 0%, #185cdf 100%);
  border: none;
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-in-out;
  z-index: 10001;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  pointer-events: auto; /* Always allow interaction with toggle */
  position: absolute;
  top: 0;
  left: -51px;
  bottom: 0;
  margin: auto 0;
}

.chatbot-toggle .chatbot-toggle-icon {
  transition: transform 0.3s ease-in-out;
}
.chatbot-toggle:hover .chatbot-toggle-icon {
  transform: rotate(90deg);
}

.chatbot-window-left-border {
  background: linear-gradient(180deg, #1fcf62 47.53%, #185cdf 52.46%);
  width: 3px;
  height: 100%;
  left: -3px;
  top: 0;
  position: absolute;
}
/* When chatbot is open, move toggle to the left edge of the window */

.chatbot-toggle i {
  font-size: 20px;
  color: white;
  transition: transform 0.3s ease;
}

/* Hide the chevron icons for the slide panel design */
.chatbot-toggle.active i.fa-comments {
  transform: rotate(0deg);
  opacity: 1;
}

.chatbot-toggle.active i.fa-chevron-down {
  display: none;
}

.chatbot-toggle i.fa-chevron-down {
  display: none;
}

/* Chatbot Window */
.chatbot-window {
  width: var(--chatbot-width, 482px);
  max-width: calc(100vw - 54px);
  background: white;
  box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  border-left: 1px solid #e0e0e0;
  transition: 0.3s ease-in-out;
  z-index: 10000;
  pointer-events: auto; /* Always allow interaction with window when present */
}

.chatbot-window.open {
  transform: translateX(0%);
}
.chatbot-toggle:has(+ .chatbot-window:not(.open)) {
  right: 0 !important;
}

.chatbot-window.sidebar-open {
  width: calc(var(--chatbot-width, 482px) + 232px); /* Adjust width when sidebar is open */
}

.chatbot-window-wrapper {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  height: 100vh;
}
.chatbot-content {
  position: relative;
  height: calc(100% - 80px);
  flex: 1;
}

.chatbot-sidebar {
  width: 232px;
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  background: #dfe4ef;
  padding: 24px;
  display: flex;
  flex-direction: column;
  transition: 0.3s ease-in-out;
  z-index: 1;
}

.chatbot-sidebar .sidebar-header {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}

.chatbot-sidebar .usage-section {
  width: 100%;
}
/*
.chatbot-sidebar .btn-recent-chats {
    margin-top: 5px;
}*/

.chatbot-sidebar .sidebar-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  margin: 0 -24px;
  flex-direction: column;
}

.chatbot-sidebar .sidebar-content .recent-title {
  font-family: "Red Hat Display", sans-serif !important;
  font-weight: 400;
  margin: 0 0 4px;
  padding: 0 24px;
  font-size: 12px;
  line-height: 130%;
  letter-spacing: 0%;
  color: #515d77;
}
.chatbot-sidebar #conversation-list {
  flex: 1;
  overflow-y: auto;
  padding: 0;
  margin: 0;
  min-height: 0; /* Allow flex shrinking */
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease-in-out;
}

/* Ensure conversation list ul takes full height */
.chatbot-sidebar #conversation-list ul {
  flex: 1;
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
  display: flex;
  flex-direction: column;
}

.chatbot-sidebar #conversation-list ul li {
  margin: 0;
  padding: 0 24px;
  list-style: none;
  flex-shrink: 0;
}

.chatbot-sidebar .btn-chats,
/*.chatbot-sidebar .btn-recent-chats,*/
.chatbot-sidebar .btn-usage {
  background-color: transparent;
  border: 0;
  padding: 8px;
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.3s ease-in-out;
  font-family: "Red Hat Display", sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: #191b2d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.chatbot-sidebar .btn-chats:hover,
.chatbot-sidebar .btn-usage:hover {
  background-color: #fff;
  color: #185cdf;
}

.chatbot-sidebar .btn-chats.selected {
  background: linear-gradient(90deg, #185cdf 0%, #1fcf62 100%);
  color: white;
}

.chatbot-sidebar .btn-chats.selected:hover {
  background-color: var(--button-primary-hover-background-color, #e66650);
}
/*
.chatbot-sidebar .btn-recent-chats {
    font-weight: 700;
}
*/

/* Usage button specific styles */
.chatbot-sidebar .btn-usage {
  display: flex;
  align-items: center;
  gap: 8px;
}

.chatbot-sidebar .btn-usage svg {
  flex-shrink: 0;
}

.chatbot-sidebar .btn-usage:hover svg {
  opacity: 1;
}

.chatbot-sidebar .btn-usage.selected {
  background: linear-gradient(90deg, #435cd1 0%, #8f6bf7 100%);
  color: white;
  box-shadow: 0 2px 4px rgba(67, 92, 209, 0.3);
  border-left: 3px solid #fff;
}

.chatbot-sidebar .btn-usage.selected svg {
  opacity: 1;
}

/* Usage content styles */
.usage-content {
  font-size: 11px;
  max-height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  border-bottom: none;
  transition: max-height 0.3s ease-in-out, padding 0.3s ease-in-out,
    margin 0.3s ease-in-out, border 0.3s ease-in-out;
}

.usage-content.expanded {
  max-height: 200px; /* Adjust based on content needs */
  padding: 8px 14px 10px;
  margin-bottom: 5px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.usage-loading {
  color: #666;
  font-style: italic;
  padding: 8px 0;
}

.usage-error {
  color: #e74c3c;
  font-size: 11px;
  padding: 8px 0;
}

.usage-data {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  padding: 8px 0;
}

.usage-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 6px 4px;
  background-color: rgba(0, 0, 0, 0.02);
  border-radius: 6px;
  border-top: 2px solid transparent;
}

.usage-item.daily {
  border-top-color: #27ae60;
}

.usage-item.weekly {
  border-top-color: #f39c12;
}

.usage-item.monthly {
  border-top-color: #8e44ad;
}

.usage-label {
  font-weight: 600;
  color: #333;
  font-size: 10px;
  margin-bottom: 4px;
}

.usage-value {
  font-weight: 700;
  color: #435cd1;
  font-size: 11px;
  margin-top: 2px;
}

.usage-item.daily .usage-value {
  color: #27ae60;
}

.usage-item.weekly .usage-value {
  color: #f39c12;
}

.usage-item.monthly .usage-value {
  color: #8e44ad;
}

.chatbot-sidebar ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chatbot-sidebar ul li {
  margin: 0;
  padding: 0;
  list-style: none;
}

.chatbot-sidebar strong {
  padding: 6px 14px;
  font-weight: 700;
  display: inline-flex;
}

/* Conversation loading and error states */
.conversation-loading {
  padding: 10px 14px;
  text-align: left;
  color: #666;
  font-size: 12px;
  background: #fafafa;
  border-radius: 12px;
  margin: 5px 0;
}

.conversation-error {
  padding: 10px 14px;
  text-align: left;
  color: #d32f2f;
  font-size: 12px;
  background: #ffebee;
  border-radius: 12px;
  margin: 5px 0;
}

.conversation-empty {
  padding: 10px 14px;
  text-align: left;
  color: #999;
  font-size: 12px;
  font-style: italic;
  line-height: 1.4;
}

.chatbot-window.sidebar-open .chatbot-sidebar {
  transform: translateX(0);
}

/* .chatbot-window.sidebar-open .chatbot-input-area,
.chatbot-window.sidebar-open .chatbot-messages {
  margin-left: 232px;
} */

/* Resizer handle for chatbot window */
.chatbot-resizer {
  position: absolute;
  left: 0;
  top: 0;
  width: 8px;
  height: 100%;
  cursor: ew-resize;
  z-index: 10001;
  background: transparent;
  transition: background 0.2s;
}

.chatbot-resizer:hover,
.chatbot-resizer:active {
  background: rgba(80, 134, 209, 0.08);
}

.chatbot-welcome-screen {
  max-width: 450px;
  margin: 0 auto;
  height: 100%;
  display: flex; /* Visible by default - JavaScript will control visibility */
  flex-direction: column;
  justify-content: flex-start;
}

/* Show welcome screen when explicitly made visible */
.chatbot-welcome-screen.visible {
  display: flex !important;
}

/* Hide welcome screen when explicitly hidden */
.chatbot-welcome-screen.hidden {
  display: none !important;
}

.chatbot-welcome-screen .chatbot-avatar {
  height: auto;
  width: 96px;
  margin: 0 auto 16px;
}
/* Recent chats container with plus icon button */
.recent-chats-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 10px;
  padding: 0;
  width: 90%;
}

/* Recent button styling */
.btn-recent-chats {
  flex: 1;
  margin-right: 8px;
  background-color: transparent;
  border: 0;
  padding: 8px 14px;
  text-align: left;
  border-radius: 12px;
  cursor: pointer;
  transition: background-color 0.2s ease;
  font-size: 12px;
  line-height: 1.4;
  color: #333;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 700;
}

.btn-recent-chats:hover {
  background-color: rgba(0, 0, 0, 0.05);
}

/* Plus icon button styling */
.btn-new-chat-cta {
  margin-bottom: 24px;
}
.btn-new-chat {
  z-index: 1000;
  cursor: pointer;
  width: 100% !important;
  min-width: inherit  !important;
  font-size: 14px !important;
  line-height: 20px !important;
  pointer-events: auto;
  height: auto !important;
  background: linear-gradient(90deg, #185cdf 0%, #1fcf62 100%);
  font-family: "Red Hat Display", sans-serif;
  font-family: 600;
  width: 100%;
  color: #101e3d;
  border: none;
  overflow: hidden;
  padding: 10px;
  border-radius: 6px;
  box-shadow: 0px 2px 4px 0px #0000001f;
  transition: all 0.3s ease-in-out;
  position: relative;
}
.btn-new-chat span {
  position: relative;
  z-index: 2;
}
.btn-new-chat::after {
  content: "";
  position: absolute;
  inset: 1px;
  transition: all 0.3s ease-in-out;
  border-radius: 6px;
  background-color: #fff;
}

.btn-new-chat:hover {
  color: white;
}
.btn-new-chat:hover::after {
  opacity: 0;
}
.btn-new-chat:active {
  transform: scale(0.95);
}

.chatbot-welcome-screen .chatbot-message-content h1 {
  font-size: 22px;
  line-height: 26px;
  text-align: center;
  color: #101e3d;
  margin: 0 0 12px;
  font-weight: 800;
  font-family: "Red Hat Display", sans-serif !important;
}

.chatbot-welcome-screen .chatbot-message-content p {
  font-size: 16px;
  font-weight: 400;
  line-height: 22px;
  letter-spacing: 0;
  margin-bottom: 0;
  font-family: "Red Hat Display", sans-serif !important;
  color: #515d77;
}

.chatbot-welcome-screen .welcome-options .btn-option {
  display: block;
  border: 1px solid var(--button-primary-hover-background-color);
  background-color: transparent;
  border-radius: 16px;
  padding: 12px 16px;
  margin: 8px 0;
  width: 100%;
  text-align: left;
  font-size: 16px;
}

.chatbot-welcome-screen .welcome-options .btn-option svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Welcome screen and suggested questions styling */
.chatbot-welcome-screen .suggested-questions-container {
  margin-top: 80px;
  width: 100%;
}

.chatbot-welcome-screen .suggested-questions-title {
  font-family: "Red Hat Display", sans-serif !important;
  font-size: 12px;
  line-height: 16px;
  font-weight: 400;
  color: #515d77;
  margin: 0 0 12px 0;
  letter-spacing: 0;
}

.chatbot-welcome-screen .suggested-questions-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: stretch;
}

.suggested-question-item {
  font-family: "Red Hat Display", sans-serif !important;
  background: white;
  border: 1px solid #dfe4ef;
  border-radius: 6px;
  padding: 13px 12px;
  font-size: 14px;
  line-height: 20px;
  font-weight: 600;
  color: #191b2d;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: 100%;
  text-align: left;
  position: relative;
  overflow: hidden;
  word-wrap: break-word;
  white-space: normal;
}

.suggested-question-item:hover {
  background-color: #dfe4ef;
  color: #185cdf;
  border-color: #dfe4ef;
}

.suggested-question-item:focus {
  color: #185cdf;
  border-color: #dfe4ef;
  background-color: #dfe4ef;
}

/* Add subtle gradient overlay animation on hover */
.suggested-question-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.15),
    transparent
  );
  transition: left 0.6s ease;
  z-index: 1;
}

.suggested-question-item:hover::before {
  left: 100%;
}

/* Responsive adjustments for suggested questions */
@media (max-width: 480px) {
  .chatbot-welcome-screen .suggested-questions-container {
    padding: 0 16px;
    max-width: 100%;
  }

  .suggested-question-item {
    font-size: 13px;
    padding: 10px 14px;
    min-height: 40px;
  }

  .chatbot-welcome-screen .suggested-questions-title {
    font-size: 15px;
    margin-bottom: 12px;
  }
}

/* Animation for questions appearing */
@keyframes questionSlideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Stagger animation for multiple questions */
.suggested-question-item:nth-child(1) {
  animation: questionSlideIn 0.3s ease forwards 0.1s;
}
.suggested-question-item:nth-child(2) {
  animation: questionSlideIn 0.3s ease forwards 0.2s;
}
.suggested-question-item:nth-child(3) {
  animation: questionSlideIn 0.3s ease forwards 0.3s;
}
.suggested-question-item:nth-child(4) {
  animation: questionSlideIn 0.3s ease forwards 0.4s;
}
.suggested-question-item:nth-child(5) {
  animation: questionSlideIn 0.3s ease forwards 0.5s;
}

/* Initially hide questions for animation */
.suggested-question-item {
  opacity: 0;
}

.chatbot-welcome-screen .welcome-options .btn-option svg {
  width: 20px;
  height: 20px;
  margin-right: 8px;
  vertical-align: middle;
}

/* Slide animations */
@keyframes slideInFromRight {
  from {
    right: -400px;
  }
  to {
    right: 0;
  }
}

@keyframes slideOutToRight {
  from {
    right: 0;
  }
  to {
    right: -400px;
  }
}

/* Chatbot Header */
.chatbot-header {
  background: #ffffff;
  color: white;
  padding: 16px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: relative;
  border-bottom: 1px solid #dfe4ef;
  min-height: 60px;
}

.chatbot-header .actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.icon-outline-btn {
  border: 1px solid #dfe4ef;
  background-color: #ffffff;
  height: 48px;
  width: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  color: #101e3d;
  transition: 0.3s ease-in-out;
}
.icon-outline-btn:hover {
  background-color: #dfe4ef;
  border-color: #dfe4ef;
  color: #185cdf;
}

.icon-outline-btn .sidebar-toggle-open {
  display: none;
}
.icon-outline-btn .sidebar-toggle-close {
  display: block;
}

.chatbot-window.sidebar-open .icon-outline-btn .sidebar-toggle-open {
  display: block;
}
.chatbot-window.sidebar-open .icon-outline-btn .sidebar-toggle-close {
  display: none;
}
/* Chat Messages Area */
.chatbot-content-wrap {
  background-color: #ffffff;
  position: relative;
  z-index: 2;
  margin-left: auto;
  width: 100%;
  height: 100%;
  transition: all 0.3s ease-in-out;
}
.sidebar-open .chatbot-content-wrap {
  width: calc(100% - 232px);
}
.chatbot-messages {
  flex: 1;
  padding: 24px;
  overflow-y: auto;
  width: 100%;
  /* display: flex !important; */
  /* flex-direction: column-reverse; */
  /* flex-direction: column; */
  /* Messages appear at top, newest first */
  transition: 0.3s ease-in-out;
  height: calc(100vh - 211px);
  scroll-behavior: smooth;
  position: relative; /* For positioning scroll indicator */
  z-index: 2;
}

.chatbot-messages .message {
  margin-top: 12px;
  margin-bottom: 12px;
}

/* Scroll to bottom indicator */
.scroll-to-bottom-indicator {
  position: absolute;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  display: none;
}

.scroll-to-bottom-button {
  background: linear-gradient(90deg, #2b3e95 0%, #8f6bf7 100%);
  color: white;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transition: all 0.3s ease;
  position: relative;
  animation: bounce 2s infinite;
}

.scroll-to-bottom-button:hover {
  background: var(--button-primary-hover-background-color, #e66650);
  transform: scale(1.05);
}

.scroll-to-bottom-button i {
  font-size: 16px;
}

.scroll-to-bottom-button .new-message-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background: #ff4444;
  color: white;
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

@keyframes bounce {
  0%,
  20%,
  50%,
  80%,
  100% {
    transform: translateY(0);
  }
  40% {
    transform: translateY(-5px);
  }
  60% {
    transform: translateY(-3px);
  }
}

.chatbot-messages::-webkit-scrollbar {
  width: 8px;
}

.chatbot-messages::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 6px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Scroll Down Button */
.chatbot-scroll-down {
  position: absolute;
  bottom: 140px; /* Position above input area */
  right: 20px;
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 50%;
  display: none; /* Hidden by default */
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  z-index: 100;
  backdrop-filter: blur(8px);
}

.chatbot-scroll-down:hover {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
  transform: translateY(-1px);
}

.chatbot-scroll-down:active {
  transform: translateY(0);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.chatbot-scroll-down svg {
  color: #666;
  transition: color 0.2s ease;
}

.chatbot-scroll-down:hover svg {
  color: #333;
}

/* Message Bubbles */
.message {
  max-width: 85%;
  font-size: 14px;
  line-height: 20px;
  word-wrap: break-word;
  animation: messageSlide 0.3s ease-out;
}

@keyframes messageSlide {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.user {
  background: linear-gradient(90deg, #185cdf 0%, #1fcf62 100%);
  border-radius: 16px 0 16px 16px;
  color: white;
  align-self: flex-end;
  padding: 12px 16px;
  margin-left: auto;
}

/* .message.bot {
  background: white;
  color: #515D77;
  align-self: flex-start;
  line-height: 20px;
  max-width: 85%;
  font-size: 14px;
  font-family: inherit;
}

.message.bot h3 {
  margin: 0 0 8px 0;
  font-size: 16px;
  color: var(--link-color, #ff796a);
  font-weight: 600;
  line-height: 1.3;
}

.message.bot h4 {
  margin: 0 0 8px 0;
  font-size: 15px;
  color: var(--link-color, #ff796a);
  font-weight: 600;
  line-height: 1.3;
}

.message.bot h5 {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: var(--link-color, #ff796a);
  font-weight: 500;
  line-height: 1.3;
}

.message.bot p {
  margin: 6px 0;
  font-size: 14px;
  line-height: 1.5;
}

.message.bot ul {
  margin: 8px 0;
  padding-left: 16px;
}

.message.bot li {
  margin: 4px 0;
  font-size: 14px;
  line-height: 1.5;
}

.message.bot strong {
  color: #2c3e50;
  font-weight: 600;
}

.message.bot em {
  color: #555;
  font-style: italic;
}

.message.bot code {
  background: #f4f4f4;
  border: 1px solid #ddd;
  border-radius: 3px;
  padding: 2px 6px;
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 12px;
  color: #d73a49;
}

.message.bot a {
  color: var(--link-color, #ff796a);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.message.bot a:hover {
  color: var(--button-primary-hover-background-color, #e66650);
}

/* Simple list styling for bot messages */
.message.bot ul {
  list-style-type: disc;
  margin: 8px 0;
  padding-left: 16px;
}

.message.bot li {
  margin: 4px 0;
  font-size: 14px;
  line-height: 20px;
}

.message.bot a {
  color: var(--link-color, #ff796a);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.message.bot a:hover {
  color: var(--button-primary-hover-background-color, #e66650);
}

/* Simple list styling for bot messages */
.message.bot ul {
  margin: 1px 0 !important; /* Further reduced from 3px */
  padding-left: 30px !important; /* Reduced from 18px */
  list-style-type: disc !important;
}

.message.bot li {
  margin: 0 0 !important; /* Reduced from 1px to 0px */
  line-height: 1.1 !important; /* Reduced from 1.2 to 1.1 */
  color: #515D77 !important;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  padding: 0 !important;
  position: static !important;
}

/* Override any fancy list item styling to keep it simple */
.message.bot .ai-list-item,
.message.bot .ai-sub-list-item {
  margin: 3px 0 !important;
  padding: 0 !important;
  background: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  border: none !important;
  position: static !important;
  line-height: 1.4 !important;
  color: #333 !important;
}

/* Remove custom bullet points */
.message.bot .ai-list-item::before,
.message.bot .ai-sub-list-item::before {
  display: none !important;
}

.message.bot li[style*="circle"] {
  list-style-type: circle !important;
  color: #555 !important;
}
*/

/* Loading Animation */
.loading-message {
  background: white;
  color: #666;
  align-self: flex-start;
  border: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  gap: 8px;
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.loading-dots {
  display: flex;
  gap: 3px;
}

.loading-dots span {
  width: 6px;
  height: 6px;
  background-color: var(--link-color, #ff796a);
  border-radius: 50%;
  animation: loading 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

@keyframes loading {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1);
    opacity: 1;
  }
}

/* History Loading Indicator */
.history-loading,
.history-loading-indicator {
  padding: 10px;
  text-align: center;
  color: #666;
  font-size: 12px;
  border-bottom: 1px solid #eee;
  background: #fafafa;
  margin-bottom: 8px;
}

.history-loading span {
  display: inline-block;
}

/* Input Area */
.chatbot-input-area {
  width: 100%;
  position: relative;
}

.chatbot-input {
  width: 100%;
  border: 0;
  background: white;
  /* border-radius: 24px; */
  padding: 24px;
  font-size: 14px;
  resize: none;
  outline: none;
  font-family: "Red Hat Display", sans-serif !important;
  transition: border-color 0.2s ease;
  box-shadow: 0px -12px 8px 0px #101e3d08;
  max-height: 131px;
  min-height: 131px;

  border: 1px solid #dfe4ef;

  border-radius: 8px 8px 0 0;
}

.chatbot-input:focus {
  background: linear-gradient(#fff, #fff) padding-box,
    /* Inner background */ linear-gradient(90deg, #185cdf 0%, #1fcf62 100%)
      border-box; /* Gradient border */
  border: 1px solid transparent;
}

.chatbot-send {
  width: 40px;
  height: 40px;
  background: linear-gradient(90deg, #185cdf 0%, #1fcf62 100%);
  border: none;
  cursor: pointer;
  display: flex;
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease-in-out;
  flex-shrink: 0;
  position: absolute;
  right: 16px;
  bottom: 16px;
  color: #fff;
}

.chatbot-send:not(:disabled):hover {
  background-position: 100% 0;
  transform: scale(1.05) rotate(-5deg);
  box-shadow: 0 0 10px rgba(0, 255, 144, 0.3), 0 0 30px rgba(0, 97, 255, 0.3);
}
.chatbot-send:disabled {
  background: transparent;
  color: #dfe4ef;
  cursor: not-allowed;
  transform: none;
}

.chatbot-send i {
  font-size: 16px;
}

/* Error State */
.error-message {
  background: #ffebee;
  color: #c62828;
  border: 1px solid #ffcdd2;
  text-align: center;
  font-size: 12px;
  padding: 8px 12px;
  border-radius: 12px;
  margin: 0 16px;
}

/* Welcome Message */
.welcome-message {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
  border-radius: 12px;
  padding: 16px;
  text-align: center;
  color: #495057;
  margin-bottom: 8px;
}

.welcome-message h4 {
  margin: 0 0 8px;
  color: var(--link-color, #ff796a);
  font-size: 14px;
  font-weight: 600;
}

.welcome-message p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

/* Enhanced message formatting for better readability */
.message.bot {
  background: white;
  color: #515d77;
  align-self: flex-start;
  line-height: 20px;
  max-width: 85%;
  font-family: inherit;
  padding: 0px;
  font-size: 14px;
  font-family: "Red Hat Display", sans-serif !important;
}

.message.bot h3 {
  margin: 0 0 6px 0;
  font-size: 15px;
  color: #2c3e50;
  font-weight: 600;
  font-family: inherit;
  font-family: "Red Hat Display", sans-serif !important;
}

.message.bot h4 {
  margin: 0 0 6px 0;
  font-size: 14px;
  color: #2c3e50;
  font-weight: 600;
  font-family: inherit;
  font-family: "Red Hat Display", sans-serif !important;
}

.message.bot h5 {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: #2c3e50;
  font-weight: 500;
  font-family: inherit;
  font-family: "Red Hat Display", sans-serif !important;
}

.message.bot p {
  margin: 4px 0;
  line-height: 1.5;
  font-family: inherit;
  font-size: 14px;
  color: #515D77;
  font-family: "Red Hat Display", sans-serif !important;
}

.message.bot ul {
  margin: 4px 0;
  padding-left: 16px;
}

.message.bot li {
  margin: 2px 0;
  font-family: "Red Hat Display", sans-serif !important;
  font-family: inherit;
}

.message.bot strong {
  font-family: inherit;
}

.message.bot em {
  font-style: italic;
  color: #555;
  font-family: inherit;
}

.message.bot code {
  font-family: "Consolas", "Monaco", "Courier New", monospace;
  font-size: 12px;
  color: #d73a49;
  background: #f4f4f4;
  padding: 2px 4px;
  border-radius: 3px;
}

.message.bot a {
  color: var(--link-color, #ff796a);
  text-decoration: none;
  border-bottom: 1px solid currentColor;
}

.message.bot a:hover {
  color: var(--button-primary-hover-background-color, #e66650);
}

/* Improved spacing for formatted AI responses */
.message.bot .ai-main-heading:first-child {
  margin-top: 0 !important;
}

.message.bot .ai-subheading:first-child {
  margin-top: 0 !important;
}

.message.bot .ai-action-header:first-child {
  margin-top: 0 !important;
}

.message.bot .ai-numbered-section:first-child {
  margin-top: 0 !important;
}

.message.bot .ai-list:last-child {
  margin-bottom: 0 !important;
}

/* Enhanced emoji support */
.message.bot .emoji {
  font-size: 1.2em !important;
  vertical-align: middle !important;
  margin: 0 2px !important;
}

/* Better line spacing for mixed content */
.message.bot br + .ai-main-heading,
.message.bot br + .ai-subheading,
.message.bot br + .ai-action-header {
  margin-top: 12px !important;
}

/* Numbered section spacing after line breaks */
.message.bot br + .ai-numbered-section {
  /* margin-top: 12px !important; */
}

/* Action header styling improvements */
.message.bot .ai-action-header {
  display: block !important;
  /* margin: 8px 0 6px 0 !important; */
  /* padding: 6px 12px !important; */
  /* background: linear-gradient(135deg, #f1f8ff, #e3f2fd) !important; */
  /* border-left: 4px solid var(--link-color, #ff796a) !important; */
  /* border-radius: 6px !important; */
  font-weight: 700 !important;
  /* color: #1976d2 !important; */
  /* box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1) !important; */
}

/* Improved nested list handling */
.message.bot .ai-list .ai-sub-list-item {
  margin-left: 0 !important;
  border-left: 2px solid #ccc !important;
  background: #f5f5f5 !important;
}

/* Responsive adjustments for formatting */
@media (max-width: 480px) {
  .message.bot .ai-main-heading {
    font-size: 16px !important;
  }

  .message.bot .ai-subheading {
    font-size: 14px !important;
  }

  .message.bot .ai-list-item,
  .message.bot .ai-sub-list-item {
    padding: 6px 10px 6px 24px !important;
  }

  .message.bot .ai-action-header {
    font-size: 13px !important;
  }
}

/* Predefined response styling - simplified and consistent */
.ai-predefined-response {
  position: relative !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
  color: #333 !important;
  padding: 0 8px 0 8px !important;
  margin: 0 !important;
}

/* Left border indicator for predefined responses */
.ai-predefined-response::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, #4f6cfa 0%, #8f6bf7 100%);
  border-radius: 0 2px 2px 0;
}

/* Predefined response text formatting - minimal spacing */
.ai-predefined-response p,
.ai-predefined-response .ai-paragraph {
  margin: 4px 0 !important;
  line-height: 1.5 !important;
  text-align: left !important;
  font-size: 14px !important;
  color: #333 !important;
  font-family: inherit !important;
}

.ai-predefined-response .ai-paragraph:first-child {
  margin-top: 0 !important;
}

.ai-predefined-response .ai-paragraph:last-child {
  margin-bottom: 0 !important;
}

.ai-predefined-response .ai-paragraph-compact {
  margin: 0 !important;
  padding: 0 !important;
}

/* Headings in predefined responses - simplified */
.ai-predefined-response h3,
.ai-predefined-response .ai-main-heading {
  margin: 8px 0 4px 0 !important;
  font-size: 15px !important;
  color: #2c3e50 !important;
  font-weight: 600 !important;
  font-family: inherit !important;
}

.ai-predefined-response h4,
.ai-predefined-response .ai-subheading {
  margin: 6px 0 3px 0 !important;
  font-size: 14px !important;
  color: #2c3e50 !important;
  font-weight: 600 !important;
  font-family: inherit !important;
}

.ai-predefined-response h5,
.ai-predefined-response .ai-action-header {
  margin: 4px 0 2px 0 !important;
  font-size: 14px !important;
  color: #2c3e50 !important;
  font-weight: 500 !important;
  font-family: inherit !important;
}

/* Text formatting in predefined responses */
.ai-predefined-response strong,
.ai-predefined-response .ai-bold {
  font-weight: 600 !important;
  color: #2c3e50 !important;
  font-family: inherit !important;
}

.ai-predefined-response em,
.ai-predefined-response .ai-italic {
  font-style: italic !important;
  color: #555 !important;
  font-family: inherit !important;
}

/* Lists in predefined responses - minimal spacing */
.ai-predefined-response ul {
  margin: 4px 0 !important;
  padding-left: 16px !important;
}

.ai-predefined-response li {
  margin: 2px 0 !important;
  font-family: inherit !important;
}

@media (max-width: 480px) {
  .chatbot-messages {
    padding: 16px;
  }

  .chatbot-header {
    padding: 12px 16px;
    min-height: 50px;
  }
}

@media (max-height: 600px) {
  .chatbot-messages {
    padding: 12px 20px;
  }

  .chatbot-input-area {
    min-height: 60px;
  }

  .chatbot-header {
    padding: 12px 20px;
    min-height: 50px;
  }
}

/* Overlay for mobile */
.chatbot-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.chatbot-overlay.active {
  display: block;
  opacity: 1;
}

/* Desktop overlay for better focus indication */
@media (min-width: 769px) {
  .chatbot-overlay.active {
    display: block;
    background: rgba(0, 0, 0, 0.1);
    pointer-events: none;
  }
}

@media (max-width: 768px) {
  .chatbot-overlay.active {
    display: block;
    pointer-events: auto;
  }
}

/* Animation for new messages */
.message-enter {
  opacity: 0;
  transform: translateY(20px);
}

.message-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: all 0.3s ease;
}

/* Slide toggle button styles */
.chatbot-toggle .toggle-text {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin: 0;
  line-height: 1;
}

/* Additional animations for smoother experience */
.chatbot-window.closing {
  animation: slideOutToRight 0.3s ease-in-out forwards;
}

.chatbot-window.opening {
  animation: slideInFromRight 0.3s ease-in-out forwards;
}

/* Enhanced message bubbles for full-height design */
.message {
  max-width: 80%;
  padding: 12px 16px;
  border-radius: 20px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
  animation: messageSlide 0.3s ease-out;
}

/* Welcome message enhancement */
.welcome-message {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef);
  border: 1px solid #dee2e6;
  border-radius: 16px;
  padding: 20px;
  text-align: center;
  color: #495057;
  margin-bottom: 16px;
}

.welcome-message h4 {
  margin: 0 0 12px;
  color: var(--link-color, #ff796a);
  font-size: 16px;
  font-weight: 600;
}

.welcome-message p {
  margin: 0;
  font-size: 13px;
  line-height: 1.5;
}

/* Status indicator for online/offline */
.chatbot-status {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.chatbot-status::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #4caf50;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
  }
  70% {
    box-shadow: 0 0 0 6px rgba(76, 175, 80, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0);
  }
}

/* AI Response Formatting Styles - Clean and Consistent with better separation */
.ai-main-heading {
  width: 100% !important;
  margin: 6px 0 4px 0 !important;
  padding: 6px 0 !important;
  font-size: 15px !important;
  font-weight: 600 !important;
  color: #2c3e50 !important;
  background: none !important;
  border: none !important;
  border-bottom: 1px solid #e0e0e0 !important;
  border-radius: 0 !important;
  line-height: 1.4 !important;
  display: block !important;
  box-shadow: none !important;
  font-family: inherit !important;
}

/* First main heading in message should have no top margin */
.message.bot .ai-main-heading:first-child {
  margin-top: 0 !important;
}

.ai-subheading {
  width: 100% !important;
  margin: 6px 0 3px 0 !important;
  padding: 4px 6px !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  color: #2c3e50 !important;
  background: transparent !important;
  border-left: 2px solid #3498db !important;
  border-radius: 0 !important;
  line-height: 1.3 !important;
  display: block !important;
  font-family: inherit !important;
}

.ai-dash-header {
  width: 100% !important;
  margin: 8px 0 4px 0 !important; /* Consistent with subheading */
  padding: 6px 8px !important; /* Consistent with subheading */
  font-size: 14px !important; /* Consistent with subheading */
  font-weight: 500 !important; /* Consistent with subheading */
  color: #515D77 !important;
  background: transparent !important; /* Simplified */
  border-left: 2px solid #3498db !important; /* Consistent with subheading */
  border-radius: 0 !important; /* Consistent with subheading */
  line-height: 1.3 !important;
  display: block !important;
}

.ai-status-header {
  width: 100% !important;
  margin: 8px 0 4px 0 !important; /* Consistent with subheading */
  padding: 6px 8px !important; /* Consistent with subheading */
  font-size: 13px !important; /* Consistent with subheading */
  font-weight: 500 !important; /* Consistent with subheading */
  color: #27ae60 !important;
  background: transparent !important; /* Simplified */
  border-left: 2px solid #27ae60 !important; /* Consistent with subheading */
  border-radius: 0 !important; /* Consistent with subheading */
  line-height: 1.3 !important;
  display: block !important;
}

.ai-action-header {
  width: 100% !important;
  margin: 8px 0 4px 0 !important; /* Consistent with subheading */
  /* padding: 6px 8px !important; */
  /* Consistent with subheading */
  font-size: 16px !important; /* Consistent with subheading */
  font-weight: 700 !important; /* Consistent with subheading */
  color: #101e3d !important;
  /* background: transparent !important; */
  /* Simplified */
  /* border-left: 2px solid #e67e22 !important; */
  /* Consistent with subheading */
  border-radius: 0 !important; /* Consistent with subheading */
  line-height: 22px !important;
  display: block !important;
}

/* Section Header Styling - NEW for "Accessing the Plan of Study:" style headers */
.ai-section-header {
  width: 100% !important;
  /* margin: 15px 0 10px 0 !important; */
  /* padding: 12px 16px !important; */
  font-size: 15px !important;
  font-weight: 700 !important;
  color: #2c3e50 !important;
  /* background: linear-gradient(135deg, #f1f3f4, #ffffff) !important; */
  /* border: 1px solid #ddd !important; */
  /* border-left: 5px solid var(--link-color, #ff796a) !important; */
  /* border-radius: 0 8px 8px 0 !important; */
  line-height: 1.3 !important;
  display: block !important;
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08) !important; */
}

/* Numbered Section Styling - Fixed alignment */
.ai-numbered-section {
  width: 100% !important;
  /* margin: 6px 0 !important;  */
  /* Reduced margin */
  /* padding: 8px 12px !important; */
  /* Reduced padding */
  /* background: #fafafa !important;  */
  /* Simplified background */
  border: none !important; /* No border for cleaner look */
  /* border-left: 3px solid var(--link-color, #ff796a) !important; */
  /* Simple left border */
  /* border-radius: 4px !important; */
  /* Smaller border radius */
  display: flex !important;
  align-items: flex-start !important;
  gap: 8px !important; /* Reduced gap */
  box-shadow: none !important; /* No shadow for simplicity */
}

.ai-section-number {
  /* background: var(--link-color, #ff796a) !important; */
  /* color: white !important; */
  font-weight: 900 !important; /* Reduced weight */
  font-size: 14px !important; /* Smaller font */
  color: #1fcf62;
  /* min-width: 20px !important;  */
  /* Smaller size */
  /* height: 20px !important; */
  /* Smaller size */
  /* border-radius: 50% !important; */
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  flex-shrink: 0 !important;
  margin-top: 0 !important; /* Removed top margin to align with text baseline */
}

.ai-section-title {
  font-size: 14px !important;
  font-weight: 400 !important;
  color: #515d77 !important;
  margin: 0 !important;
  line-height: 1.4 !important; /* Increased from 1.3 to match number height */
  padding-top: 0 !important; /* Removed top padding for perfect alignment */
}

/* Bullet Point Lists - Minimized spacing between bullets */
.ai-bullet-list {
  margin: 2px 0 !important;
  padding-left: 16px !important;
  list-style-type: disc !important;
  background: none !important;
  border: none !important;
}

.ai-bullet-item {
  margin: 1px 0 !important;
  padding: 0 !important;
  color: #333 !important;
  line-height: 1.3 !important;
  list-style-type: disc !important;
  font-family: inherit !important;
}

.ai-bullet-nested {
  margin: 1px 0 0 14px !important;
  padding: 0 !important;
  color: #555 !important;
  line-height: 1.3 !important;
  list-style-type: circle !important;
  font-family: inherit !important;
}

.ai-bold {
  font-weight: 700 !important;
  font-family: inherit !important;
}

.ai-italic {
  font-style: italic !important;
  color: #555 !important;
  font-family: inherit !important;
}

.ai-code {
  background: #f4f4f4 !important;
  color: #d73a49 !important;
  padding: 2px 4px !important;
  border-radius: 3px !important;
  font-family: "Consolas", "Monaco", "Courier New", monospace !important;
  font-size: 12px !important;
}

.ai-link {
  color: var(--link-color, #ff796a) !important;
  text-decoration: none !important;
  border-bottom: 1px solid var(--link-color, #ff796a) !important;
}

.ai-link:hover {
  text-decoration: none !important;
  border-bottom: 2px solid var(--link-color, #ff796a) !important;
}

/* AI Sources Section */
.ai-sources-section {
  /* margin-top: 16px !important; */
  /* padding: 12px !important; */
  /* background: #f8f9fa !important; */
  /* border-radius: 8px !important; */
  /* border-left: 3px solid var(--link-color, #ff796a) !important; */
}

.ai-sources-title {
  margin: 0 0 8px 0 !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  color: #495057 !important;
  display: flex !important;
  align-items: center !important;
  gap: 4px !important;
}

.ai-sources-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 6px !important;
}

.ai-source-item {
  /* background: white !important; */
  /* border: 1px solid #e9ecef !important; */
  /* border-radius: 6px !important; */
  /* padding: 8px 10px !important; */
  transition: all 0.2s ease !important;
}

.ai-source-item:hover {
  /* border-color: var(--link-color, #ff796a) !important; */
  /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important; */
}

.ai-source-link {
  color: inherit !important;
  text-decoration: none !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
}

.ai-source-link:hover {
  color: var(--link-color, #ff796a) !important;
}

.ai-source-title {
  font-size: 12px !important;
  font-weight: 500 !important;
  color: #495057 !important;
  flex: 1 !important;
  line-height: 1.3 !important;
}

.ai-source-score {
  font-size: 10px !important;
  color: #6c757d !important;
  background: #e9ecef !important;
  padding: 2px 6px !important;
  border-radius: 10px !important;
  white-space: nowrap !important;
}

/* AI Metadata Section for displaying question and tokens */
.ai-metadata-section {
  margin-top: 8px !important;
  margin-bottom: 6px !important;
  /* padding: 4px 8px !important; */
  /* background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important; */
  /* border: 1px solid #dee2e6 !important; */
  /* border-radius: 6px !important; */
  /* box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08) !important; */
  clear: both !important;
  width: 100% !important;
  box-sizing: border-box !important;
}

.ai-metadata-predefined {
  background: linear-gradient(135deg, #f8f9fa, #e9ecef) !important;
  border-color: #dee2e6 !important;
}

.ai-metadata-item {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  margin-bottom: 3px !important;
  min-height: 20px !important;
  flex-wrap: nowrap !important;
}

.ai-metadata-item:last-child {
  margin-bottom: 0 !important;
}

.ai-metadata-icon {
  color: var(--link-color, #ff796a) !important;
  font-size: 14px !important;
  min-width: 18px !important;
  width: 18px !important;
  text-align: center !important;
  flex-shrink: 0 !important;
  display: inline-block !important;
  line-height: 1 !important;
}

/* Fallback for FontAwesome icons in metadata section */
.ai-metadata-icon::before {
  font-family: FontAwesome, "Font Awesome 5 Free", "Font Awesome 5 Pro",
    sans-serif !important;
  font-weight: 900 !important;
}

/* Fallback content for when FontAwesome doesn't load */
.ai-question-source .ai-metadata-icon:not(.fa-database)::after {
  content: "🗃️" !important;
  font-size: 14px !important;
}

.ai-tokens-used .ai-metadata-icon:not(.fa-bolt)::after {
  content: "⚡" !important;
  font-size: 14px !important;
}

.ai-metadata-label {
  font-size: 11px !important;
  font-weight: 600 !important;
  color: #495057 !important;
  white-space: nowrap !important;
  min-width: 80px !important;
  flex-shrink: 0 !important;
  text-transform: none !important;
  letter-spacing: 0 !important;
  line-height: 1.2 !important;
}

.ai-metadata-value {
  font-size: 11px !important;
  color: #6c757d !important;
  /* background: rgba(255, 255, 255, 0.8) !important; */
  /* padding: 3px 6px !important; */
  /* border-radius: 3px !important; */
  /* border: 1px solid #e9ecef !important; */
  flex: 1 !important;
  word-break: break-word !important;
  /* line-height: 1.3 !important; */
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
  box-sizing: border-box !important;
  min-height: 14px !important;
}

.ai-question-source .ai-metadata-icon {
  color: #3498db !important;
}

.ai-tokens-used .ai-metadata-icon {
  color: #9b59b6 !important;
}

.ai-question-source .ai-metadata-value {
  /* background: rgba(52, 152, 219, 0.1) !important; */
  /* border-color: rgba(52, 152, 219, 0.3) !important; */
  /* color: #2980b9 !important; */
  font-style: italic !important;
}

.ai-tokens-used .ai-metadata-value {
  /* background: rgba(155, 89, 182, 0.1) !important;
  border-color: rgba(155, 89, 182, 0.3) !important; */
  /* color: #8e44ad !important; */
  /* font-weight: 600 !important; */
  color: #6c757d !important;
  font-family: "Courier New", "Consolas", monospace !important;
  letter-spacing: 1px !important;
  text-align: left !important;
}

/* Responsive adjustments for metadata section */
@media (max-width: 480px) {
  .ai-metadata-section {
    padding: 6px 8px !important;
  }

  .ai-metadata-item {
    flex-direction: column !important;
    align-items: flex-start !important;
    gap: 3px !important;
    padding: 6px 0 !important;
  }

  .ai-metadata-label {
    font-size: 10px !important;
    min-width: auto !important;
    width: 100% !important;
  }

  .ai-metadata-value {
    font-size: 10px !important;
    width: 100% !important;
    text-align: left !important;
  }

  .ai-tokens-used .ai-metadata-value {
    text-align: center !important;
  }
}

/* Additional CSS classes for elements created dynamically in JavaScript */

/* New message indicator - positioned at bottom of messages */
.new-message-indicator {
  position: absolute;
  bottom: 80px;
  right: 20px;
  z-index: 1000;
  cursor: pointer;
  display: none;
}

/* Conversation list styling for dynamically created elements */
.conversation-list-ul {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

.conversation-list-item {
  margin: 0;
  padding: 0;
  list-style: none;
  width: 100%;
}

/* Conversation loading indicator with custom loading dots */
.conversation-loading-indicator {
  padding: 10px;
  text-align: center;
  color: #666;
  font-size: 12px;
}

.conversation-loading-dots {
  display: inline-block;
  margin-left: 8px;
}

.conversation-loading-dot {
  animation: loading 1.4s infinite ease-in-out both;
  width: 4px;
  height: 4px;
  background-color: var(--link-color, #ff796a);
  border-radius: 50%;
  display: inline-block;
  margin-right: 2px;
}

.conversation-loading-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.conversation-loading-dot:nth-child(3) {
  animation-delay: 0.4s;
  margin-right: 0;
}

/* Conversation error indicator */
.conversation-error-indicator {
  padding: 10px;
  text-align: center;
  color: #999;
  font-size: 12px;
  font-style: italic;
}

.message-wrap {
  display: flex;
  flex-direction: column;
}
.chatbot-messages .message-wrap:last-child {
    min-height: calc(100vh - 240px);
}
/* ChatGPT-style typing animation */
.chatgpt-typing-container {
  font-family: inherit;
  line-height: 1.5;
}

.chatgpt-typing-line {
  margin-bottom: 4px;
  min-height: 1em;
  display: block;
}

.typing-cursor {
  color: #185cdf;
  font-weight: bold;
  animation: blink 1s infinite;
  display: inline-block;
  margin-left: 1px;
}

@keyframes blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

/* Ensure typing segments display properly */
.typing-segment {
  display: inline;
}

/* Enhanced message spacing for better typing effect visibility */
.message.bot .chatgpt-typing-container {
  min-height: 20px;
}


@media screen and (max-width:991px) {
  .sidebar-open .chatbot-content-wrap {
    width: 100%;
  }
  .chatbot-window.sidebar-open {
    width: var(--chatbot-width, 482px);
  }
  .chatbot-sidebar {
    transform: translateX(-100%);
    z-index: 4;
  }
  .chatbot-sidebar {
    padding: 16px;
  }
  .chatbot-sidebar .sidebar-content {
    margin: 0 -16px;
  }
  .chatbot-sidebar .sidebar-content .recent-title,
  .chatbot-sidebar #conversation-list ul li {
    padding: 0 16px;
  }
}