/*
 * File: styles.css
 * CodeLetter: E6D564A4
 * Version: E6D564A4-63709-1751062136
 * Generated: 2025-07-12T23:40:14.050Z
 */
/* Complete styles.css - Fixed animation issues */

:root {
  /* Core brand colors */
  --primary-color: #3498DB;
  --primary-dark: #2C80B8;
  --primary-light: #5dade2;
  --primary-gradient: linear-gradient(135deg, #3498DB, #2C80B8);
  --welcome-gradient: linear-gradient(135deg, #3498DB, #1ABC9C, #9B59B6); /* Inventory Source-inspired tri-color */
  
  /* Light theme variables */
  --background-color: #FFFFFF;
  --surface-color: #F8F9FF;
  --surface-hover: #F0F2FF;
  --text-color: #333333;
  --text-secondary: #666666;
  --text-tertiary: #999999;
  --text-white: #FFFFFF;
  --border-color: #E1E5FA;
  --shadow-color: rgba(52, 152, 219, 0.2);
  --input-bg: #FFFFFF;
  --divider-color: #E1E5FA;
  --success-color: #4CAF50;
  --error-color: #F44336;
  --warning-color: #FFA000;
  --info-color: #2196F3;
  --user-bubble: #F0F2FF;
  --bot-bubble: #FFFFFF;
  --accent-color: #5dade2;
  --scrollbar-track: #F5F5F5;
  --scrollbar-thumb: #DDDDDD;
  --font-size: 14px;
  --secondary-color: #34495e;
  --text-muted: #666;
  --card-bg: #fff;
  --inner-card-bg: #f9f9f9;
  --heading-color: #2c3e50;
  --user-message-bg: #E3F2FD;
  --assistant-message-bg: #FFFFFF;
  --chat-window-shadow: 
    0 8px 30px rgba(0, 0, 0, 0.25),
    0 0 1px rgba(0, 0, 0, 0.15),
    0 2px 4px rgba(71, 97, 225, 0.1);
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  color: var(--text-color);
  background-color: var(--background-color);
  transition: background-color 0.3s, color 0.3s;
}

/* Ensure light theme body background is explicitly white */
body {
  background-color: #FFFFFF; /* Explicitly set light mode background */
}

/* Common styles for smooth transitions */
#chat-window, 
#chat-messages, 
#chat-input, 
#chat-header, 
#chat-footer,
.slide-panel,
.bubble,
button,
input,
textarea {
  transition: background-color 0.3s, color 0.3s, border-color 0.3s, box-shadow 0.3s;
}

/* Chat Button */
#chat-button {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background: var(--primary-gradient);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  transition: box-shadow 0.3s;
  z-index: 9999;
}

#chat-button:hover {
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.25);
}

.chat-icon {
  width: 30px;
  height: 30px;
}

/* Chat Window */
#chat-window {
  position: fixed;
  bottom: 30px;
  right: 30px;
  width: 420px; /* Slightly wider to keep title on one line */
  height: 600px;
  border-radius: 16px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--chat-window-shadow);
  z-index: 9999;
  background-color: var(--background-color);
  transition: all 0.3s ease;
}

#chat-window.open {
  display: flex;
  animation: slideUp 0.3s ease-out;
}

#chat-window.expanded {
  height: 760px; /* Slightly taller to balance new width */
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* Header */
#chat-header {
  background: var(--primary-gradient);
  padding: 14px 16px;
  color: #fff;
  display: flex;
  align-items: center;
  position: relative;
  border-top-left-radius: 16px;
  border-top-right-radius: 16px;
}

#avatar {
  width: 36px; 
  height: 36px;
  margin-right: 12px;
  border-radius: 50%;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

#avatar img {
  width: 80%; 
  height: 80%; 
  object-fit: contain;
  border-radius: 0;
  background: transparent;
}

#chat-title {
  font-size: 16px; 
  font-weight: 600; 
  flex: 1;
  letter-spacing: 0.3px;
  white-space: nowrap; /* Keep title on one line */
  background-image: linear-gradient(135deg, #3f9dff, #57f2ff, #1687ff, #57f2ff, #3f9dff); /* Extended gradient for smoother loop */
  background-size: 300% 100%; /* Increased size for more movement */
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* text-shadow: 0 0 5px rgba(87, 242, 255, 0.5), 0 0 10px rgba(63, 157, 255, 0.4); Removed static text-shadow, animation will handle glow */
  animation: gradientTextAnimation 4s ease-in-out infinite; /* Removed subtleGlow */
  position: relative; /* Keep for potential other uses, but overflow:hidden removed if not needed for ::after */
}

/* Removed #chat-title::after pseudo-element as the glow should be part of the text itself or its shadow */

#header-actions {
  display: flex;
  align-items: center;
  gap: 5px;
}

.header-icon-btn {
  background: none;
  border: none;
  color: white;
  font-size: 14px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0.9;
  transition: all 0.2s;
}

.header-icon-btn:hover {
  opacity: 1;
  background: rgba(255, 255, 255, 0.2);
}

/* Connection status indicator */
#connection-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 5px;
}

#connection-status.connecting {
  background: var(--warning-color);
}

#connection-status.connected {
  background: var(--success-color);
}

#connection-status.disconnected {
  background: var(--error-color);
}

/* Chat Messages */
#chat-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  background-color: var(--background-color);
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: thin;
  scrollbar-color: var(--scrollbar-thumb) var(--scrollbar-track);
}

#chat-messages::-webkit-scrollbar {
  width: 6px;
}

#chat-messages::-webkit-scrollbar-track {
  background: var(--scrollbar-track);
}

#chat-messages::-webkit-scrollbar-thumb {
  background-color: var(--scrollbar-thumb);
  border-radius: 6px;
}

.message {
  display: flex;
  flex-direction: column;
  animation: messageAppear 0.3s ease-out;
  position: relative;
  margin-bottom: 15px; /* Keep margin for spacing between messages */
  width: 100%; /* Ensure container itself doesn't restrict width unnecessarily */
}

@keyframes messageAppear {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message.bot:first-of-type {
  animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.message:nth-child(1) { animation-delay: 0.1s; }
.message:nth-child(2) { animation-delay: 0.2s; }
.message:nth-child(3) { animation-delay: 0.3s; }
.message:nth-child(4) { animation-delay: 0.4s; }
.message:nth-child(5) { animation-delay: 0.5s; }

.message.user {
  align-self: flex-end; /* Aligns the whole container to the right */
  align-items: flex-end; /* Aligns items inside (bubble) to the end */
}

.message.bot {
  align-self: flex-start; /* Aligns the whole container to the left */
  align-items: flex-start; /* Aligns items inside (bubble) to the start */
  padding: 10px 0; /* Add some padding to the message container itself */
  width: 100%; /* Ensure bot message takes full available width */
}

.bubble {
  padding: 12px 16px;
  border-radius: 18px;
  position: relative;
  max-width: 85%; /* Apply max-width directly to the bubble */
  font-size: var(--font-size);
  line-height: 1.5;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
  transition: box-shadow 0.3s ease;
  word-wrap: break-word;
  overflow-wrap: break-word; 
}

.message.user .bubble {
  background-color: var(--user-bubble);
  color: var(--text-color);
  border-bottom-right-radius: 4px;
  transition: all 0.3s ease;
}

.message.user .bubble:hover {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}

.message.bot .bubble {
  background-color: transparent; /* No background for bot bubble */
  color: var(--text-color); /* Text color remains */
  border-radius: 0; /* No rounded corners */
  box-shadow: none; /* No shadow */
  padding: 0; /* Padding will be handled by bot-message-content or message.bot */
  transition: all 0.3s ease;
  width: 100%; /* Bubble itself takes full width */
  max-width: 100%; /* Override previous max-width for bubble */
}

.message.bot .bubble:hover {
  /* No hover effect for the invisible bubble */
  box-shadow: none;
  transform: none;
}

@keyframes messagePulse {
  0% { box-shadow: 0 0 0 0 rgba(71, 97, 225, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(71, 97, 225, 0); }
  100% { box-shadow: 0 0 0 0 rgba(71, 97, 225, 0); }
}

.message:last-child .bubble {
  /* Remove pulse from bot messages if it was applied to bubble */
  animation: none; 
}

/* Apply pulse to user messages only or a different element if needed */
.message.user:last-child .bubble {
  animation: messagePulse 2s infinite;
}

.sender-name {
  font-size: calc(var(--font-size) - 2px);
  margin-bottom: 4px;
  opacity: 0.7;
  font-weight: 500;
}

.bot-bubble-header {
  display: flex;
  align-items: center;
  margin-bottom: 6px;
}

.bot-bubble-header img {
  width: 18px;
  height: 18px;
  margin-right: 8px;
  border-radius: 50%;
}

.bot-name {
  font-size: calc(var(--font-size) + 2px);
  font-weight: 600;
  color: var(--primary-color);
}

.message.bot .bubble p {
  margin: 8px 0;
}

.message.bot .bubble p:last-child {
  margin-bottom: 0;
}

.message.bot .bubble ul, 
.message.bot .bubble ol {
  margin: 8px 0;
  padding-left: 25px;
}

.message.bot .bubble a {
  color: var(--primary-color, #0066cc);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--primary-color-light, rgba(0, 102, 204, 0.3));
  transition: all 0.2s ease;
}

.message.bot .bubble a:hover {
  color: var(--primary-dark, #004499);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-color, #0066cc);
}

.bubble pre {
  margin: 10px 0;
  padding: 12px;
  background-color: rgba(0, 0, 0, 0.05);
  border-radius: 8px;
  overflow-x: auto;
  font-size: 13px;
  font-family: monospace;
  color: var(--text-color);
}

.bubble code {
  font-family: monospace;
  background-color: rgba(0, 0, 0, 0.05);
  padding: 2px 5px;
  border-radius: 4px;
  font-size: 13px;
  color: var(--text-color);
}

/* Message Feedback Controls */
.message-feedback {
  display: flex; 
  gap: 12px;
  margin-top: 12px; /* Adjust margin if needed */
  padding-left: 16px; /* Align with content padding */
  align-items: center;
  opacity: 0;
  transition: opacity 0.2s;
}

.message.bot:hover .message-feedback {
  opacity: 1;
}

.message-feedback .feedback-text {
  font-size: var(--font-size);
  color: var(--text-tertiary);
}

.message-feedback .thumbs-up,
.message-feedback .thumbs-down {
  background: none;
  border: none;
  font-size: 14px;
  cursor: pointer; 
  color: var(--text-tertiary);
  padding: 4px;
  border-radius: 4px;
  transition: all 0.2s;
}

.message-feedback .thumbs-up:hover,
.message-feedback .thumbs-down:hover {
  background-color: var(--surface-hover);
  color: var(--text-color);
}

.message-feedback .thumbs-up.active,
.message-feedback .thumbs-down.active {
  color: var(--primary-color);
}

.message-feedback .thumbs-down.active {
  color: var(--error-color);
}

/* Bot Message Content Styling - Complete Redesign */
.bot-message-content {
  font-size: var(--font-size);
  line-height: 1.6;
  color: var(--text-color);
  padding: 12px 16px; /* Add padding directly here */
  background-color: var(--bot-bubble); /* Use the original bot bubble color for the content area */
  border-radius: 10px; /* Optional: give the content area some rounded corners */
  box-shadow: 0 2px 10px rgba(0,0,0,0.07); /* Optional: a light shadow for the content area */
  width: auto; /* Allow it to size based on content, up to max-width */
  max-width: 95%; /* Content area doesn't have to be 100% of the message width */
  display: inline-block; /* To make it wrap content, not full width unless content pushes it */
  text-align: left; /* Ensure text alignment is standard */
}

/* Remove the old message-card styling */
.message.bot .bubble .message-card {
  display: none;
}

/* Headings in bot messages */
.bot-message-content h1,
.bot-message-content h2,
.bot-message-content h3,
.bot-message-content h4 {
  color: var(--primary-color);
  margin-top: 1em; /* Use em for scalable margins */
  margin-bottom: 0.6em;
  font-weight: 600;
  line-height: 1.3;
}

.bot-message-content h1 { font-size: 1.3em; }
.bot-message-content h2 { font-size: 1.2em; }
.bot-message-content h3 { font-size: 1.1em; }
.bot-message-content h4 { font-size: 1.05em; }

/* First heading should not have top margin */
.bot-message-content > h1:first-child,
.bot-message-content > h2:first-child,
.bot-message-content > h3:first-child,
.bot-message-content > h4:first-child {
  margin-top: 0;
}

/* Paragraphs */
.bot-message-content p {
  margin: 1em 0;
  line-height: 1.6;
}

.bot-message-content p:first-child {
  margin-top: 0;
}

.bot-message-content p:last-child {
  margin-bottom: 0;
}

/* Fix spacing when paragraph is followed by heading */
.bot-message-content p + h1,
.bot-message-content p + h2,
.bot-message-content p + h3,
.bot-message-content p + h4 {
  margin-top: 1.5em;
}

/* Lists */
.bot-message-content ul,
.bot-message-content ol {
  margin: 1em 0;
  padding-left: 28px;
}

.bot-message-content li {
  margin-bottom: 0.6em;
  line-height: 1.6;
}

.bot-message-content li:last-child {
  margin-bottom: 0;
}

/* Nested lists */
.bot-message-content li ul,
.bot-message-content li ol {
  margin-top: 0.5em;
  margin-bottom: 0;
}

/* Strong text in lists */
.bot-message-content li strong {
  color: var(--text-color);
  font-weight: 600;
}

/* Links */
.bot-message-content a {
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
}

.bot-message-content a:hover {
  border-bottom-color: var(--primary-color);
}

/* Documentation links */
.bot-message-content .docs-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0.8em 0;
  padding: 10px 16px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: 0.95em;
  color: var(--primary-color);
  font-weight: 500;
  transition: all 0.2s ease;
}

.bot-message-content .docs-link:hover {
  background-color: var(--surface-hover);
  border-color: var(--primary-color);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bot-message-content .docs-link i {
  font-size: 0.85em;
  opacity: 0.7;
}

/* Video links */
.bot-message-content .video-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0.5em 0;
  padding: 8px 14px;
  background: linear-gradient(135deg, #ff4757 0%, #ff6b7a 100%);
  color: white;
  border-radius: 6px;
  font-size: 0.95em;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(255, 71, 87, 0.2);
}

.bot-message-content .video-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 71, 87, 0.3);
  color: white;
  border-bottom: none;
}

/* Media links (Canva, etc.) */
.bot-message-content .media-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0.5em 0;
  padding: 8px 14px;
  background: linear-gradient(135deg, #9c27b0 0%, #ba68c8 100%);
  color: white;
  border-radius: 6px;
  font-size: 0.95em;
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(156, 39, 176, 0.2);
}

.bot-message-content .media-link:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(156, 39, 176, 0.3);
  color: white;
  border-bottom: none;
}

/* External links */
.bot-message-content .external-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--primary-color);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: all 0.2s ease;
  font-weight: 500;
}

.bot-message-content .external-link:hover {
  border-bottom-color: var(--primary-color);
  color: var(--primary-color);
}

.bot-message-content .external-link i {
  font-size: 0.8em;
  opacity: 0.7;
}

/* Code blocks */
.bot-message-content pre {
  margin: 1.2em 0;
  padding: 16px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow-x: auto;
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
  line-height: 1.4;
}

.bot-message-content code {
  font-family: 'Consolas', 'Monaco', monospace;
  font-size: 0.9em;
  padding: 2px 6px;
  background-color: var(--surface-color);
  border-radius: 4px;
  color: var(--primary-color);
}

/* Steps - Improved styling */
.bot-message-content .step {
  position: relative;
  margin: 1em 0;
  padding: 14px 16px 14px 48px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.2s ease;
  line-height: 1.6;
}

.bot-message-content .step:hover {
  background-color: var(--surface-hover);
  border-color: var(--primary-color);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.bot-message-content .step::before {
  content: attr(data-step);
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85em;
  font-weight: 600;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Note/Warning/Info boxes */
.bot-message-content .note,
.bot-message-content .warning,
.bot-message-content .info {
  margin: 1em 0;
  padding: 14px 16px;
  border-radius: 8px;
  border-left: 4px solid;
  background-color: var(--surface-color);
}

.bot-message-content .note {
  border-left-color: var(--primary-color);
  background-color: rgba(71, 97, 225, 0.05);
}

.bot-message-content .warning {
  border-left-color: var(--warning-color);
  background-color: rgba(255, 152, 0, 0.05);
}

.bot-message-content .info {
  border-left-color: var(--info-color);
  background-color: rgba(33, 150, 243, 0.05);
}

/* Feature cards grid */
.bot-message-content .feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 1em 0;
}

.bot-message-content .feature-card {
  padding: 16px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  transition: all 0.2s ease;
}

.bot-message-content .feature-card:hover {
  background-color: var(--surface-hover);
  border-color: var(--primary-color);
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.bot-message-content .feature-title {
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Blockquotes */
.bot-message-content blockquote {
  margin: 1.2em 0;
  padding: 16px 20px;
  border-left: 4px solid var(--primary-color);
  background-color: var(--surface-color);
  font-style: italic;
  border-radius: 0 8px 8px 0;
}

/* Tables */
.bot-message-content table {
  margin: 1.2em 0;
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  overflow: hidden;
}

.bot-message-content th,
.bot-message-content td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.bot-message-content th {
  background-color: var(--surface-color);
  font-weight: 600;
  color: var(--primary-color);
}

.bot-message-content tr:last-child td {
  border-bottom: none;
}

.bot-message-content tr:hover {
  background-color: var(--surface-hover);
}

/* Images and media */
.bot-message-content img,
.bot-message-content video {
  max-width: 100%;
  height: auto;
  border-radius: 10px;
  margin: 1em 0;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bot-message-content iframe {
  max-width: 100%;
  border-radius: 10px;
  margin: 1em 0;
  border: 1px solid var(--border-color);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Emoji bullets */
.bot-message-content .emoji-bullet {
  margin-right: 8px;
  font-size: 1.2em;
  vertical-align: middle;
}

/* Button links */
.bot-message-content .button-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  background-color: var(--primary-color);
  color: white;
  border-radius: 8px;
  font-weight: 500;
  transition: all 0.2s ease;
  margin: 0.5em 0.25em;
  text-decoration: none;
  border: none;
}

.bot-message-content .button-link:hover {
  background-color: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(71, 97, 225, 0.3);
  border: none;
  text-decoration: none;
  color: white;
}

/* Enhanced button link style */
.bot-message-content a.button-link.enhanced {
  background-color: var(--primary-color);
  color: white !important;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none !important;
  border: none !important;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(71, 97, 225, 0.2);
  transition: all 0.3s ease;
  margin: 1em 0;
}

.bot-message-content a.button-link.enhanced:hover {
  background-color: var(--primary-dark);
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(71, 97, 225, 0.3);
  color: white !important;
}

.bot-message-content a.button-link.enhanced i {
  font-size: 0.9em;
  opacity: 0.9;
}

/* Dividers */
.bot-message-content hr {
  margin: 1.5em 0;
  border: none;
  border-top: 1px solid var(--border-color);
}

/* Enhanced Steps Styling */
.bot-message-content .enhanced-steps {
  counter-reset: step-counter;
  list-style: none;
  padding-left: 0;
  margin: 1.5em 0;
}

.bot-message-content .step-item {
  position: relative;
  margin-bottom: 1.5em;
  padding-left: 3.5em;
  min-height: 3em;
}

.bot-message-content .step-item::before {
  content: attr(data-step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2.5em;
  height: 2.5em;
  background: linear-gradient(135deg, var(--primary-color) 0%, #5a7de8 100%);
  color: white;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 1.1em;
  box-shadow: 0 3px 10px rgba(71, 97, 225, 0.3);
}

.bot-message-content .step-item:not(:last-child)::after {
  content: '';
  position: absolute;
  left: 1.25em;
  top: 2.5em;
  width: 2px;
  height: calc(100% - 2.5em + 0.75em);
  background: linear-gradient(to bottom, var(--primary-color), transparent);
  opacity: 0.3;
}

.bot-message-content .step-title {
  display: inline; /* Keep trailing punctuation like ':' on the same line */
  font-size: 1.1em;
  color: var(--text-color);
  font-weight: 600;
}

.bot-message-content .step-title i {
  margin-right: 0.5em;
  color: var(--primary-color);
  font-size: 0.9em;
}

/* Enhanced Sub-lists */
.bot-message-content .sub-list {
  margin-top: 0.8em;
  margin-bottom: 0;
  padding-left: 1.5em;
  list-style: none;
}

.bot-message-content .sub-list li {
  position: relative;
  padding-left: 1.8em;
  margin-bottom: 0.5em;
  line-height: 1.7;
  color: var(--text-secondary);
}

.bot-message-content .sub-list li .list-icon {
  position: absolute;
  left: 0;
  top: 0.2em;
  font-size: 0.8em;
}

/* Video Container Enhancement */
.bot-message-content .video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  margin: 1.5em 0;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  background: var(--surface-color);
}

.bot-message-content .video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
  border-radius: 12px;
}

/* Enhanced Headers with Icons */
.bot-message-content h3 i {
  font-size: 0.9em;
  vertical-align: middle;
}

/* Enhanced Links */
.bot-message-content a.enhanced {
  position: relative;
  padding-bottom: 1px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.3s ease;
}

.bot-message-content a.enhanced:hover {
  color: var(--primary-dark);
}

/* Call-to-action sections */
.bot-message-content .cta-section {
  background: linear-gradient(135deg, rgba(71, 97, 225, 0.05) 0%, rgba(71, 97, 225, 0.02) 100%);
  border: 1px solid rgba(71, 97, 225, 0.2);
  border-radius: 12px;
  padding: 1.5em;
  margin: 1.5em 0;
  text-align: center;
}

/* Info boxes with icons */
.bot-message-content .info-box {
  display: flex;
  align-items: flex-start;
  gap: 1em;
  padding: 1.2em;
  background: var(--surface-color);
  border-radius: 10px;
  margin: 1em 0;
  border: 1px solid var(--border-color);
}

.bot-message-content .info-box i {
  font-size: 1.5em;
  color: var(--primary-color);
  flex-shrink: 0;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .bot-message-content .step-item {
    padding-left: 3em;
  }
  
  .bot-message-content .step-item::before {
    width: 2em;
    height: 2em;
    font-size: 1em;
  }
  
  .bot-message-content .step-item:not(:last-child)::after {
    left: 1em;
  }
  
  .bot-message-content .video-container {
    margin: 1em 0;
  }
}

/* Suggested resources should now appear below the bot-message-content */
.suggested-resources {
  margin-top: 12px; /* Spacing from the content above */
  padding: 0; /* Remove padding to let the panel handle it */
  width: 100%;
  box-sizing: border-box;
  /* background-color: transparent; No separate background, part of the message flow */
  /* border: none; */
}

.follow-up-container {
  margin-top: 12px;
  padding: 0 16px; /* Align with content padding */
  /* background-color: transparent; */
  /* border: none; */
  /* border-radius: 0; */
}

/* Feedback form */
.feedback-form {
  margin-top: 10px;
  background-color: var(--surface-color);
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
}

.feedback-textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  font-size: var(--font-size);
  min-height: 70px;
  resize: none;
  background-color: var(--input-bg);
  color: var(--text-color);
  margin-bottom: 10px;
  font-family: 'Inter', sans-serif;
}

.feedback-textarea:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(71, 97, 225, 0.2);
}

.feedback-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.feedback-submit,
.feedback-cancel {
  padding: 6px 12px;
  border-radius: 6px;
  font-size: var(--font-size);
  cursor: pointer;
  border: none;
  font-weight: 500;
  transition: all 0.2s;
}

.feedback-submit {
  background-color: var(--primary-color);
  color: white;
}

.feedback-submit:hover {
  background-color: var(--primary-dark);
}

.feedback-cancel {
  background-color: var(--surface-hover);
  color: var(--text-color);
}

.feedback-cancel:hover {
  background-color: var(--border-color);
}

/* Media elements in chat bubbles */
.message.bot .bubble img,
.message.bot .bubble iframe {
  max-width: 100%;
  border-radius: 8px;
  margin: 8px 0;
  border: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.message.bot .bubble video {
  max-width: 100%;
  border-radius: 8px;
}

.uploaded-image {
  display: block; /* Or inline-block depending on layout needs */
  max-width: 100%;
  border-radius: 8px;
  margin: 5px; /* Example margin */
  position: relative; /* Ensure overlay is positioned relative to this */
  cursor: pointer; /* If it's clickable */
  overflow: hidden; /* If the overlay has rounded corners that should match */
}

.uploaded-image:hover {
  transform: scale(1.02);
}

/* Input Area */
#chat-input {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-top: 1px solid var(--border-color);
  background-color: var(--background-color);
}

.input-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--surface-color);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
}

.input-action-btn:hover {
  background-color: var(--surface-hover);
  color: var(--primary-color);
}

#message-input {
  flex: 1;
  padding: 10px 14px;
  border: 1px solid var(--border-color);
  border-radius: 18px;
  resize: none;
  outline: none;
  font-size: var(--font-size);
  line-height: 1.5;
  max-height: 120px;
  overflow-y: auto;
  background-color: var(--input-bg);
  color: var(--text-color);
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#message-input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(71, 97, 225, 0.1);
}

#message-input::-webkit-scrollbar {
  width: 4px;
}

#message-input::-webkit-scrollbar-thumb {
  background: var(--scrollbar-thumb);
  border-radius: 2px;
}

#send-button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: var(--primary-gradient);
  color: white;
  display: flex; 
  align-items: center; 
  justify-content: center;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s;
  box-shadow: 0 2px 6px rgba(71, 97, 225, 0.3);
}

#send-button:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 8px rgba(71, 97, 225, 0.4);
}

#send-button i {
  font-size: 14px;
}

/* Footer */
#chat-footer {
  padding: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-top: 1px solid var(--border-color);
  font-size: var(--font-size);
  color: var(--text-tertiary);
  background-color: var(--background-color);
}

.footer-info {
  flex: 1;
}

#chat-footer a {
  color: var(--primary-color);
  text-decoration: none;
}

#chat-footer a:hover {
  text-decoration: underline;
}

/* Center footer content */
#chat-footer {
  padding: 12px 16px;
  display: flex;
  justify-content: center;
  align-items: center;
  border-top: 1px solid var(--border-color);
  font-size: 0.70rem;
  color: var(--text-tertiary);
  background-color: var(--background-color);
  text-align: center;
  gap: 16px;
}

.footer-info {
  flex: 0 1 auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

#chat-footer a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

#chat-footer a:hover {
  text-decoration: underline;
  color: var(--primary-dark);
}

.footer-actions {
  display: flex;
  gap: 8px;
}

.footer-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  background-color: var(--surface-color);
  color: var(--text-secondary);
  border: 1px solid var(--border-color);
  transition: all 0.2s;
  text-decoration: none;
}

.footer-btn:hover {
  background-color: var(--surface-hover);
  color: var(--primary-color);
}

/* Typing indicator */
.typing-indicator {
  display: flex; 
  align-items: center; 
  justify-content: center;
  gap: 4px;
  padding: 12px 16px;
  width: 60px;
  background-color: var(--bot-bubble);
  border-radius: 18px;
  border-bottom-left-radius: 4px;
  border: 1px solid var(--border-color);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.typing-indicator div {
  width: 8px; 
  height: 8px;
  background-color: var(--text-tertiary);
  border-radius: 50%;
  animation: blink 1.4s infinite;
}

.typing-indicator div:nth-child(2) { 
  animation-delay: 0.2s; 
}

.typing-indicator div:nth-child(3) { 
  animation-delay: 0.4s; 
}

@keyframes blink {
  0%, 100% { opacity: 0.4; transform: scale(0.8); }
  50% { opacity: 1; transform: scale(1); }
}

/* Analyzing overlay for images */
.analyzing-overlay {
  position: absolute; 
  top: 0; 
  left: 0; 
  right: 0; 
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.45);
  display: flex; 
  align-items: center; 
  justify-content: center;
  color: white;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  animation: colorfulGlow 2.5s infinite;
  text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  box-shadow: inset 0 0 20px rgba(66, 135, 245, 0.7);
  z-index: 2;
}

.analyzing-overlay::before {
  content: ""; 
  position: absolute;
  top: -3px;
  left: -3px;
  right: -3px;
  bottom: -3px;
  border-radius: 15px;
  background: linear-gradient(45deg, #ff00cc, #3333ff, #00b4db, #ff8c00);
  background-size: 300% 300%;
  z-index: -1;
  filter: blur(8px);
  opacity: 0.7;
  animation: shimmerBorder 3s ease infinite;
}

@keyframes shimmerBorder {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes colorfulGlow {
  0% { 
    box-shadow: inset 0 0 20px rgba(66, 135, 245, 0.8);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  }
  25% { 
    box-shadow: inset 0 0 25px rgba(232, 78, 195, 0.8);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
  }
  50% { 
    box-shadow: inset 0 0 20px rgba(78, 232, 119, 0.8);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  }
  75% { 
    box-shadow: inset 0 0 25px rgba(233, 176, 33, 0.8);
    text-shadow: 0 0 15px rgba(255, 255, 255, 0.9);
  }
  100% { 
    box-shadow: inset 0 0 20px rgba(66, 135, 245, 0.8);
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.9);
  }
}

@keyframes gradientTextAnimation {
  0% {
    background-position: 0% 50%;
  }
  50% {
    background-position: 100% 50%;
  }
  100% {
    background-position: 0% 50%;
  }
}

/* New or adjusted animation for a subtle inner/text-shadow glow */
@keyframes subtleGlow {
  0%, 100% {
    text-shadow: 0 0 3px rgba(87, 242, 255, 0.3), 0 0 6px rgba(63, 157, 255, 0.2);
  }
  50% {
    text-shadow: 0 0 6px rgba(87, 242, 255, 0.5), 0 0 12px rgba(63, 157, 255, 0.4);
  }
}

/* Adjusted textShine if it was used for .empty-state h3's direct text glow, 
   otherwise ensure gradientTextAnimation provides the movement and a new subtleGlow if needed */
@keyframes textShine {
  0%, 100% {
    text-shadow: 0 0 7px rgba(200, 200, 255, 0.7), 
                 0 0 10px rgba(150, 150, 255, 0.6), 
                 0 0 15px rgba(100, 100, 225, 0.4), 
                 0 0 20px rgba(71, 97, 225, 0.3);
  }
  50% {
    text-shadow: 0 0 10px rgba(220, 220, 255, 0.8), 
                 0 0 15px rgba(180, 180, 255, 0.7), 
                 0 0 20px rgba(120, 120, 235, 0.5), 
                 0 0 25px rgba(91, 117, 245, 0.4);
  }
}

@keyframes pulsate {
  0%, 100% { 
    opacity: 0.7; 
    transform: scale(1);
  }
  50% { 
    opacity: 1; 
    transform: scale(1.05);
  }
}

/* Video/iframe placeholders */
.video-placeholder, .iframe-placeholder {
  background-color: var(--surface-color);
  border-radius: 8px;
  padding: 20px;
  text-align: center;
  border: 1px solid var(--border-color);
  margin: 10px 0;
}

.placeholder-icon {
  font-size: 24px;
  color: var(--primary-color);
  margin-bottom: 10px;
}

.placeholder-text {
  font-size: 14px;
  color: var(--text-secondary);
}

/* Bot image handling */
.bot-image {
  position: relative;
  display: block;
  max-width: 100%;
}

.bot-image::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(255, 255, 255, 0.5);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-color);
  font-size: 20px;
}

.bot-image.loaded::before {
  display: none;
}

/* Media queries for responsiveness */
@media screen and (max-width: 480px) {
  #chat-window {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 100%;
    border-radius: 0;
    transition: all 0.3s;
  }
  
  #chat-window.open {
    animation: slideInMobile 0.3s ease-out;
  }

  @keyframes slideInMobile {
    from {
      transform: translateY(100%);
    }
    to {
      transform: translateY(0);
    }
  }

  #chat-header {
    border-radius: 0;
  }

  .slide-panel {
    width: 100%;
  }
  
  .resource-card {
    flex-direction: column;
  }
  
  .resource-icon {
    margin-bottom: 10px;
  }

  .quick-links-container {
    overflow-x: auto;
    padding-bottom: 5px;
    flex-wrap: nowrap;
  }

  .quick-link {
    flex-shrink: 0;
  }

  #search-in-chat {
    top: auto;
    bottom: 80px;
    right: 16px;
  }
}

/* Theme transition helper */
.theme-transition {
  transition: background-color 0.5s, color 0.5s, border-color 0.5s, box-shadow 0.5s;
}

/* Highlight Effect for New Messages */
@keyframes highlight {
  0% { box-shadow: 0 0 0 2px rgba(71, 97, 225, 0.5); }
  100% { box-shadow: none; }
}

.highlight-effect {
  animation: highlight 1s ease-out;
}

/* Voice Input Animation */
@keyframes pulseMic {
  0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.5); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(244, 67, 54, 0); }
  100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

.recording-active {
  background-color: #F44336 !important;
  color: white !important;
  animation: pulseMic 1.5s infinite;
}

/* Empty State - REPLACING THESE BLOCKS */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
  color: var(--text-tertiary);
  height: 100%;
  opacity: 0;
  animation: fadeIn 0.5s ease forwards .2s; /* Added fadeIn from backup */
}

.empty-state i {
  font-size: 48px; /* Was 40px, then 48px in current. Backup had 40px. Image looks like 48px is fine. */
  margin-bottom: 20px;
  color: var(--primary-light); /* Match backup */
}

.empty-state h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 10px;
  background-image: var(--welcome-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Removed constantGlow animation */
  animation: gradientTextAnimation 3s ease infinite;
  cursor: pointer;
  position: relative;
  overflow: hidden; 
  transition: opacity 0.5s ease;
}

.empty-state p {
  font-size: 14px; /* Match backup */
  color: var(--text-secondary);
  max-width: 320px; /* allow more width for new container */
  margin: 0 auto 18px; /* Match backup */
  background-image: var(--welcome-gradient);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  /* Removed constantGlow animation */
  animation: gradientTextAnimation 3s ease infinite 0.5s;
  position: relative;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

.empty-state button {
  padding: 8px 16px;
  background: var(--primary-color);
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s;
}

.empty-state button:hover {
  background: var(--primary-dark);
}

/* Slide panels (Settings & History) */
.slide-panel {
  position: absolute;
  top: 0;
  right: -380px; /* Start off screen */
  width: 380px;
  height: 100%;
  background-color: var(--background-color);
  box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1),
              5px 0 15px rgba(0, 0, 0, 0.1);
  z-index: 10;
  transition: right 0.3s ease;
  display: flex;
  flex-direction: column;
  overflow: visible; /* allow edge glow to extend over content */
}

.slide-panel.active {
  right: 0;
}

/* Left-positioned slide panel (for profile) */
.slide-panel.left {
  left: -380px;
  right: auto;
}

.slide-panel.left.active {
  left: 0;
}

/* Edge glow overlays so the shadow se vea "por encima" (sobre el contenido) */
.slide-panel::before,
.slide-panel::after {
  content: '';
  position: absolute;
  top: 0;
  width: 18px;
  height: 100%;
  pointer-events: none;
  z-index: 2; /* above panel content, still within panel stacking */
}

/* Left inner-edge glow (sobre el contenido del chat) */
.slide-panel::before {
  left: -18px;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.14), rgba(0, 0, 0, 0));
}

/* Right outer-edge glow to match visual balance */
.slide-panel::after {
  right: -18px;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0));
}

/* Add balanced shadows to main content panels */
#chat-window {
  box-shadow: 
    -5px 0 15px rgba(0, 0, 0, 0.1),  /* Left shadow */
    5px 0 15px rgba(0, 0, 0, 0.1),   /* Right shadow */
    0 8px 30px rgba(0, 0, 0, 0.15),  /* Bottom shadow */
    0 2px 4px rgba(71, 97, 225, 0.1); /* Subtle accent */
}

/* Dashboard main content shadow */
.tab-content {
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

/* Profile detail panel shadow */
.profile-detail-panel {
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

/* Knowledge base panel shadow */
.knowledge-panel {
  box-shadow: 5px 0 15px rgba(0, 0, 0, 0.1);
}

.panel-header {
  padding: 16px;
  background: var(--primary-gradient);
  color: white;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.panel-header h3 {
  margin: 0;
  font-size: calc(var(--font-size) + 2px);
  font-weight: 600;
}

.panel-close {
  background: none;
  border: none;
  color: white;
  font-size: 14px;
  cursor: pointer;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.panel-content {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
}

/* Settings panel specific styles */
.setting-group {
  margin-bottom: 20px;
}

.setting-label {
  display: block;
  font-size: var(--font-size);
  font-weight: 500;
  margin-bottom: 8px;
  color: var(--text-color);
}

.setting-group input[type="text"],
.setting-group input[type="email"] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: var(--font-size);
  color: var(--text-color);
  background-color: var(--input-bg);
}

.setting-group input[type="text"]:focus,
.setting-group input[type="email"]:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(71, 97, 225, 0.2);
}

/* Slider control */
.slider-container {
  display: flex;
  align-items: center;
  gap: 15px;
}

.slider {
  flex: 1;
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  height: 4px;
  background: var(--border-color);
  border-radius: 2px;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
}

.slider::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--primary-color);
  cursor: pointer;
  border: none;
}

.slider-value {
  font-size: var(--font-size);
  color: var(--text-secondary);
  min-width: 40px;
  text-align: right;
}

/* Toggle switch */
.toggle-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 24px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: var(--border-color);
  transition: .3s;
  border-radius: 24px;
}

.toggle-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

input:checked + .toggle-slider {
  background-color: var(--primary-color);
}

input:checked + .toggle-slider:before {
  transform: translateX(22px);
}

/* Setting action buttons */
.setting-actions {
  display: flex;
  gap: 10px;
  margin-top: 30px;
}

.primary-button,
.secondary-button {
  padding: 10px 16px;
  border-radius: 8px;
  font-size: var(--font-size);
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  border: none;
}

.primary-button {
  background: var(--primary-gradient);
  color: white;
  flex: 1;
}

.primary-button:hover {
  box-shadow: 0 4px 10px rgba(71, 97, 225, 0.3);
}

.secondary-button {
  background: var(--surface-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
}

.secondary-button:hover {
  background: var(--surface-hover);
}

/* History panel specific styles */
.search-box {
  position: relative;
  margin-bottom: 16px;
}

.search-box input {
  width: 100%;
  padding: 10px 12px;
  padding-left: 36px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: var(--font-size);
  color: var(--text-color);
  background-color: var(--input-bg);
}

.search-box input:focus {
  outline: none;
  border-color: var(--primary-color);
  box-shadow: 0 0 0 2px rgba(71, 97, 225, 0.2);
}

.search-box i {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-tertiary);
}

#conversation-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.conversation-item {
  padding: 12px;
  border-radius: 8px;
  background-color: var(--surface-color);
  cursor: pointer;
  transition: background-color 0.2s;
}

.conversation-item:hover {
  background-color: var(--surface-hover);
}

.conversation-date {
  font-size: calc(var(--font-size) - 2px);
  color: var(--text-tertiary);
  margin-bottom: 4px;
}

.conversation-preview {
  font-size: var(--font-size);
  color: var(--text-color);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Search popup */
#search-popup {
  position: absolute;
  top: 60px;
  left: 10px;
  right: 10px;
  background-color: var(--background-color);
  border-radius: 12px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
  z-index: 5;
  display: none;
  flex-direction: column;
  max-height: 70%;
  overflow: hidden;
}

#search-popup.active {
  display: flex;
}

.search-header {
  padding: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border-color);
}

#message-search {
  flex: 1;
  padding: 8px 12px;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-size: var(--font-size);
  background-color: var(--input-bg);
  color: var(--text-color);
}

#message-search:focus {
  outline: none;
  border-color: var(--primary-color);
}

#close-search {
  background: none;
  border: none;
  color: var(--text-tertiary);
  cursor: pointer;
  font-size: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#search-results {
  overflow-y: auto;
  padding: 12px;
  max-height: calc(100% - 60px);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.search-result {
  padding: 10px;
  border-radius: 8px;
  background-color: var(--surface-color);
  cursor: pointer;
  transition: background-color 0.2s;
}

.search-result:hover {
  background-color: var(--surface-hover);
}

.result-text {
  font-size: var(--font-size);
  color: var(--text-color);
}

.result-text mark {
  background-color: rgba(71, 97, 225, 0.2);
  color: var(--primary-color);
  padding: 0 2px;
  border-radius: 2px;
}

/* Search in conversation button */
#search-in-chat {
  position: absolute;
  top: 70px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background-color: var(--surface-color);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  opacity: 0.7;
  transition: all 0.2s;
}

#search-in-chat:hover {
  opacity: 1;
  background-color: var(--surface-hover);
}

/* Quick links section */
#quick-links {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-color);
  display: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 0.3s, transform 0.3s, display 0s 0.3s;
}

#quick-links.visible {
  display: block;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.3s, transform 0.3s;
}

#quick-links h4 {
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 10px 0;
  color: var(--text-color);
}

.quick-links-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.quick-link {
  padding: 6px 12px;
  background-color: var(--surface-color);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  font-size: var(--font-size);
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s;
}

.quick-link:hover {
  background-color: var(--surface-hover);
  border-color: var(--primary-color);
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 10000;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toast {
  background-color: var(--surface-color);
  border-left: 4px solid var(--primary-color);
  color: var(--text-color);
  padding: 12px 16px;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  font-size: var(--font-size);
  transform: translateX(100%);
  opacity: 0;
  transition: transform 0.3s, opacity 0.3s;
  max-width: 300px;
}

.toast.show {
  transform: translateX(0);
  opacity: 1;
}

/* No conversations */
.no-conversations {
  padding: 20px;
  text-align: center;
  color: var(--text-tertiary);
  font-size: var(--font-size);
}

/* Voice input recording animation */
@keyframes recordingPulse {
  0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.4); }
  70% { box-shadow: 0 0 0 10px rgba(244, 67, 54, 0); }
  100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

.recording-active {
  animation: recordingPulse 2s infinite;
}

/* Resource cards – compact chip with hover panel */
.suggested-resources { display: block; position: static; margin-top: 10px; width: 100%; }
.suggested-resources .resources-mini { display: none; }
/* Match horizontal padding with parent to avoid visual left shift */
.suggested-resources .resources-panel { display: block; position: static; transform: none; min-width: 0; max-width: 100%; padding: 12px 16px; border-radius: 10px; background: linear-gradient(135deg, rgba(52, 152, 219, 0.03) 0%, rgba(52, 152, 219, 0.05) 100%); border: 1px solid rgba(52, 152, 219, 0.12); box-shadow: none; box-sizing: border-box; }

/* Ensure proper alignment even with compact class */
.suggested-resources.compact { 
  display: block !important; 
  position: static !important; 
  margin-top: 10px !important; 
  width: 100% !important;
  /* Ensure container uses the same horizontal padding as standard message content */
  padding: 0 16px !important;
  box-sizing: border-box !important;
}
.suggested-resources.compact .resources-panel { 
  display: block !important; 
  position: static !important; 
  transform: none !important; 
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  /* Match parent horizontal padding to align with siblings */
  padding: 12px 16px !important;
}

/* Ensure resource list maintains alignment in compact mode */
.suggested-resources.compact .resources-list {
  display: flex !important;
  flex-direction: column !important;
  gap: 8px !important;
  width: 100% !important;
  align-items: stretch !important;
  margin-top: 8px !important;
}

.suggested-resources.compact .resource-card {
  width: 100% !important;
  box-sizing: border-box !important;
  display: flex !important;
  align-items: center !important;
  padding: 12px 16px !important;
  min-height: 48px !important;
}

/* Ensure icon and content alignment in compact mode */
.suggested-resources.compact .resource-icon {
  min-width: 32px !important;
  width: 32px !important;
  height: 32px !important;
  margin-right: 12px !important;
  flex-shrink: 0 !important;
}

.suggested-resources.compact .resource-content {
  flex: 1 !important;
  min-width: 0 !important;
  overflow: hidden !important;
}

.resources-panel .resources-title {
  font-size: 0.85rem; /* smaller header */
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--primary-color, #4761E1);
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding-bottom: 10px;
}

.resources-panel .resources-title::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 40px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
  border-radius: 1px;
}

.resources-panel .resources-title i {
  font-size: 1rem;
  background: linear-gradient(135deg, var(--primary-color) 0%, #6C7EE8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.resources-panel .resources-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  margin-top: 8px;
  align-items: stretch;
}

.resource-card {
  display: flex;
  align-items: center;
  position: relative;
  background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 1px solid rgba(71, 97, 225, 0.08);
  min-height: 48px;
  padding: 12px 16px;
  width: 100%;
  box-sizing: border-box;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.03);
}

.resource-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(135deg, var(--primary-color) 0%, #6C7EE8 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.resource-card:hover {
  background: linear-gradient(135deg, #f8f9ff 0%, #f0f2ff 100%);
  margin-left: 4px;
  margin-right: -4px;
  box-shadow: 0 4px 12px rgba(71, 97, 225, 0.12);
  border-color: rgba(71, 97, 225, 0.2);
}

/* Ensure hover effects work properly with compact class */
.suggested-resources.compact .resource-card:hover {
  margin-left: 4px !important;
  margin-right: -4px !important;
  width: calc(100% - 4px) !important;
}

.resource-card:hover::before {
  opacity: 1;
}

.resource-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  margin-right: 12px;
  background: linear-gradient(135deg, rgba(71, 97, 225, 0.1) 0%, rgba(108, 126, 232, 0.15) 100%);
  color: var(--primary-color, #4761E1);
  flex-shrink: 0;
  font-size: 14px;
  transition: all 0.3s ease;
}

.resources-panel .resource-card:hover .resource-icon {
  background: linear-gradient(135deg, var(--primary-color) 0%, #6C7EE8 100%);
  color: white;
  transform: scale(1.06);
}

.resource-content {
  flex: 1;
  overflow: hidden;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
}

.resources-panel .resource-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-color, #333);
  margin-bottom: 2px;
  line-height: 1.3;
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
}

.resources-panel .resource-title::after {
  content: '→';
  font-size: 0.75rem;
  color: var(--primary-color);
  opacity: 0;
  transform: translateX(-4px);
  transition: all 0.3s ease;
}

.resources-panel .resource-card:hover .resource-title::after {
  opacity: 1;
  transform: translateX(0);
}

.resources-panel .resource-description {
  font-size: 0.72rem;
  color: var(--text-secondary, #666);
  line-height: 1.35;
  margin-top: 2px;
  opacity: 0.8;
}

/* External link indicator */
.resources-panel .resource-title .fa-external-link-alt {
  font-size: 0.7rem;
  opacity: 0.6;
  margin-left: auto;
}

/* Special styling for YouTube resources */
.resources-panel .resource-card[data-url*="youtube.com"] .resource-icon,
.resources-panel .resource-card[data-url*="youtu.be"] .resource-icon {
  background: linear-gradient(135deg, rgba(255, 0, 0, 0.1) 0%, rgba(255, 0, 0, 0.15) 100%);
  color: #FF0000;
}

.resources-panel .resource-card[data-url*="youtube.com"]:hover .resource-icon,
.resources-panel .resource-card[data-url*="youtu.be"]:hover .resource-icon {
  background: #FF0000;
  color: white;
}

/* Special styling for documentation resources */
.resources-panel .resource-card[data-url*="help.inventorysource.com"] .resource-icon {
  background: linear-gradient(135deg, rgba(33, 150, 243, 0.1) 0%, rgba(33, 150, 243, 0.15) 100%);
  color: #2196F3;
}

.resources-panel .resource-card[data-url*="help.inventorysource.com"]:hover .resource-icon {
  background: #2196F3;
  color: white;
}

/* Responsive adjustments */
@media (max-width: 480px) {
  .suggested-resources .resources-panel,
  .suggested-resources.compact .resources-panel { 
    width: 100% !important; 
    padding: 10px 12px !important; 
    box-sizing: border-box !important;
  }
  .suggested-resources.compact { 
    padding: 0 12px !important; /* keep container and panel consistent on mobile */
  }
  
  .resources-list,
  .suggested-resources.compact .resources-list {
    gap: 6px !important;
    align-items: stretch !important;
  }
  
  .resources-panel .resource-card,
  .suggested-resources.compact .resource-card {
    min-height: 42px !important;
    padding: 10px 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }
  
  .resources-panel .resource-icon,
  .suggested-resources.compact .resource-icon {
    min-width: 28px !important;
    width: 28px !important;
    height: 28px !important;
    margin-right: 10px !important;
    font-size: 12px !important;
  }
  
  .resources-panel .resource-title {
    font-size: 0.85rem;
  }
  
  .resources-panel .resource-description {
    font-size: 0.7rem;
  }
}

/* Dark mode adjustments */
[data-theme="dark"] .suggested-resources,
[data-theme="dark"] .suggested-resources.compact {
  background: linear-gradient(135deg, rgba(108, 142, 255, 0.05) 0%, rgba(108, 142, 255, 0.08) 100%);
  border-color: rgba(108, 142, 255, 0.15);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .suggested-resources:hover {
  box-shadow: 0 4px 12px rgba(108, 142, 255, 0.15);
  border-color: rgba(108, 142, 255, 0.2);
}

[data-theme="dark"] .resource-card {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.03) 0%, rgba(255, 255, 255, 0.05) 100%);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .resource-card:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.08) 100%);
  box-shadow: 0 4px 12px rgba(108, 142, 255, 0.2);
  border-color: rgba(108, 142, 255, 0.3);
  margin-left: 4px;
  margin-right: -4px;
}

[data-theme="dark"] .resource-icon {
  background: linear-gradient(135deg, rgba(108, 142, 255, 0.15) 0%, rgba(108, 142, 255, 0.2) 100%);
}

[data-theme="dark"] .resource-card:hover .resource-icon {
  background: linear-gradient(135deg, var(--primary-color) 0%, #7a94e8 100%);
}

[data-theme="dark"] .resources-title::after {
  background: linear-gradient(90deg, var(--primary-color) 0%, transparent 100%);
}

/* Follow-up suggestions */
.follow-up-container {
  margin-top: 12px;
  padding: 0 16px; /* Align with content padding */
  /* background-color: transparent; */
  /* border: none; */
  /* border-radius: 0; */
}

.follow-up-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--primary-color);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.follow-up-button {
  display: inline-block;
  padding: 6px 12px; /* Reduce padding */
  margin: 3px 4px 3px 0; /* Reduce margin */
  background-color: var(--background-color);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  font-size: 0.8rem; /* Reduce font size */
  color: var(--text-color);
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.follow-up-button:hover {
  background-color: var(--surface-hover);
  border-color: var(--primary-color);
  color: var(--primary-color);
  transform: translateY(-1px);
}

/* Fix for scrolling on iOS */
@supports (-webkit-touch-callout: none) {
  #chat-window {
    -webkit-overflow-scrolling: touch;
  }
  
  #chat-messages {
    -webkit-overflow-scrolling: touch;
  }
}

/* Print styles for transcript download */
@media print {
  body * {
    visibility: hidden;
  }
  
  #chat-messages, #chat-messages * {
    visibility: visible;
  }
  
  #chat-messages {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    background: white;
    color: black;
  }
  
  .message-feedback {
    display: none;
  }
}

/* CSS for new message badge */
.new-message-badge {
  position: absolute;
  top: -8px;
  right: -8px;
  background-color: #ff4757;
  color: white;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: bold;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: scale(0);
  transition: opacity 0.3s, transform 0.3s;
  z-index: 10000;
}

.new-message-badge.show {
  opacity: 1;
  transform: scale(1);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.1); }
  100% { transform: scale(1); }
}

/* Animation for fade in */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Related resources section */
#related-resources {
  margin-top: 5px;
  margin-bottom: 10px;
  width: 100%;
  max-width: 100%;
}

#related-resources .resources-title {
  margin-left: 2px;
  font-size: 0.7rem;
}

#related-resources .resources-list {
  gap: 3px;
  margin-top: 2px;
}

#related-resources .resource-card {
  background-color: rgba(255, 255, 255, 0.8);
}

#related-resources .resource-title {
  font-size: 0.6rem;
}

/* Link styling in chat bubbles */
.message.bot .bubble a {
  color: var(--primary-color, #0066cc);
  text-decoration: none;
  font-weight: 500;
  border-bottom: 1px solid var(--primary-color-light, rgba(0, 102, 204, 0.3));
  transition: all 0.2s ease;
}

.message.bot .bubble a:hover {
  color: var(--primary-dark, #004499);
  text-decoration: none;
  border-bottom: 1px solid var(--primary-color, #0066cc);
}

/* Documentation URL styling */
.docs-link {
  display: inline-flex;
  align-items: center;
  margin: 8px 0;
  padding: 10px 15px;
  background-color: rgba(71, 97, 225, 0.1);
  border-radius: 8px;
  font-size: 0.95em;
  color: var(--primary-color);
  font-weight: 500;
  text-decoration: none;
  transition: all 0.2s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
  max-width: 95%;
  word-break: break-word;
}

.docs-link:hover {
  background-color: rgba(71, 97, 225, 0.15);
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transform: translateY(-1px);
}

.docs-link i {
  margin-left: 6px;
  font-size: 0.85em;
}

/* Enhanced styling for documentation-link container */
.documentation-link {
  margin: 10px 0;
  display: inline-block;
  width: 100%;
}

/* Make code samples look better */
.message.bot .bubble code {
  background-color: #f5f5f5;
  padding: 3px 6px;
  border-radius: 4px;
  font-family: monospace;
  font-size: 0.9em;
  color: var(--primary-color);
}

/* Video container for responsive embeds */
.video-container {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
  max-width: 100%;
  border-radius: 8px; /* Optional: if you want rounded corners for the container */
  margin: 10px 0; /* Optional: for spacing */
  box-shadow: 0 4px 8px rgba(0,0,0,0.1); /* Optional: for a slight shadow */
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none; /* Remove iframe border */
}

/* Emoji styling */
.emoji {
  font-size: 1.2em;
  margin-right: 0.15em;
  display: inline-block;
  vertical-align: middle;
}

/* Soporte para iframe embebido */
body.in-iframe {
  background: transparent !important;
  margin: 0 !important;
  padding: 0 !important;
  overflow: hidden !important;
}

/* Ensure resources alignment in iframe mode */
body.in-iframe .suggested-resources {
  width: 100% !important;
  padding: 0 !important;
  box-sizing: border-box !important;
}

body.in-iframe .suggested-resources .resources-panel {
  width: 100% !important;
  box-sizing: border-box !important;
}

body.in-iframe .resource-card {
  width: 100% !important;
  box-sizing: border-box !important;
}

body.embed-button-only #chat-window {
  display: none;
}

body.embed-button-only #chat-button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  margin: 0;
  box-shadow: none;
  width: 56px;
  height: 56px;
}

body.in-iframe #chat-window.open {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  border-radius: 0;
  transform: none;
  animation: none;
}

/* Fix para el historial de conversaciones (validación de formato) */
#conversation-list .conversation-item {
  cursor: pointer;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Follow-up suggestions styles - Improved compact design */
.follow-up-suggestions, .follow-up-container {
  margin-top: 12px;
  margin-bottom: 16px;
  padding: 0;
  width: 100%;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s, transform 0.3s;
  box-sizing: border-box;
  position: relative;
  z-index: 2;
  display: block;
  clear: both;
}

/* Position follow-up suggestions based on message type */
.message.bot + .follow-up-suggestions, .message.bot .follow-up-container {
  margin-left: 0;
  text-align: left;
  animation: fadeIn 0.5s forwards;
  animation-delay: 0.3s;
}

/* Animation for follow-up buttons to appear after message */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Follow up title styling - more compact */
.follow-up-title {
  font-size: 0.75rem;
  color: var(--text-secondary, #666);
  margin-bottom: 6px;
  font-weight: 500;
  display: flex;
  align-items: center;
  opacity: 0.8;
}

.follow-up-title i {
  margin-right: 6px;
  font-size: 0.7rem;
  color: var(--primary-color, #4761E1);
}

/* Follow up button styling - more compact and elegant */
.follow-up-button {
  background-color: var(--background-color, #ffffff);
  border: 1px solid var(--border-color, #e0e0e0);
  color: var(--text-color, #333);
  border-radius: 16px;
  padding: 4px 12px;
  margin: 0 6px 6px 0;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 400;
  line-height: 1.3;
  min-height: 24px;
  max-width: 200px;
}

.follow-up-button:hover {
  background-color: rgba(0, 123, 255, 0.06);
  border-color: rgba(0, 123, 255, 0.2);
  transform: translateY(-1px);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08);
  color: var(--primary-color, #4761E1);
}

.follow-up-button:active {
  background-color: rgba(0, 123, 255, 0.1);
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Make follow-up containers visible if inside bot message */
.message.bot .follow-up-container {
  opacity: 1;
  transform: translateY(0);
}

/* Responsive adjustments for follow-up buttons */
@media (max-width: 480px) {
  .follow-up-button {
    font-size: 0.7rem;
    padding: 3px 10px;
    margin: 0 4px 4px 0;
    max-width: 180px;
    border-radius: 14px;
    min-height: 22px;
  }
  
  .follow-up-title {
    font-size: 0.7rem;
    margin-bottom: 4px;
  }
  
  .follow-up-suggestions, .follow-up-container {
    margin-top: 8px;
    margin-bottom: 12px;
  }
}

/* Improved follow-up button styling - more attractive design */
.follow-up-button {
  background-color: var(--surface-color, #f8f9ff);
  border: 1px solid transparent;
  color: var(--text-color, #333);
  border-radius: 16px;
  padding: 6px 12px;
  margin: 0 6px 6px 0;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
  white-space: normal; /* allow wrapping so full text is visible */
  display: inline-block;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  font-weight: 500;
  line-height: 1.3;
  min-height: 26px;
  max-width: 260px;
  position: relative;
  overflow: hidden;
}

.follow-up-button::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
  opacity: 0;
  transition: opacity 0.2s ease;
  border-radius: 20px;
}

.follow-up-button:hover {
  background-color: var(--primary-color);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(71, 97, 225, 0.25);
  border-color: var(--primary-color);
}

.follow-up-button:hover::before {
  opacity: 0.1;
}

.follow-up-button:active {
  transform: translateY(0);
  box-shadow: 0 2px 4px rgba(71, 97, 225, 0.2);
}

/* Follow-up container improvements */
.follow-up-container {
  margin-top: 10px;
  padding: 8px 12px;
  background-color: rgba(71, 97, 225, 0.03);
  border-radius: 12px;
  border: 1px solid rgba(71, 97, 225, 0.1);
}

/* Follow up title styling - more elegant */
.follow-up-title {
  font-size: 0.8rem;
  color: var(--primary-color, #4761E1);
  margin-bottom: 6px;
  font-weight: 600;
  display: inline-flex; /* inline so it takes less height */
  align-items: center;
  opacity: 0.9;
}

.follow-up-title i {
  margin-right: 8px;
  font-size: 1rem;
  color: var(--primary-color, #4761E1);
  opacity: 0.8;
}