/* ===================================
   Chatbot Widget Styles
   =================================== */

/* Widget Container */
.chatbot-widget {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* Prevent body scroll when chatbot is open on mobile */
@media (max-width: 768px) {
  body.chatbot-open {
    overflow: hidden !important;
    position: fixed !important;
    width: 100% !important;
    height: 100% !important;
  }
}

/* Toggle Button */
.chatbot-toggle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgb(var(--brass)) 0%, rgb(var(--brass-soft)) 100%);
  /* Clean brass disc — no white ring; soft depth + subtle brass glow */
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 6px 24px rgba(0, 0, 0, 0.45),              /* soft depth on dark */
    0 0 22px rgb(var(--brass) / 0.35);           /* subtle brass glow */
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  touch-action: manipulation; /* Better touch response on mobile */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.chatbot-toggle:hover {
  transform: scale(1.1);
  /* Enhanced brass glow on hover (no white ring) */
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.5),
    0 0 30px rgb(var(--brass) / 0.6);
}

.chatbot-toggle:active {
  transform: scale(0.95);
}

.chatbot-toggle .close-icon {
  display: none;
}

.chatbot-toggle.active .chat-icon {
  display: none;
}

.chatbot-toggle.active .close-icon {
  display: block;
}

/* Chat Window */
.chatbot-window {
  position: fixed;
  bottom: 90px;
  right: 20px;
  width: 380px;
  height: 600px;
  max-height: calc(100vh - 120px);
  background: rgb(var(--ink-secondary));
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.95);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chatbot-window.active {
  opacity: 1;
  transform: translateY(0) scale(1);
}

/* Fullscreen mode */
.chatbot-window.fullscreen {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  max-height: 100vh;
  border-radius: 0;
  z-index: 10000;
}

/* Header */
.chatbot-header {
  background: linear-gradient(135deg, rgb(var(--brass)) 0%, rgb(var(--brass-soft)) 100%);
  color: rgb(var(--ink));
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  min-height: 56px; /* Ensure minimum touch target */
}

.chatbot-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.3);
  flex-shrink: 0;
}

.chatbot-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.chatbot-info {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0; /* Allow text truncation */
  overflow: hidden;
}

.chatbot-name {
  font-size: 15px;
  font-weight: 600;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 1;
}

.chatbot-status {
  font-size: 12px;
  margin: 0;
  opacity: 0.9;
  display: flex;
  align-items: center;
  gap: 5px;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: #10b981;
  animation: pulse 2s infinite;
  flex-shrink: 0;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.chatbot-fullscreen,
.chatbot-minimize {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: rgb(var(--ink));
  width: 28px;
  height: 28px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  position: relative;
  flex-shrink: 0;
  touch-action: manipulation; /* Better touch response on mobile */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.chatbot-fullscreen svg,
.chatbot-minimize svg {
  width: 16px;
  height: 16px;
}

.chatbot-fullscreen:hover,
.chatbot-minimize:hover {
  background: rgba(255, 255, 255, 0.3);
}

/* Fullscreen toggle icons */
.chatbot-fullscreen .compress-icon {
  display: none;
}

.chatbot-fullscreen.fullscreen .expand-icon {
  display: none;
}

.chatbot-fullscreen.fullscreen .compress-icon {
  display: block;
}

/* Messages Area */
.chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: rgb(var(--ink));
}

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

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

.chatbot-messages::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 3px;
}

.chatbot-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, 0.35);
}

/* Message */
.message {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  animation: messageIn 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.user-message {
  flex-direction: row-reverse;
}

.message-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
}

.message-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.message-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 75%;
}

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

.message-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.5;
  word-wrap: break-word;
}

.bot-message .message-bubble {
  background: rgba(255, 255, 255, 0.06);
  color: #E5E7EB;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom-left-radius: 4px;
}

.user-message .message-bubble {
  background: linear-gradient(135deg, rgb(var(--brass)) 0%, rgb(var(--brass-soft)) 100%);
  color: rgb(var(--ink));
  border-bottom-right-radius: 4px;
}

.error-message .message-bubble {
  background: #fef2f2;
  color: #dc2626;
  border: 1px solid #fecaca;
}

.rate-limit-message .message-bubble {
  background: #fef3c7;
  color: #d97706;
  border: 1px solid #fde68a;
  font-weight: 500;
}

.validation-message .message-bubble {
  background: #dbeafe;
  color: #1d4ed8;
  border: 1px solid #93c5fd;
  font-weight: 500;
}

.duplicate-message .message-bubble {
  background: #ccfbf1;
  color: #0f766e;
  border: 1px solid #5eead4;
  font-weight: 500;
}

/* Typing Indicator */
.chatbot-typing {
  padding: 0 20px;
  margin-top: -12px;
  background: rgb(var(--ink));
}

.typing-indicator {
  display: flex;
  gap: 4px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  border-bottom-left-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  width: fit-content;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  animation: typing 1.4s infinite;
}

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

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

@keyframes typing {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-10px);
    opacity: 1;
  }
}

/* Input Area */
.chatbot-input-wrapper {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  background: rgb(var(--ink-secondary));
  flex-shrink: 0;
}

.chatbot-input {
  display: flex;
  gap: 8px;
  padding: 16px;
  align-items: flex-end;
}

#chatbot-input-field {
  flex: 1;
  padding: 12px 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.05);
  color: #F3F4F6;
  border-radius: 20px;
  font-size: 14px;
  outline: none;
  transition: border-color 0.2s;
  font-family: inherit;
  resize: none;
  min-height: 44px;
  max-height: 120px;
  overflow-y: auto;
  line-height: 1.5;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* IE and Edge */
}

#chatbot-input-field:focus {
  border-color: rgb(var(--brass));
}

#chatbot-input-field::placeholder {
  color: rgb(var(--muted));
  font-size: 14px; /* Match input field font size */
  opacity: 1; /* Full opacity by default */
}

/* Webkit browsers (Chrome, Safari, Edge) */
#chatbot-input-field::-webkit-input-placeholder {
  color: rgb(var(--muted));
  font-size: 14px;
  opacity: 1;
}

/* Firefox */
#chatbot-input-field::-moz-placeholder {
  color: rgb(var(--muted));
  font-size: 14px;
  opacity: 1;
}

/* IE/Edge */
#chatbot-input-field:-ms-input-placeholder {
  color: rgb(var(--muted));
  font-size: 14px;
}

/* Hide scrollbar for Chrome, Safari and Opera */
#chatbot-input-field::-webkit-scrollbar {
  display: none;
}

.chatbot-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgb(var(--brass)) 0%, rgb(var(--brass-soft)) 100%);
  border: none;
  color: white;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
  flex-shrink: 0;
  touch-action: manipulation; /* Better touch response on mobile */
  -webkit-tap-highlight-color: transparent; /* Remove tap highlight on mobile */
}

.chatbot-send-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 2px 8px rgb(var(--brass) / 0.4);
}

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

.chatbot-send-btn:disabled {
  opacity: 0.6 !important;
  cursor: not-allowed !important;
  pointer-events: none;
}

.chatbot-send-btn:disabled:hover {
  transform: none;
  box-shadow: none;
}

.chatbot-footer {
  padding: 8px 16px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: rgb(var(--muted));
}

.chatbot-footer a {
  color: rgb(var(--brass));
  text-decoration: none;
}

.chatbot-footer a:hover {
  text-decoration: underline;
}

.character-counter {
  font-size: 11px;
  color: rgb(var(--muted));
  font-weight: 500;
  transition: color 0.2s;
}

.character-counter #char-count {
  font-weight: 600;
}

/* Responsive Design */
@media (max-width: 768px) {
  .chatbot-widget {
    bottom: 0;
    right: 0;
    left: 0;
  }

  /* Larger toggle button for better touch target on mobile */
  .chatbot-toggle {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 64px;
    height: 64px;
    /* Ensure button is above safe area on notched devices */
    bottom: max(20px, env(safe-area-inset-bottom, 20px));
    right: max(20px, env(safe-area-inset-right, 20px));
    /* Clean brass disc on mobile too — no white ring */
    border: none;
    box-shadow:
      0 6px 24px rgba(0, 0, 0, 0.45),
      0 0 22px rgb(var(--brass) / 0.4);
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
  }

  .chatbot-toggle svg {
    width: 28px;
    height: 28px;
  }

  .chatbot-window {
    width: 100vw !important; /* Ensure full viewport width */
    height: 100vh !important;
    height: 100dvh !important; /* Dynamic viewport height - accounts for mobile browser bars */
    max-height: 100vh !important;
    max-height: 100dvh !important;
    top: 0 !important;
    bottom: 0 !important;
    right: 0 !important;
    left: 0 !important;
    border-radius: 0 !important;
    margin: 0 !important;
    /* Safe area insets for notched devices (iPhone X+) */
    padding-top: env(safe-area-inset-top, 0);
    padding-bottom: env(safe-area-inset-bottom, 0);
    padding-left: env(safe-area-inset-left, 0);
    padding-right: env(safe-area-inset-right, 0);
    /* Ensure proper layout when keyboard opens */
    display: flex;
    flex-direction: column;
    position: fixed !important;
    z-index: 10000 !important;
    /* Smooth transitions when keyboard opens/closes */
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    /* Prevent dragging/scrolling the page behind, but allow scrolling within messages */
    overflow: hidden;
  }

  /* Adjust messages area to be flexible and scrollable */
  .chatbot-messages {
    flex: 1 1 auto;
    min-height: 0; /* Important for flex scrolling */
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    /* Ensure messages remain visible and scrollable when keyboard opens */
    overscroll-behavior: contain;
    padding: 16px 12px;
    gap: 12px;
    /* Prevent page scroll when scrolling messages */
    touch-action: pan-y;
  }

  /* Keep input area fixed at bottom */
  .chatbot-input-wrapper {
    flex-shrink: 0;
    position: relative;
    /* Ensure input stays visible above keyboard */
    background: rgb(var(--ink-secondary));
    z-index: 1;
    /* Add padding for safe area on notched devices */
    padding-bottom: env(safe-area-inset-bottom, 0);
  }

  /* Ensure header stays visible when keyboard opens */
  .chatbot-header {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    /* Keep header at top */
    top: 0;
    /* Add padding for safe area on notched devices (extra top room for swipe indicator) */
    padding-top: max(20px, calc(env(safe-area-inset-top, 0px) + 12px));
    padding-bottom: 10px;
    padding-left: max(16px, env(safe-area-inset-left, 16px));
    padding-right: max(16px, env(safe-area-inset-right, 16px));
    touch-action: pan-y;
    min-height: 56px; /* Minimum touch target size */
    /* Prevent header from moving when keyboard opens */
    will-change: auto;
    transform: translateZ(0); /* Force GPU acceleration for stability */
  }

  .chatbot-window.active {
    transform: translateY(0) scale(1);
  }

  /* Visual indicator for swipe-to-close */
  .chatbot-header::after {
    content: '';
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
  }

  /* Make header more compact on mobile */
  .chatbot-avatar {
    width: 32px;
    height: 32px;
  }

  .chatbot-name {
    font-size: 14px;
  }

  .chatbot-status {
    font-size: 11px;
  }

  .status-dot {
    width: 6px;
    height: 6px;
  }

  .chatbot-fullscreen,
  .chatbot-minimize {
    width: 36px; /* Larger touch target */
    height: 36px;
    min-width: 36px; /* Ensure minimum size */
    min-height: 36px;
  }

  .chatbot-fullscreen svg,
  .chatbot-minimize svg {
    width: 18px;
    height: 18px;
  }

  /* Hide fullscreen button on mobile - not needed since chat is already full screen */
  .chatbot-fullscreen {
    display: none;
  }

  /* Input area adjustments for mobile */
  .chatbot-input {
    padding: 12px;
    gap: 8px;
  }

  #chatbot-input-field {
    font-size: 16px; /* Prevent zoom on iOS when focusing */
    padding: 12px 14px;
    min-height: 48px; /* Larger touch target */
    appearance: none; /* Remove iOS default styling */
    -webkit-appearance: none; /* Remove iOS default styling */
    border-radius: 24px; /* More rounded on mobile */
    touch-action: manipulation;
    line-height: 1.5; /* Consistent line height */
  }

  /* Ensure placeholder matches widget font size on mobile */
  /* Match message bubble font size (15px) for consistency */
  #chatbot-input-field::placeholder {
    font-size: 15px !important; /* Match message bubble font size */
    opacity: 0.7 !important;
    line-height: 1.5 !important;
  }

  /* Webkit browsers (Chrome, Safari, Edge) - Mobile */
  #chatbot-input-field::-webkit-input-placeholder {
    font-size: 15px !important;
    opacity: 0.7 !important;
    line-height: 1.5 !important;
  }

  /* Firefox - Mobile */
  #chatbot-input-field::-moz-placeholder {
    font-size: 15px !important;
    opacity: 0.7 !important;
    line-height: 1.5 !important;
  }

  /* IE/Edge - Mobile */
  #chatbot-input-field:-ms-input-placeholder {
    font-size: 15px !important;
  }

  .chatbot-send-btn {
    width: 48px; /* Larger touch target */
    height: 48px;
    min-width: 48px;
    min-height: 48px;
  }

  .chatbot-send-btn svg {
    width: 22px;
    height: 22px;
  }

  /* Message adjustments for mobile */
  .message {
    gap: 8px;
  }

  .message-avatar {
    width: 28px;
    height: 28px;
  }

  .message-content {
    max-width: 80%; /* Better width on mobile */
  }

  .message-bubble {
    padding: 12px 16px; /* Better padding for touch */
    font-size: 15px; /* Slightly larger for readability */
    line-height: 1.6; /* Better line spacing for mobile */
    word-wrap: break-word;
    overflow-wrap: break-word;
    hyphens: auto;
  }

  /* Footer adjustments */
  .chatbot-footer {
    padding: 8px 12px;
    font-size: 11px;
    flex-wrap: wrap;
    gap: 4px;
  }

  .character-counter {
    font-size: 11px;
  }
}

@media (max-width: 480px) {
  /* Extra small devices */
  .chatbot-toggle {
    width: 56px;
    height: 56px;
    bottom: 16px;
    right: 16px;
  }

  .chatbot-toggle svg {
    width: 24px;
    height: 24px;
  }

  .chatbot-messages {
    padding: 12px 10px;
    gap: 10px;
  }

  .message-bubble {
    font-size: 14px;
    padding: 9px 12px;
  }

  .message-content {
    max-width: 85%;
  }

  .message-avatar {
    width: 26px;
    height: 26px;
  }

  .chatbot-header {
    padding: max(16px, calc(env(safe-area-inset-top, 0px) + 10px)) 12px 8px;
    min-height: 52px;
  }

  .chatbot-avatar {
    width: 30px;
    height: 30px;
  }

  .chatbot-name {
    font-size: 13px;
  }

  .chatbot-status {
    font-size: 10px;
  }

  .chatbot-minimize {
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
  }

  .chatbot-minimize svg {
    width: 16px;
    height: 16px;
  }

  .chatbot-input {
    padding: 10px;
  }

  #chatbot-input-field {
    padding: 10px 12px;
    font-size: 16px; /* Keep at 16px to prevent iOS zoom */
  }

  /* Ensure placeholder matches widget font size on extra small mobile */
  #chatbot-input-field::placeholder {
    font-size: 15px !important; /* Match message bubble font size */
  }

  #chatbot-input-field::-webkit-input-placeholder {
    font-size: 15px !important;
  }

  #chatbot-input-field::-moz-placeholder {
    font-size: 15px !important;
  }

  #chatbot-input-field:-ms-input-placeholder {
    font-size: 15px !important;
  }

  .chatbot-send-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }

  .chatbot-send-btn svg {
    width: 20px;
    height: 20px;
  }

  .chatbot-footer {
    padding: 6px 10px;
    font-size: 10px;
    line-height: 1.4;
  }

  .chatbot-footer small {
    font-size: 10px;
  }

  .character-counter {
    font-size: 10px;
  }
}

/* Landscape orientation adjustments */
@media (max-width: 768px) and (orientation: landscape) {
  .chatbot-window {
    height: 100vh;
    height: 100dvh;
  }

  .chatbot-header {
    padding-top: max(8px, calc(env(safe-area-inset-top, 0px) + 8px));
    padding-bottom: 8px;
    min-height: 48px;
  }

  .chatbot-header::after {
    top: 6px;
    width: 35px;
    height: 3px;
  }

  .chatbot-messages {
    padding: 12px;
  }

  .chatbot-input {
    padding: 10px 12px;
  }
}

/* Very small devices (iPhone SE, etc.) */
@media (max-width: 375px) {
  .chatbot-toggle {
    width: 56px;
    height: 56px;
    bottom: 12px;
    right: 12px;
  }

  .chatbot-messages {
    padding: 10px 8px;
  }

  .message-bubble {
    font-size: 13px;
    padding: 8px 11px;
  }

  .chatbot-footer {
    font-size: 9px;
  }

  .chatbot-footer small {
    font-size: 9px;
  }
}

/* Markdown Styling */
.message-bubble p {
  margin: 0 0 0.75em 0;
}

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

.message-bubble h1,
.message-bubble h2,
.message-bubble h3,
.message-bubble h4,
.message-bubble h5,
.message-bubble h6 {
  margin: 0.5em 0;
  font-weight: 600;
  line-height: 1.3;
}

.message-bubble h1 { font-size: 1.5em; }
.message-bubble h2 { font-size: 1.3em; }
.message-bubble h3 { font-size: 1.1em; }
.message-bubble h4 { font-size: 1em; }

.message-bubble strong {
  font-weight: 600;
}

.message-bubble em {
  font-style: italic;
}

.message-bubble code {
  background: rgba(0, 0, 0, 0.05);
  padding: 2px 6px;
  border-radius: 3px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 0.9em;
}

.bot-message .message-bubble code {
  background: rgba(255, 255, 255, 0.1);
}

.message-bubble pre {
  background: rgba(0, 0, 0, 0.05);
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 0.75em 0;
}

.bot-message .message-bubble pre {
  background: rgba(255, 255, 255, 0.1);
}

.message-bubble pre code {
  background: none;
  padding: 0;
  font-size: 0.85em;
}

.message-bubble ul,
.message-bubble ol {
  margin: 0.5em 0;
  padding-left: 1.5em;
}

.message-bubble li {
  margin: 0.25em 0;
}

.message-bubble blockquote {
  margin: 0.75em 0;
  padding-left: 1em;
  border-left: 3px solid rgba(0, 0, 0, 0.2);
  color: rgba(0, 0, 0, 0.7);
}

.bot-message .message-bubble blockquote {
  border-left-color: rgba(255, 255, 255, 0.3);
  color: rgba(255, 255, 255, 0.9);
}

.message-bubble a {
  color: rgb(var(--brass));
  text-decoration: underline;
}

.message-bubble a:hover {
  color: #9A7B4A;
}

.message-bubble hr {
  border: none;
  border-top: 1px solid rgba(0, 0, 0, 0.1);
  margin: 1em 0;
}

.bot-message .message-bubble hr {
  border-top-color: rgba(255, 255, 255, 0.2);
}

.message-bubble table {
  border-collapse: collapse;
  width: 100%;
  margin: 0.75em 0;
  font-size: 0.9em;
}

.message-bubble th,
.message-bubble td {
  border: 1px solid rgba(0, 0, 0, 0.1);
  padding: 6px 10px;
  text-align: left;
}

.bot-message .message-bubble th,
.bot-message .message-bubble td {
  border-color: rgba(255, 255, 255, 0.2);
}

.message-bubble th {
  background: rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.bot-message .message-bubble th {
  background: rgba(255, 255, 255, 0.1);
}
