/* AI Chat Interface Styles */
/* Designed to match the notepad aesthetic of Felix's landing page */

/* ==========================================
   Main Content Push Effect & Blur
   ========================================== */

#main-content {
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
              opacity 0.4s ease,
              filter 0.3s ease;
}

body.chat-open #main-content {
  transform: translateX(-250px) scale(0.95);
  opacity: 0.6;
}

/* Removed blur effect - background stays clear when floating input is focused */
body.input-focused #main-content {
  /* filter: blur(8px); */
  /* opacity: 0.7; */
}

/* ==========================================
   Floating Chat Input
   ========================================== */

.chat-button {
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: 3px solid transparent;
  border-radius: 50px;
  padding: 0;
  width: 280px; /* Smaller initial width */
  max-width: calc(100vw - 40px);
  z-index: 999;
  transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

/* Expand on focus */
.chat-button.focused {
  width: 500px;
}

/* Hide when chat is open */
body.chat-open .chat-button {
  opacity: 0;
  pointer-events: none;
  transform: translateX(-50%) translateY(20px);
}

/* Gradient border animation - thicker and broader glow */
.chat-button::before {
  content: '';
  position: absolute;
  inset: -4px; /* Thicker border */
  border-radius: 50px;
  padding: 4px; /* Broader glow */
  background: linear-gradient(
    90deg,
    #C686FF,
    #F5B9EA,
    #FFBA71,
    #AA6EEE,
    #FF6778,
    #BC82F3,
    #8D99FF,
    #C686FF
  );
  background-size: 200% 200%;
  -webkit-mask:
    linear-gradient(#fff 0 0) content-box,
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  animation: gradientFlow 3s linear infinite;
  z-index: -1;
  filter: blur(2px); /* Add blur for softer glow */
}

/* Enhanced glow on focus */
.chat-button.focused::before {
  inset: -6px;
  padding: 6px;
  filter: blur(4px);
}

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

/* Input wrapper */
.floating-input-wrapper {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 20px;
  position: relative;
}

.floating-chat-input {
  flex: 1;
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 16px;
  color: var(--text-color);
  outline: none;
  resize: none;
  overflow: hidden;
}

.floating-chat-input::placeholder {
  color: #999;
}

.floating-submit-btn {
  background: #000;
  border: none;
  color: #fff;
  font-size: 18px;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  padding: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  flex-shrink: 0;
}

.floating-chat-input:not(:placeholder-shown) ~ .floating-submit-btn {
  opacity: 1;
  pointer-events: all;
}

.floating-submit-btn:hover {
  transform: scale(1.05);
  background: #1a1a1a;
}

.floating-submit-btn:active {
  transform: scale(0.95);
}

/* Dark mode adjustments */
[data-theme="dark"] .chat-button {
  background: rgba(10, 10, 10, 0.95);
}

[data-theme="dark"] .floating-chat-input {
  color: var(--text-color);
}

[data-theme="dark"] .floating-chat-input::placeholder {
  color: #666;
}

/* ==========================================
   Chat Interface Container
   ========================================== */

.chat-container {
  position: fixed;
  top: 0;
  right: 0;
  transform: translateX(100%);
  width: 90%;
  max-width: 500px;
  height: 100vh;
  background: #ffffff;
  border: none;
  border-left: 1px solid #e0e0e0;
  border-radius: 0;
  box-shadow: -10px 0 50px rgba(0, 0, 0, 0.15);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.4s ease;
  z-index: 1000;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
}

.chat-container.open {
  transform: translateX(0);
  opacity: 1;
}

/* ==========================================
   Chat Header
   ========================================== */

.chat-header {
  background: #ffffff;
  color: #000000;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid #e0e0e0;
  gap: 16px;
}

.chat-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chat-header-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.chat-title {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: #000000;
}

.chat-subtitle {
  font-size: 13px;
  opacity: 0.6;
  margin: 0;
  color: #000000;
}

.chat-mode-toggle {
  display: flex;
  gap: 4px;
  background: #f0f0f0;
  padding: 4px;
  border-radius: 25px;
  border: 1px solid #e0e0e0;
}

.mode-btn {
  background: transparent;
  border: none;
  color: #666666;
  padding: 8px 20px;
  border-radius: 20px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
  font-weight: 500;
}

.mode-btn.active {
  background: #ffffff;
  color: #000000;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.mode-btn:hover:not(.active) {
  color: #000000;
}

.close-chat {
  background: transparent;
  border: none;
  color: #666666;
  font-size: 28px;
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.2s ease;
  line-height: 1;
}

.close-chat:hover {
  background: #f0f0f0;
  color: #000000;
}

/* ==========================================
   Chat Messages Area
   ========================================== */

.chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  scroll-behavior: smooth;
  background: #ffffff;
}

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

.chat-messages::-webkit-scrollbar-track {
  background: transparent;
}

.chat-messages::-webkit-scrollbar-thumb {
  background: #d0d0d0;
  border-radius: 3px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
  background: #b0b0b0;
}

.message {
  display: flex;
  flex-direction: column;
  gap: 8px;
  animation: messageSlideIn 0.3s ease;
}

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

.message-sender {
  font-size: 13px;
  font-weight: 500;
  opacity: 0.6;
  color: #666666;
  margin-bottom: 6px;
}

.message-content {
  background: #f5f5f5;
  color: #000000;
  padding: 14px 18px;
  border-radius: 18px;
  font-size: 15px;
  line-height: 1.6;
  max-width: 85%;
  word-wrap: break-word;
}

/* Markdown content styling */
.markdown-content {
  line-height: 1.7;
}

.markdown-content p {
  margin: 0 0 12px 0;
}

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

.markdown-content strong {
  font-weight: 700;
  color: #000000;
}

.markdown-content em {
  font-style: italic;
}

.markdown-content ul,
.markdown-content ol {
  margin: 8px 0;
  padding-left: 20px;
}

.markdown-content li {
  margin: 4px 0;
}

.markdown-content ul {
  list-style-type: disc;
}

.markdown-content ol {
  list-style-type: decimal;
}

.markdown-content code {
  background: rgba(255, 255, 255, 0.1);
  padding: 2px 6px;
  border-radius: 4px;
  font-family: 'Monaco', 'Courier New', monospace;
  font-size: 13px;
}

.markdown-content pre {
  background: rgba(255, 255, 255, 0.1);
  padding: 12px;
  border-radius: 8px;
  overflow-x: auto;
  margin: 8px 0;
}

.markdown-content pre code {
  background: none;
  padding: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3 {
  margin: 12px 0 8px 0;
  font-weight: 700;
}

.markdown-content h1 { font-size: 18px; }
.markdown-content h2 { font-size: 16px; }
.markdown-content h3 { font-size: 15px; }

.markdown-content blockquote {
  border-left: 3px solid #d0d0d0;
  padding-left: 12px;
  margin: 8px 0;
  opacity: 0.9;
}

/* User message - keep simple */
.message.user .markdown-content p,
.message.user .markdown-content ul,
.message.user .markdown-content ol {
  margin: 0;
}

.message.user {
  align-items: flex-end;
}

.message.user .message-content {
  background: #000000;
  color: #ffffff;
  border: none;
}

.message.user .message-sender {
  text-align: right;
  color: #666666;
}

.message.assistant {
  align-items: flex-start;
}

.message.assistant .message-content {
  background: #f5f5f5;
  color: #000000;
}

/* Thinking message */
.thinking-message {
  font-style: italic;
  opacity: 0.8;
  animation: thinkingPulse 1.5s ease-in-out infinite;
}

@keyframes thinkingPulse {
  0%, 100% {
    opacity: 0.6;
  }
  50% {
    opacity: 1;
  }
}

/* Welcome message */
.welcome-message {
  text-align: center;
  padding: 40px 20px;
  opacity: 0.6;
  color: #666666;
}

.welcome-message h3 {
  font-size: 18px;
  margin-bottom: 8px;
  color: #000000;
}

.welcome-message p {
  font-size: 14px;
  line-height: 1.6;
  color: #666666;
}

/* ==========================================
   Chat Input Area
   ========================================== */

.chat-input-container {
  border-top: 1px solid #e0e0e0;
  padding: 16px 20px 20px 20px;
  background: #ffffff;
}

.chat-input-wrapper {
  display: flex;
  gap: 12px;
  align-items: flex-end;
}

.chat-input {
  flex: 1;
  border: 1px solid #d0d0d0;
  border-radius: 24px;
  padding: 12px 18px;
  font-family: inherit;
  font-size: 15px;
  background: #ffffff;
  color: #000000;
  resize: none;
  max-height: 100px;
  min-height: 44px;
  line-height: 1.5;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.chat-input:focus {
  outline: none;
  border-color: #000000;
  box-shadow: 0 0 0 1px #000000;
}

.chat-input::placeholder {
  color: #999999;
  opacity: 1;
}

.send-btn {
  background: #000000;
  color: #ffffff;
  border: none;
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 18px;
  flex-shrink: 0;
}

.send-btn:hover:not(:disabled) {
  transform: scale(1.05);
  background: #1a1a1a;
}

.send-btn:active:not(:disabled) {
  transform: scale(0.95);
}

.send-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  background: #cccccc;
}

/* Voice mode styles */
.voice-mode {
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px;
  gap: 20px;
}

.voice-mode.active {
  display: flex;
}

.voice-button {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  background: var(--text-color);
  color: var(--bg-color);
  border: none;
  font-size: 40px;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.voice-button:hover {
  transform: scale(1.1);
}

.voice-button.recording {
  animation: recordingPulse 1.5s infinite;
  background: #ff4444;
}

.voice-button.processing {
  animation: processingRotate 2s linear infinite;
  background: #ffa500;
}

.voice-button.playing {
  animation: playingPulse 1s ease-in-out infinite;
  background: #4CAF50;
}

@keyframes recordingPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 68, 68, 0.7);
  }
  50% {
    box-shadow: 0 0 0 20px rgba(255, 68, 68, 0);
  }
}

@keyframes processingRotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

@keyframes playingPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(76, 175, 80, 0.7);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 15px rgba(76, 175, 80, 0);
    transform: scale(1.05);
  }
}

.voice-status {
  font-size: 16px;
  opacity: 0.8;
}

/* ==========================================
   Responsive Design
   ========================================== */

@media (max-width: 768px) {
  .chat-container {
    width: 100%;
    max-width: none;
    height: 100vh;
    border-radius: 0;
  }

  .chat-container.open {
    transform: translateX(0);
  }

  /* On mobile, push content fully off-screen instead of scaling */
  body.chat-open #main-content {
    transform: translateX(-100%);
    opacity: 0.3;
  }

  .chat-button {
    bottom: 20px;
    width: calc(100vw - 40px);
  }

  .floating-input-wrapper {
    padding: 12px 16px;
  }

  .floating-chat-input {
    font-size: 16px; /* Prevents zoom on iOS */
  }

  .chat-header {
    padding: 16px;
    flex-wrap: wrap;
  }

  .chat-mode-toggle {
    flex-wrap: wrap;
  }

  .mode-btn {
    padding: 6px 12px;
    font-size: 12px;
  }

  .message-content {
    max-width: 85%;
    font-size: 14px;
    padding: 10px 14px;
  }

  .message-actions {
    flex-direction: row;
    gap: 6px;
  }

  .copy-btn,
  .regenerate-btn {
    font-size: 12px;
    padding: 4px 8px;
  }

  .suggestion-btn {
    padding: 10px 14px;
    font-size: 13px;
  }

  .chat-input {
    font-size: 16px; /* Prevents zoom on iOS */
    padding: 10px 14px;
  }

  .send-btn {
    width: 40px;
    height: 40px;
    font-size: 16px;
  }

  /* Source cards - better touch scrolling on mobile */
  .sources-container {
    -webkit-overflow-scrolling: touch; /* Smooth momentum scrolling on iOS */
    scroll-snap-type: x proximity; /* Snap to cards on scroll */
    padding-bottom: 8px; /* More space for scrollbar */
  }

  .source-card {
    flex: 0 0 260px; /* Slightly smaller cards on mobile */
    scroll-snap-align: start; /* Snap alignment */
  }

  .source-image {
    height: 120px; /* Smaller images on mobile */
  }

  /* Follow-up questions - full width on mobile */
  .follow-up-btn {
    font-size: 14px;
    padding: 10px 14px;
  }

  /* Loading skeletons */
  .follow-up-skeleton {
    height: 40px; /* Slightly taller on mobile for better touch */
  }
}

/* Extra small devices */
@media (max-width: 375px) {
  .chat-button {
    padding: 10px 20px;
    font-size: 13px;
  }

  .chat-title {
    font-size: 16px;
  }

  .chat-subtitle {
    font-size: 11px;
  }

  .message-content {
    font-size: 13px;
  }
}

/* Message actions (copy, regenerate) */
.message-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.message:hover .message-actions {
  opacity: 1;
}

.copy-btn,
.regenerate-btn {
  background: transparent;
  border: 1px solid #d0d0d0;
  color: #666666;
  padding: 6px 10px;
  border-radius: 8px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.copy-btn:hover,
.regenerate-btn:hover {
  background: #f0f0f0;
  border-color: #b0b0b0;
  color: #000000;
}

/* Suggested questions */
.suggested-questions {
  padding: 20px 0;
  text-align: center;
}

.suggestions-title {
  font-size: 13px;
  opacity: 0.7;
  margin-bottom: 12px;
}

.suggestions-buttons {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.suggestion-btn {
  background: #ffffff;
  border: 1px solid #d0d0d0;
  color: #000000;
  padding: 12px 16px;
  border-radius: 12px;
  font-size: 14px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
}

.suggestion-btn:hover {
  background: #f5f5f5;
  border-color: #000000;
  transform: translateX(4px);
}

/* ==========================================
   Link Preview Cards (Sources)
   ========================================== */

/* ==========================================
   Compact Sources Display
   ========================================== */

.message-sources-compact {
  margin-top: 12px;
}

.sources-toggle {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: inherit;
  transition: all 0.2s ease;
}

.sources-toggle:hover .sources-count {
  color: #000000;
}

.sources-favicons {
  display: flex;
  align-items: center;
  gap: -4px;
}

.source-favicon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  object-fit: cover;
  margin-left: -4px;
  transition: transform 0.2s ease;
}

.source-favicon:first-child {
  margin-left: 0;
}

.sources-toggle:hover .source-favicon {
  transform: translateX(2px);
}

.sources-count {
  font-size: 13px;
  color: #666666;
  font-weight: 500;
  transition: color 0.2s ease;
}

/* User message sources - inverted colors */
.message.user .source-favicon {
  border-color: rgba(255, 255, 255, 0.3);
}

.message.user .sources-count {
  color: rgba(255, 255, 255, 0.8);
}

.message.user .sources-toggle:hover .sources-count {
  color: #ffffff;
}

/* ==========================================
   Sources Side Panel
   ========================================== */

.sources-side-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: 100%;
  height: 100vh;
  background: rgba(0, 0, 0, 0.4);
  z-index: 10001;
  display: flex;
  justify-content: flex-end;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.sources-side-panel.active {
  opacity: 1;
}

.sources-side-panel.active .sources-panel-wrapper {
  transform: translateX(0);
}

.sources-panel-wrapper {
  width: 400px;
  height: 100vh;
  background: #ffffff;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.15);
}

.sources-panel-header {
  position: sticky;
  top: 0;
  background: #ffffff;
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  z-index: 2;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.sources-panel-title {
  font-size: 18px;
  font-weight: 600;
  color: #000000;
  margin: 0;
}

.sources-panel-close {
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: #666666;
  transition: all 0.2s ease;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.sources-panel-close:hover {
  background: #f5f5f5;
  color: #000000;
}

.sources-panel-content {
  flex: 1;
  overflow-y: auto;
  background: #ffffff;
}

.source-panel-item {
  display: flex;
  gap: 12px;
  padding: 16px 24px;
  border-bottom: 1px solid #f0f0f0;
  text-decoration: none;
  color: inherit;
  transition: background 0.2s ease;
  cursor: pointer;
}

.source-panel-item:hover {
  background: #f8f8f8;
}

.source-panel-favicon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border-radius: 8px;
  overflow: hidden;
}

.source-panel-favicon img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.source-panel-details {
  flex: 1;
  min-width: 0;
}

.source-panel-item-title {
  font-size: 14px;
  font-weight: 600;
  color: #000000;
  margin: 0 0 4px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.source-panel-description {
  font-size: 13px;
  color: #666666;
  margin: 0 0 6px 0;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.source-panel-domain {
  font-size: 12px;
  color: #999999;
  display: flex;
  align-items: center;
  gap: 4px;
}

.source-panel-domain::before {
  content: '↗';
  font-size: 12px;
}

/* Mobile responsive */
@media (max-width: 768px) {
  .sources-panel-wrapper {
    width: 100%;
    max-width: 400px;
  }

  .source-favicon {
    width: 18px;
    height: 18px;
  }

  .sources-count {
    font-size: 12px;
  }
}

/* Dark mode support */
[data-theme="dark"] .sources-panel-header,
[data-theme="dark"] .sources-panel-content {
  background: #1a1a1a;
  border-color: #2a2a2a;
}

[data-theme="dark"] .sources-panel-title {
  color: #e0e0e0;
}

[data-theme="dark"] .sources-panel-close {
  color: #999999;
}

[data-theme="dark"] .sources-panel-close:hover {
  background: #2a2a2a;
  color: #e0e0e0;
}

[data-theme="dark"] .source-panel-item {
  border-color: #2a2a2a;
}

[data-theme="dark"] .source-panel-item:hover {
  background: #252525;
}

[data-theme="dark"] .source-panel-favicon {
  background: #2a2a2a;
}

[data-theme="dark"] .source-panel-title {
  color: #e0e0e0;
}

[data-theme="dark"] .source-panel-description {
  color: #999999;
}

[data-theme="dark"] .source-panel-domain {
  color: #666666;
}

/* ==========================================
   Follow-up Questions
   ========================================== */

.follow-up-questions {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.follow-up-title {
  font-size: 12px;
  font-weight: 600;
  color: #666666;
  margin-bottom: 4px;
}

.follow-up-btn {
  background: transparent;
  border: 1px solid #e0e0e0;
  color: #666666;
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: left;
  font-family: inherit;
  display: flex;
  align-items: center;
  gap: 6px;
}

.follow-up-btn::before {
  content: '→';
  font-size: 14px;
  transition: transform 0.2s ease;
}

.follow-up-btn:hover {
  background: #f5f5f5;
  border-color: #000000;
  color: #000000;
}

.follow-up-btn:hover::before {
  transform: translateX(2px);
}

/* Loading skeleton for follow-up questions */
.follow-up-loading {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.follow-up-loading-title {
  font-size: 12px;
  font-weight: 600;
  color: #999999;
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.follow-up-skeleton {
  background: linear-gradient(
    90deg,
    #f0f0f0 0%,
    #f5f5f5 50%,
    #f0f0f0 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border: 1px solid #e0e0e0;
  border-radius: 10px;
  height: 36px;
  width: 100%;
}

.follow-up-skeleton:nth-child(2) {
  width: 85%;
}

.follow-up-skeleton:nth-child(3) {
  width: 92%;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

/* Pulsing dots for loading indicator */
.loading-dots {
  display: inline-flex;
  gap: 3px;
}

.loading-dots span {
  width: 4px;
  height: 4px;
  background: #999999;
  border-radius: 50%;
  animation: pulse 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(1) {
  animation-delay: 0s;
}

.loading-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

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

/* Dark mode - keep chatbox light themed */
[data-theme="dark"] .chat-container {
  background: #ffffff;
}

[data-theme="dark"] .chat-header {
  background: #ffffff;
  color: #000000;
  border-bottom: 1px solid #e0e0e0;
}

[data-theme="dark"] .chat-messages {
  background: #ffffff;
}

[data-theme="dark"] .chat-input-container {
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
}

[data-theme="dark"] .chat-input {
  background: #ffffff;
  color: #000000;
  border-color: #d0d0d0;
}

[data-theme="dark"] .chat-input::placeholder {
  color: #999999;
}

[data-theme="dark"] .message-content {
  background: #f5f5f5;
  color: #000000;
}

[data-theme="dark"] .message.user .message-content {
  background: #000000;
  color: #ffffff;
}

[data-theme="dark"] .send-btn {
  background: #000000;
  color: #ffffff;
}
