@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700&display=swap');

/* Minimal CSS to render the widget nicely without Tailwind */
*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Widget polish */
.rw-widget {
  font-family: 'Manrope', 'SF Pro Text', 'Segoe UI', sans-serif;
  color: #111827;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.rw-widget * { font-family: inherit; }
.rw-panel {
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.14);
}
.rw-chat-surface {
  background: linear-gradient(180deg, #fbf8f4 0%, #ffffff 70%);
}
.rw-bubble {
  border-color: rgba(15, 23, 42, 0.08);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

.rw-telemetry {
  border-top: 1px solid rgba(15, 23, 42, 0.06);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(6px);
  font-size: 12px;
}
.rw-telemetry details {
  padding: 10px 16px 12px;
}
.rw-telemetry summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
  color: #111827;
}
.rw-telemetry summary::-webkit-details-marker {
  display: none;
}
.rw-telemetry-refresh {
  font-size: 11px;
  color: #111827;
  background: #f3f4f6;
  border-radius: 999px;
  padding: 2px 8px;
}
.rw-telemetry-body {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rw-telemetry-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}
.rw-telemetry-card {
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 10px;
  padding: 8px;
  background: #ffffff;
}
.rw-telemetry-label {
  color: #6b7280;
  font-size: 11px;
}
.rw-telemetry-value {
  font-weight: 600;
  font-size: 13px;
  color: #111827;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rw-telemetry-pill {
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 999px;
  background: #fde68a;
  color: #92400e;
}
.rw-telemetry-muted {
  color: #6b7280;
}
.rw-telemetry-error {
  color: #b91c1c;
}
.rw-telemetry-context {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.rw-telemetry-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rw-telemetry-heading {
  font-weight: 600;
  color: #111827;
}
.rw-telemetry-item {
  color: #374151;
}
.rw-telemetry-subitem {
  color: #6b7280;
  font-size: 11px;
  margin-top: 2px;
}

/* Product cards */
.rw-products {
  margin-top: 12px;
}
.rw-products-headline {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 4px;
}
.rw-products-subhead {
  font-size: 11px;
  color: #6b7280;
  margin-bottom: 8px;
}
.rw-products-scroll {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x mandatory;
}
.rw-product-card {
  min-width: 210px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  scroll-snap-align: center;
}
.rw-product-media {
  width: 100%;
  height: 140px;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rw-product-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rw-product-body {
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.rw-product-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
.rw-product-price {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
}
.rw-product-desc {
  font-size: 11px;
  color: #6b7280;
}
.rw-product-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.rw-product-badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
  font-weight: 600;
}
.rw-product-actions {
  display: flex;
  gap: 8px;
  padding: 0 12px 12px;
}
.rw-product-action {
  flex: 1;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #111827;
  background: #ffffff;
}
.rw-product-action-primary {
  background: #111827;
  color: #ffffff;
  border-color: #111827;
}

/* Order cards */
.rw-order-cards {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rw-order-section {
  font-size: 12px;
  font-weight: 600;
  color: #4b5563;
  margin-top: 4px;
}
.rw-order-card {
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 16px;
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rw-order-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.rw-order-title {
  font-size: 13px;
  font-weight: 600;
  color: #111827;
}
.rw-order-amount {
  font-size: 12px;
  color: #374151;
}
.rw-order-status {
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #374151;
}
.rw-order-status.is-delivered {
  background: #dcfce7;
  color: #15803d;
}
.rw-order-items {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rw-order-item {
  display: flex;
  gap: 10px;
  align-items: center;
}
.rw-order-item-media {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: #f3f4f6;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rw-order-item-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.rw-order-item-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
}
.rw-order-item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rw-order-item-title {
  font-size: 12px;
  font-weight: 600;
  color: #111827;
}
.rw-order-item-meta {
  display: flex;
  gap: 8px;
  font-size: 11px;
  color: #6b7280;
}
.rw-order-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rw-order-action {
  flex: 1 1 45%;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #111827;
  background: #ffffff;
}
.rw-order-history {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.rw-order-history-toggle {
  align-self: flex-start;
  background: transparent;
  border: none;
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 600;
  padding: 0;
}
.rw-order-history-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.rw-order-history-controls {
  display: flex;
  gap: 8px;
}
.rw-order-history-button {
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11px;
  font-weight: 600;
  border: 1px solid rgba(15, 23, 42, 0.12);
  color: #111827;
  background: #ffffff;
}
.rw-order-history-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Layout helpers */
.fixed { position: fixed; }
.absolute { position: absolute; }
.relative { position: relative; }
.inset-0 { top:0; right:0; bottom:0; left:0; }
.bottom-4 { bottom: 1rem; }
.right-4 { right: 1rem; }
.left-4 { left: 1rem; }
.top-4 { top: 1rem; }
.z-50 { z-index: 1000; }
.w-full { width: 100%; }
.h-full { height: 100%; }
.w-96 { width: 24rem; }
.h-\[600px\] { height: 600px; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; }
.inline-flex { display: inline-flex; }
.block { display: block; }
.grid { display: grid; }
.grid-cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.col-span-2 { grid-column: span 2 / span 2; }
.min-h-0 { min-height: 0; }
.items-center { align-items: center; }
.items-end { align-items: flex-end; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.justify-end { justify-content: flex-end; }
.overflow-y-auto { overflow-y: auto; }
.overflow-x-hidden { overflow-x: hidden; }
.overflow-hidden { overflow: hidden; }
.space-x-1 > * + * { margin-left: 0.25rem; }
.space-x-2 > * + * { margin-left: 0.5rem; }
.gap-2 { gap: 0.5rem; }
.gap-1\.5 { gap: 0.375rem; }
.gap-3 { gap: 0.75rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-3 > * + * { margin-top: 0.75rem; }
.space-y-4 > * + * { margin-top: 1rem; }

/* Sizing */
.w-4 { width: 1rem; }
.h-4 { height: 1rem; }
.w-3\.5 { width: 0.875rem; }
.h-3\.5 { height: 0.875rem; }
.w-1\.5 { width: 0.375rem; }
.h-1\.5 { height: 0.375rem; }
.w-6 { width: 1.5rem; }
.h-6 { height: 1.5rem; }
.w-8 { width: 2rem; }
.h-8 { height: 2rem; }
.min-w-full { min-width: 100%; }
.min-w-\[200px\] { min-width: 200px; }
.min-w-\[240px\] { min-width: 240px; }
.max-w-\[60%\] { max-width: 60%; }

/* Spacing */
.p-1 { padding: 0.25rem; }
.p-0\.5 { padding: 0.125rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.px-1 { padding-left: 0.25rem; padding-right: 0.25rem; }
.px-1\.5 { padding-left: 0.375rem; padding-right: 0.375rem; }
.px-2 { padding-left: 0.5rem; padding-right: 0.5rem; }
.px-3 { padding-left: 0.75rem; padding-right: 0.75rem; }
.px-4 { padding-left: 1rem; padding-right: 1rem; }
.py-0\.5 { padding-top: 0.125rem; padding-bottom: 0.125rem; }
.py-1\.5 { padding-top: 0.375rem; padding-bottom: 0.375rem; }
.py-2 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-3 { padding-top: 0.75rem; padding-bottom: 0.75rem; }
.py-4 { padding-top: 1rem; padding-bottom: 1rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-4 { margin-bottom: 1rem; }
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-4 { margin-top: 1rem; }
.mt-12 { margin-top: 3rem; }
.mb-3 { margin-bottom: 0.75rem; }
.pb-2 { padding-bottom: 0.5rem; }
.pb-3 { padding-bottom: 0.75rem; }
.-top-1 { top: -0.25rem; }
.-right-1 { right: -0.25rem; }
.-top-2 { top: -0.5rem; }
.-right-2 { right: -0.5rem; }
.right-2 { right: 0.5rem; }
.bottom-1 { bottom: 0.25rem; }

/* Borders & radii */
.border { border: 1px solid #e5e7eb; }
.border-b { border-bottom: 1px solid #e5e7eb; }
.border-t { border-top: 1px solid #e5e7eb; }
.border-gray-100 { border-color: #f3f4f6; }
.border-gray-200 { border-color: #e5e7eb; }
.border-gray-900 { border-color: #111827; }
.border-blue-600 { border-color: #2563eb; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-xl { border-radius: 0.75rem; }
.rounded-2xl { border-radius: 1rem; }
.rounded-full { border-radius: 9999px; }

/* Colors & backgrounds */
.bg-white { background-color: #ffffff; }
.bg-white\/20 { background-color: rgba(255, 255, 255, 0.2); }
.bg-gray-900 { background-color: #111827; }
.bg-green-50 { background-color: #f0fdf4; }
.bg-red-50 { background-color: #fef2f2; }
.bg-blue-600 { background-color: #2563eb; }
.bg-blue-50 { background-color: #eff6ff; }
.from-blue-500 { --tw-gradient-from: #3b82f6; }
.to-blue-600 { --tw-gradient-to: #2563eb; }
.from-slate-900 { --tw-gradient-from: #0f172a; }
.via-slate-800 { --tw-gradient-via: #1e293b; }
.to-blue-700 { --tw-gradient-to: #1d4ed8; }
.bg-red-600 { background-color: #dc2626; }
.text-white { color: #ffffff; }
.text-white\/80 { color: rgba(255, 255, 255, 0.8); }
.text-white\/90 { color: rgba(255, 255, 255, 0.9); }
.text-sm { font-size: 0.875rem; line-height: 1.25rem; }
.text-xs { font-size: 0.75rem; line-height: 1rem; }
.text-[10px] { font-size: 0.625rem; line-height: 0.875rem; }
.text-[11px] { font-size: 0.6875rem; line-height: 0.9rem; }
.text-lg { font-size: 1.125rem; line-height: 1.5rem; }
.text-xl { font-size: 1.25rem; line-height: 1.75rem; }
.text-2xl { font-size: 1.5rem; line-height: 2rem; }
.text-center { text-align: center; }
.text-gray-400 { color: #9ca3af; }
.text-gray-500 { color: #6b7280; }
.text-gray-600 { color: #4b5563; }
.text-gray-800 { color: #1f2937; }
.text-gray-900 { color: #111827; }
.text-amber-500 { color: #f59e0b; }
.text-blue-500 { color: #3b82f6; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }
.leading-tight { line-height: 1.25; }
.text-right { text-align: right; }
.tracking-wide { letter-spacing: 0.05em; }
.uppercase { text-transform: uppercase; }
.opacity-90 { opacity: 0.9; }
.opacity-100 { opacity: 1; }

/* Shadows */
.shadow { box-shadow: 0 1px 2px rgba(0,0,0,0.06), 0 1px 3px rgba(0,0,0,0.1); }
.shadow-lg { box-shadow: 0 10px 15px rgba(0,0,0,0.1), 0 4px 6px rgba(0,0,0,0.1); }
.shadow-sm { box-shadow: 0 1px 2px rgba(0,0,0,0.05); }

/* Transitions & animation */
.transition-colors { transition: background-color 0.2s ease, color 0.2s ease; }
.transition-opacity { transition: opacity 0.2s ease; }
.transition { transition: all 0.2s ease; }
.duration-200 { transition-duration: 0.2s; }
.opacity-0 { opacity: 0; }
.hover\:opacity-80:hover { opacity: 0.8; }
.group:hover .group-hover\:opacity-100 { opacity: 1; }

@keyframes slideUp { from { transform: translateY(12px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.animate-slideUp { animation: slideUp 200ms ease-out; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.animate-fadeIn { animation: fadeIn 200ms ease-out; }
@keyframes spin { to { transform: rotate(360deg); } }
.animate-spin { animation: spin 1s linear infinite; }
@keyframes pulse { 0%, 100% { opacity: 0.4; } 50% { opacity: 1; } }
.animate-pulse { animation: pulse 1s ease-in-out infinite; }

/* Hover styles */
.hover\:bg-gray-100:hover { background-color: #f3f4f6; }
.bg-gray-100 { background-color: #f3f4f6; }
.bg-gray-50 { background-color: #f9fafb; }
.hover\:underline:hover { text-decoration: underline; }

/* Sizing constraints */
.max-w-\[80%\] { max-width: 80%; }
.object-cover { object-fit: cover; }
.cursor-pointer { cursor: pointer; }
.resize-none { resize: none; }
.shrink-0 { flex-shrink: 0; }
.snap-x { scroll-snap-type: x mandatory; }
.snap-center { scroll-snap-align: center; }
.pointer-events-none { pointer-events: none; }
.pointer-events-auto { pointer-events: auto; }

/* Gradients (simple) */
.bg-gradient-to-r { background-image: linear-gradient(to right, var(--tw-gradient-from, #3b82f6), var(--tw-gradient-to, #2563eb)); }
.bg-gradient-to-br {
  background-image: linear-gradient(
    to bottom right,
    var(--tw-gradient-from, #0f172a),
    var(--tw-gradient-via, var(--tw-gradient-from, #0f172a)),
    var(--tw-gradient-to, #1d4ed8)
  );
}

/* Bubble tails */
.bubble { position: relative; }
.bubble-left::after { content:''; position:absolute; left:-6px; bottom:10px; width:0; height:0; border-style: solid; border-width:6px 6px 6px 0; border-color: transparent #ffffff transparent transparent; filter: drop-shadow(0 1px 0 rgba(0,0,0,0.05)); }
.bubble-right::after { content:''; position:absolute; right:-6px; bottom:10px; width:0; height:0; border-style: solid; border-width:6px 0 6px 6px; border-color: transparent transparent transparent #f3f4f6; filter: drop-shadow(0 1px 0 rgba(0,0,0,0.05)); }

/* Inputs */
textarea, input { font-family: inherit; }
.focus\:outline-none:focus-visible { outline: none; }
.focus\:outline-2:focus-visible { outline-width: 2px; outline-style: solid; }
.focus\:outline-blue-500:focus-visible { outline-color: #3b82f6; }

/* Utility for message container hover */
.hover\:bg-gray-50\/50:hover { background-color: rgba(249, 250, 251, 0.5); }

/* Custom scroll container */
.chat-scroll { scrollbar-width: thin; scrollbar-color: #cbd5e1 transparent; }
.chat-scroll { scrollbar-gutter: stable; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.chat-scroll::-webkit-scrollbar { width: 8px; }
.chat-scroll::-webkit-scrollbar-track { background: transparent; }
.chat-scroll::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 9999px; border: 2px solid transparent; background-clip: padding-box; }
.chat-scroll::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* Disabled opacity helper (approximation) */
.disabled\:opacity-50[disabled] { opacity: 0.5; }

/* Typing indicator */
.typing-dot { display:inline-block; width:6px; height:6px; margin-right:4px; background:#9ca3af; border-radius:50%; animation: typing 1s infinite ease-in-out; }
.typing-dot:nth-child(2) { animation-delay: 0.2s; }
.typing-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes typing { 0%, 80%, 100% { transform: translateY(0); opacity: 0.5; } 40% { transform: translateY(-3px); opacity: 1; } }

/* Rich message components - ChatKit-inspired features */
.line-clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.divide-y > * + * { border-top: 1px solid #e5e7eb; }
.divide-gray-100 > * + * { border-color: #f3f4f6; }

.fill-amber-500 { fill: #f59e0b; }
.fill-white { fill: #ffffff; }

.mt-3 { margin-top: 0.75rem; }
.space-y-1 > * + * { margin-top: 0.25rem; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.min-w-0 { min-width: 0; }
.flex-shrink-0 { flex-shrink: 0; }
.w-5 { width: 1.25rem; }
.h-5 { height: 1.25rem; }
.w-3 { width: 0.75rem; }
.h-3 { height: 0.75rem; }
.w-16 { width: 4rem; }
.h-16 { height: 4rem; }
.h-32 { height: 8rem; }
.w-1 { width: 0.25rem; }
.ml-1 { margin-left: 0.25rem; }
.ml-auto { margin-left: auto; }
.mt-0\.5 { margin-top: 0.125rem; }
.mb-1 { margin-bottom: 0.25rem; }
.last\:mb-0:last-child { margin-bottom: 0; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.whitespace-pre-wrap { white-space: pre-wrap; }
.flex-wrap { flex-wrap: wrap; }

/* Rich content colors */
.bg-blue-100 { background-color: #dbeafe; }
.bg-blue-200 { background-color: #bfdbfe; }
.border-blue-200 { border-color: #bfdbfe; }
.border-blue-300 { border-color: #93c5fd; }
.text-blue-600 { color: #2563eb; }
.text-blue-700 { color: #1d4ed8; }
.text-blue-900 { color: #1e3a8a; }
.text-red-600 { color: #dc2626; }
.text-green-600 { color: #16a34a; }
.bg-purple-50 { background-color: #faf5ff; }
.bg-purple-200 { background-color: #e9d5ff; }
.border-purple-200 { border-color: #e9d5ff; }
.text-purple-800 { color: #6b21a8; }
.text-purple-900 { color: #581c87; }
.text-gray-700 { color: #374151; }

/* Hover states for citations */
.hover\:border-blue-300:hover { border-color: #93c5fd; }
.hover\:bg-blue-50:hover { background-color: #eff6ff; }
.hover\:bg-blue-700:hover { background-color: #1d4ed8; }

/* Code/details styling */
details summary { cursor: pointer; user-select: none; list-style: none; }
details summary::-webkit-details-marker { display: none; }
.font-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }
.overflow-x-auto { overflow-x: auto; }
pre {
  white-space: pre-wrap;
  word-break: break-word;
  background-color: #0f172a;
  color: #f8fafc;
  border-radius: 0.5rem;
  padding: 1rem;
  margin-bottom: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  overflow-x: auto;
}
pre code {
  display: block;
  background: transparent;
  padding: 0;
}
code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  background-color: rgba(15, 23, 42, 0.1);
  padding: 0.15rem 0.35rem;
  border-radius: 0.25rem;
}
.hljs {
  color: inherit;
  background: transparent;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-title {
  color: #93c5fd;
}
.hljs-string,
.hljs-meta .hljs-string,
.hljs-attr {
  color: #bbf7d0;
}
.hljs-number,
.hljs-literal {
  color: #fcd34d;
}
.hljs-comment {
  color: #94a3b8;
  font-style: italic;
}

@media (prefers-reduced-motion: reduce) {
  .animate-slideUp,
  .animate-fadeIn,
  .animate-spin,
  .animate-pulse,
  .typing-dot {
    animation: none !important;
  }
}

/* Streaming animations */
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }

@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.animate-spin { animation: spin 1s linear infinite; }

/* Inline-block utility */
.inline-block { display: inline-block; }

/* Button resets */
button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* Drag active state */
.drag-active {
  border: 2px dashed #2563eb !important;
  background-color: rgba(37, 99, 235, 0.05);
}

/* Overflow hidden for cards */
.overflow-hidden { overflow: hidden; }

/* Markdown rendering styles */
.markdown-content {
  line-height: 1.6;
}

.markdown-content code {
  background: #f3f4f6;
  padding: 2px 6px;
  border-radius: 3px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.9em;
}

.markdown-content pre {
  background: #1f2937;
  color: #f3f4f6;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 8px 0;
}

.markdown-content pre code {
  background: transparent;
  padding: 0;
  color: #f3f4f6;
}

.markdown-content strong {
  font-weight: 600;
  color: #111827;
}

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

.markdown-content a {
  color: #2563eb;
  text-decoration: underline;
}

.markdown-content a:hover {
  color: #1d4ed8;
}

/* Message actions on hover */
.group:hover .group-hover\:opacity-100 {
  opacity: 1;
}

/* Export menu */
.z-50 {
  z-index: 50;
}

.min-w-\[150px\] {
  min-width: 150px;
}

/* Reaction buttons */
.bg-green-50 {
  background-color: #f0fdf4;
}

.text-green-600 {
  color: #16a34a;
}

.bg-red-50 {
  background-color: #fef2f2;
}

/* Additional utilities */
.gap-1 {
  gap: 0.25rem;
}

.top-8 {
  top: 2rem;
}

.right-0 {
  right: 0;
}

.py-1 {
  padding-top: 0.25rem;
  padding-bottom: 0.25rem;
}

.px-4 {
  padding-left: 1rem;
  padding-right: 1rem;
}

.text-left {
  text-align: left;
}

/* Accessibility: disable animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
