/* 🎨 PREMIUM TYPOGRAPHY: Inter Variable Font for smooth scaling */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  /* ═══════════════════════════════════════════════════════════════
     ⚡ WIDGET 3.0: WELTKLASSE COLOR-SYSTEM (Radix-inspiriert!)
     ═══════════════════════════════════════════════════════════════
     Principle: MINIMAL (nur 3 Farben: Gray, Blue, Green!)
     Reference: Linear, Notion, Stripe (Best-in-Class!)
     ═══════════════════════════════════════════════════════════════ */
  
  /* ═══════════════════════════════════════════════════════════════
     ULTRA-NEUTRAL COLOR-SYSTEM (Universal für 50.000+ Shops!)
     ═══════════════════════════════════════════════════════════════
     Principle: ONLY Grays + minimal-semantic
     Reference: Linear, Notion, Stripe (Best-in-Class!)
     NO BRAND-COLORS! Universal für alle Shops!
     ═══════════════════════════════════════════════════════════════ */
  
  /* ===== GRAYS (12-Step Neutral-Scale) - REFINED ===== */
  --gray-1: #FAFAFA;    /* Subtle backgrounds */
  --gray-2: #F5F5F5;    /* Hover states */
  --gray-3: #E5E5E5;    /* Borders */
  --gray-4: #D4D4D4;    /* Strong borders */
  --gray-5: #A3A3A3;    /* Placeholder, Disabled */
  --gray-6: #737373;    /* Tertiary text */
  --gray-7: #525252;    /* Secondary text */
  --gray-8: #404040;    /* Body text alternative */
  --gray-9: #262626;    /* Headings */
  --gray-10: #171717;   /* High emphasis */
  --gray-11: #0A0A0A;   /* Almost black */
  --gray-12: #000000;   /* Pure black */
  
  /* ===== SEMANTIC COLORS (Universal + Premium!) ===== */
  --success: #10B981;   /* Green - Success, Online */
  --success-light: #D1FAE5;  /* Light green background */
  --success-dark: #059669;   /* Dark green */
  
  --danger: #EF4444;    /* Red - Errors */
  --danger-light: #FEE2E2;   /* Light red background */
  --danger-dark: #DC2626;    /* Dark red */
  
  --warning: #F59E0B;   /* Orange - Warnings */
  --warning-light: #FEF3C7;  /* Light orange */
  --warning-dark: #D97706;   /* Dark orange */
  
  --info: #3B82F6;      /* Blue - Info (NEW!) */
  --info-light: #DBEAFE;     /* Light blue */
  --info-dark: #2563EB;      /* Dark blue */
  
  /* 🎨 BRAND ACCENT (Subtle Purple - nur wo passend!) */
  --accent-purple: #8B5CF6;
  --accent-purple-light: #EDE9FE;
  --accent-purple-dark: #7C3AED;
  
  --accent-pink: #EC4899;
  --accent-pink-light: #FCE7F3;
  --accent-pink-dark: #DB2777;
  
  /* ===== APPLIED-MAPPING (Clean-Names!) ===== */
  --rn-bg: #FFFFFF;
  --rn-surface: #FFFFFF;
  --rn-surface-hover: var(--gray-2);      /* F5F5F5 */
  --rn-surface-accent: var(--gray-1);     /* FAFAFA */
  
  --rn-text: var(--gray-12);              /* BLACK */
  --rn-text-secondary: var(--gray-8);     /* Dark-gray */
  --rn-text-tertiary: var(--gray-6);      /* Light-gray */
  --rn-text-disabled: var(--gray-5);
  
  --rn-border: var(--gray-3);             /* E5E5E5 */
  --rn-border-strong: var(--gray-4);      /* D4D4D4 */
  
  /* ===== INTERACTIVE (BLACK, not blue!) ===== */
  --rn-accent: var(--gray-12);            /* BLACK! */
  --rn-accent-hover: var(--gray-11);      /* Almost-black */
  --rn-accent-light: var(--gray-2);       /* Light-gray */
  
  --rn-success: var(--success);
  --rn-danger: var(--danger);
  
  /* 🎨 ULTRA-PREMIUM SHADOW SYSTEM (Intercom/Linear Level!) */
  /* Floating Card System - Layered shadows for depth without borders */
  /* UPDATED: Enhanced shadows for premium feel */
  
  /* Resting State - Cards at rest (subtle but visible elevation) */
  --shadow-float: 
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 4px 12px rgba(0, 0, 0, 0.10);
  
  /* Hover State - Cards on hover (pronounced elevation) */
  --shadow-float-hover:
    0 4px 16px rgba(0, 0, 0, 0.12),
    0 12px 32px rgba(0, 0, 0, 0.15);
  
  /* Widget Container - Main widget shadow (dramatic!) */
  --shadow-widget:
    0 8px 32px rgba(0, 0, 0, 0.10),
    0 24px 64px rgba(0, 0, 0, 0.12),
    0 48px 96px rgba(0, 0, 0, 0.14);
  
  /* Premium Shadow - Ultra elevated */
  --shadow-premium: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.08),
    0 24px 48px rgba(0, 0, 0, 0.10),
    0 48px 96px rgba(0, 0, 0, 0.12);
  
  /* Legacy shadows (backward compatibility) */
  --rn-shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.05);
  --rn-shadow-sm: var(--shadow-float);
  --rn-shadow-md: 0 2px 6px rgba(0, 0, 0, 0.08);
  --rn-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.10);
  --rn-shadow-widget: var(--shadow-widget);
  --rn-shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.12);
  --rn-shadow-2xl: 0 16px 48px rgba(0, 0, 0, 0.16);
  --rn-shadow-premium: var(--shadow-float-hover);
  
  /* Border Radius - Minimal, Clean */
  --rn-radius-full: 9999px;
  --rn-radius-2xl: 16px;
  --rn-radius-xl: 12px;
  --rn-radius-lg: 8px;
  --rn-radius-md: 6px;
  --rn-radius-sm: 4px;
  --rn-radius-xs: 2px;
  
  /* 📏 MODERN 8PX GRID SPACING SYSTEM (iOS/Material Design Standard) */
  /* Premium spacing for better breathing room */
  --rn-space-1: 4px;    /* Micro gaps */
  --rn-space-2: 8px;    /* Small gaps */
  --rn-space-3: 12px;   /* Medium gaps */
  --rn-space-4: 16px;   /* Standard padding */
  --rn-space-5: 20px;   /* Large gaps */
  --rn-space-6: 24px;   /* XL padding */
  --rn-space-8: 32px;   /* XXL spacing */
  --rn-space-10: 40px;  /* Hero spacing */
  --rn-space-12: 48px;  /* Section spacing */
  
  /* 🎨 TYPOGRAPHY SCALE (Modern Type Scale) */
  --font-size-xs: 11px;    /* Tiny meta */
  --font-size-sm: 13px;    /* Secondary text */
  --font-size-base: 15px;  /* Body text (was 14px - BIGGER for readability!) */
  --font-size-md: 16px;    /* Headings */
  --font-size-lg: 18px;    /* Large headings */
  --font-size-xl: 20px;    /* Hero text */
  --font-size-2xl: 24px;   /* Display */
  
  /* Font Weights (More variety!) */
  --font-weight-light: 300;
  --font-weight-normal: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;
  
  /* Line Heights (Optimized for readability) */
  --line-height-tight: 1.25;
  --line-height-snug: 1.375;
  --line-height-normal: 1.5;
  --line-height-relaxed: 1.625;
  --line-height-loose: 2;
  
  /* Letter Spacing */
  --letter-spacing-tighter: -0.02em;
  --letter-spacing-tight: -0.01em;
  --letter-spacing-normal: 0;
  --letter-spacing-wide: 0.025em;
  --letter-spacing-wider: 0.05em;
  
  /* Card Backgrounds - Slightly tinted for depth */
  --card-bg-light: rgba(255, 255, 255, 0.98);
  --card-bg-dark: rgba(20, 20, 20, 0.8);
  
  /* Focus Ring */
  --rn-focus: 0 0 0 3px rgba(0, 0, 0, 0.1);
  
  /* Transitions - Smooth */
  --rn-transition-fast: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --rn-transition-base: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --rn-transition-slow: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --rn-transition-bounce: 200ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* Animations - Minimal, Fast */
  --rn-animation-slide-up: slideUpFadeIn 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --rn-animation-fade-in: fadeIn 200ms cubic-bezier(0.4, 0, 0.2, 1);
  --rn-animation-scale-in: scaleIn 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== DARK THEME ===== */
[data-theme="dark"] {
  --rn-bg: #000000;
  --rn-surface: #0A0A0A;
  --rn-surface-hover: #141414;
  --rn-surface-accent: #1A1A1A;
  --rn-text: #FFFFFF;
  --rn-text-secondary: #A0A0A0;
  --rn-text-tertiary: #666666;
  --rn-accent: #FFFFFF;
  --rn-accent-hover: #E0E0E0;
  --rn-accent-light: #1A1A1A;
  --rn-border: rgba(255, 255, 255, 0.08);
  --rn-border-strong: rgba(255, 255, 255, 0.12);
  
  /* 🎨 GLASSMORPHISM DARK MODE */
  --card-bg-dark: rgba(20, 20, 20, 0.6);  /* Semi-transparent for glass effect */
  
  /* Premium dark shadows */
  --shadow-float: 
    0 1px 2px rgba(0, 0, 0, 0.4),
    0 2px 4px rgba(0, 0, 0, 0.4),
    0 4px 8px rgba(0, 0, 0, 0.4);
  
  --shadow-float-hover:
    0 2px 4px rgba(0, 0, 0, 0.5),
    0 4px 8px rgba(0, 0, 0, 0.5),
    0 8px 16px rgba(0, 0, 0, 0.5),
    0 16px 32px rgba(0, 0, 0, 0.6);
  
  --rn-shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --rn-shadow-md: 0 2px 4px rgba(0, 0, 0, 0.5);
  --rn-shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.6);
  --rn-shadow-xl: 0 8px 24px rgba(0, 0, 0, 0.7);
  --rn-shadow-2xl: 0 16px 48px rgba(0, 0, 0, 0.8);
  --rn-focus: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

/* 🎨 GLASSMORPHISM for Dark Mode Cards */
[data-theme="dark"] .news-card,
[data-theme="dark"] .home-cta-card {
  background: var(--card-bg-dark);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
}

/* ===== BASE STYLES ===== */
#replainow-chat-window,
#replainow-chat-window *,
#chat-intro,
#chat-intro *,
#replainow-chat-bubble {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif !important;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
}

/* ===== LAUNCHER BUTTON ===== */
#replainow-chat-bubble {
  position: fixed;
  bottom: var(--rn-space-6);
  right: var(--rn-space-6);
  width: 60px;  /* 🎨 Slightly larger for premium presence */
  height: 60px;
  background: #17191a;  /* 🎨 YOUR BRAND COLOR: Dark charcoal */
  color: var(--rn-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;  /* 🎨 Perfect circle */
  box-shadow: 
    0 4px 8px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.15),
    0 12px 24px rgba(0, 0, 0, 0.15);  /* 🎨 Premium layered shadow */
  cursor: pointer;
  z-index: 1200;
  border: none;  /* 🎨 NO BORDER: Clean floating aesthetic */
  transition: transform 250ms cubic-bezier(0.4, 0, 0.2, 1), 
              box-shadow 250ms cubic-bezier(0.4, 0, 0.2, 1);
  animation: fadeInUp 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#replainow-chat-bubble:hover {
  transform: translateY(-3px) scale(1.05);  /* 🎨 More lift + subtle scale */
  box-shadow: 
    0 6px 12px rgba(0, 0, 0, 0.2),
    0 12px 24px rgba(0, 0, 0, 0.18),
    0 18px 36px rgba(0, 0, 0, 0.15);
  background: #1f2123;  /* 🎨 Slightly lighter on hover */
}

#replainow-chat-bubble:active {
  transform: translateY(0) scale(0.98);
}

#replainow-chat-bubble:focus-visible {
  outline: none;
  box-shadow: var(--rn-focus), var(--rn-shadow-xl);
}

#replainow-chat-bubble svg {
  width: 36px;
  height: 36px;
}

/* 🎨 BUBBLE ICON ANIMATIONS (Premium smooth transitions!) */
.chat-bubble-icon-default,
.chat-bubble-icon-chevron {
  position: absolute;
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  transition: 
    opacity 350ms cubic-bezier(0.4, 0, 0.2, 1),
    transform 350ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Default icon - visible state */
.chat-bubble-icon-default:not([style*="display: none"]):not([style*="display:none"]) {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Default icon - hidden state */
.chat-bubble-icon-default[style*="display: none"],
.chat-bubble-icon-default[style*="display:none"] {
  opacity: 0 !important;
  transform: rotate(-180deg) scale(0.7) !important;
  pointer-events: none;
}

/* Chevron icon - visible state */
.chat-bubble-icon-chevron:not([style*="display: none"]):not([style*="display:none"]) {
  opacity: 1;
  transform: rotate(0deg) scale(1);
}

/* Chevron icon - hidden state */
.chat-bubble-icon-chevron[style*="display: none"],
.chat-bubble-icon-chevron[style*="display:none"] {
  opacity: 0 !important;
  transform: rotate(180deg) scale(0.7) !important;
  pointer-events: none;
}

/* Attention Pulse Animation (aktivieren bei neuen Nachrichten) */
#replainow-chat-bubble.has-unread {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

@keyframes pulse {
  0%, 100% {
    transform: scale(1);
    box-shadow: var(--rn-shadow-lg);
  }
  50% {
    transform: scale(1.05);
    box-shadow: var(--rn-shadow-xl);
  }
}

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

/* ===== NOTIFICATION BADGE ===== */
.chat-notification-badge {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #EF4444 0%, #DC2626 100%);
  color: #FFFFFF;
  border-radius: var(--rn-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  padding: 0 6px;
  box-shadow: 0 2px 8px rgba(239, 68, 68, 0.4),
              inset 0 1px 0 rgba(255, 255, 255, 0.2);
  border: 2px solid #FFFFFF;
  animation: badgePopIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1;
}

.chat-notification-badge.replainow-hidden {
  display: none;
}

@keyframes badgePopIn {
  0% {
    opacity: 0;
    transform: scale(0);
  }
  50% {
    transform: scale(1.15);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ===== CHAT WINDOW ===== */
#replainow-chat-window {
  position: fixed;
  bottom: calc(var(--rn-space-6) + 72px);
  right: var(--rn-space-6);
  width: 400px;
  max-width: calc(100vw - var(--rn-space-8));
  height: 680px;
  max-height: calc(100vh - 120px);
  
  /* 🎨 PREMIUM BACKGROUND: Modern gradient with subtle warmth */
  background: linear-gradient(180deg, 
    #FAFBFC 0%,
    #FFFFFF 100%
  );
  
  border-radius: var(--rn-radius-2xl);
  
  /* 🎨 PREMIUM SHADOW: Dramatic floating effect */
  box-shadow: var(--shadow-widget);
  
  overflow: hidden;
  z-index: 1100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(16px) scale(0.96);
  transition: opacity var(--rn-transition-base), 
              transform var(--rn-transition-base), 
              visibility var(--rn-transition-base);
  border: none;  /* 🎨 BORDERLESS: Premium floating aesthetic */
  display: flex;
  flex-direction: column;
  
  /* 🔥 ULTRA PERFORMANCE: 2025 Optimizations */
  contain: layout style paint;
  content-visibility: auto;  /* 2025: Auto render off-screen content */
}

#replainow-chat-window:not(.replainow-hidden) {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  will-change: transform, opacity;  /* Only when visible/animating */
}

/* Hover state for premium feel */
#replainow-chat-window:hover {
  box-shadow: var(--shadow-premium);
  transition: box-shadow 0.3s ease;
}

#replainow-chat-window.replainow-hidden {
  will-change: auto;  /* Remove will-change when hidden (performance!) */
}

/* ===== HEADER ===== */
.chat-header {
  background: #FAFAFA;  /* ✅ Same as chat body! */
  color: var(--rn-text);
  padding: 16px;
  padding-top: calc(16px + env(safe-area-inset-top));
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
  min-height: 64px;
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: var(--rn-radius-2xl) var(--rn-radius-2xl) 0 0;
}

/* BACK-TO-CHATS BUTTON (NEW!) */
.back-to-chats-btn {
  display: flex;               /* Hidden by default via inline style, shown via JS */
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background 120ms ease, transform 120ms ease;
  flex-shrink: 0;
  margin-right: -4px;         /* Optical alignment */
}

.back-to-chats-btn:hover {
  background: var(--gray-2);
  transform: translateX(-2px); /* Subtle left-movement (back-feeling!) */
}

.back-to-chats-btn:active {
  background: var(--gray-3);
  transform: translateX(-3px);
}

.back-icon {
  width: 24px;
  height: 24px;
  stroke: var(--gray-12);      /* BLACK (clear!) */
  stroke-width: 2;             /* Bold */
}

.chat-title {
  display: flex;
  align-items: center;  /* Avatar and text-info horizontal */
  gap: 10px;
  flex: 1;
  min-width: 0;
}

.chat-title-info {
  display: flex;
  flex-direction: column;  /* 🎨 VERTICAL: Name above subtitle! */
  gap: 2px;  /* Small gap between name and subtitle */
  flex: 1;
  min-width: 0;
  justify-content: center;
}

.chat-header img,
.chat-header .chat-avatar-fallback,
.chat-header .chat-avatar-ai-fallback {
  width: 40px;  /* ✅ 40px for better visibility */
  height: 40px;
  object-fit: cover;
  border-radius: 50%;  /* ✅ FULLY ROUND! */
  background: linear-gradient(135deg, var(--accent-purple) 0%, var(--accent-pink) 100%);  /* Gradient for fallback */
  box-shadow: 
    0 2px 8px rgba(139, 92, 246, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.2) inset;
  border: 2px solid rgba(255, 255, 255, 0.9);
  flex-shrink: 0;
}

.chat-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  font-size: 16px;  /* 🎨 BIGGER: 14px → 16px */
  font-weight: 700;
  flex-shrink: 0;
}

/* AI Avatar Fallback - Purple to Pink Gradient with Bot Icon */
.chat-avatar-ai-fallback {
  width: 40px;  /* ✅ 40px everywhere */
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, #8B5CF6 0%, #EC4899 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.chat-title-text {
  font-weight: 600;
  font-size: 16px;  /* 🎨 BIGGER: 14px → 16px for readability */
  letter-spacing: var(--letter-spacing-tight);
  color: var(--rn-text);
  line-height: var(--line-height-tight);
  margin: 0;
}

.chat-title-subtitle {
  font-size: 12px;  /* ✅ 12px as requested */
  font-weight: 400;
  display: flex;
  align-items: center;
  gap: 6px;
  line-height: 1.2;
  color: var(--gray-7);
  margin: 0;
  font-style: normal;  /* ✅ Not italic */
  letter-spacing: 0;  /* ✅ No letter spacing */
}

/* Online Status Dot - 6px green with pulse animation */
.online-status-dot {
  width: 6px;
  height: 6px;
  background: #10b981;  /* Emerald-500 */
  border-radius: 50%;
  animation: pulse-dot 2s ease-in-out infinite;
  flex-shrink: 0;
}

@keyframes pulse-dot {
  0%, 100% {
    opacity: 1;
    box-shadow: 0 0 4px rgba(16, 185, 129, 0.6);
  }
  50% {
    opacity: 0.6;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.8);
  }
}

.chat-header button {
  background: transparent;
  border: none;
  color: var(--rn-text-secondary);
  width: 36px;
  height: 36px;
  border-radius: var(--rn-radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all var(--rn-transition-base);
}

.chat-header button:hover {
  background: var(--rn-surface-hover);
  color: var(--rn-text);
}

.chat-header button:active {
  transform: scale(0.95);
}

.chat-header button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(255,255,255,0.3);
}

.chat-header button svg {
  width: 20px;
  height: 20px;
}

/* Override specific colors - REMOVED for theme support */
/* Product button text color handled by theme tokens now */

/* ===== CHAT BODY ===== */
.chat-body {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: #FAFAFA;  /* 🎨 MINIMAL: Simple light gray background */
  padding: 20px 16px;  /* 🎨 ZURÜCK: Normal padding */
  display: flex;
  flex-direction: column;
  gap: 12px;  /* 🎨 ZURÜCK: Normal gap */
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,0,0,0.15) transparent;
}

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

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

.chat-body::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: var(--rn-radius-full);
}

.chat-body::-webkit-scrollbar-thumb:hover {
  background: rgba(0,0,0,0.25);
}

.chat-body:empty::before {
  content: '💬\A\AStart a conversation\A\AWe\'re here to help! Send us a message.';
  white-space: pre-line;
  color: #6b7280;
  font-size: 14px;
  text-align: center;
  align-self: center;
  margin-top: 30%;
  max-width: 240px;
  line-height: 1.6;
}

/* ===== MESSAGES - INTERCOM 5.0 COMPACT ===== */
.chat-message {
  max-width: 80%;  /* 🎨 REFINED: 85% → 80% for better aesthetics */
  font-size: var(--font-size-base);  /* 🎨 15px - use variable */
  line-height: var(--line-height-normal);  /* 🎨 1.5 */
  padding: 12px 16px;
  border-radius: 16px;
  word-break: break-word;
  position: relative;
  /* animation: slideUp 0.2s cubic-bezier(0.4, 0, 0.2, 1); */  /* 🎬 REPLACED BY GSAP */
  display: flex;
  flex-direction: column;
  gap: 4px;  /* 🎨 WENIGER: Kein Space zu Timestamps */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: default;
  
  /* 🔥 PERFORMANCE: Layout containment for messages */
  contain: layout style;
  content-visibility: auto;  /* 2025: Lazy-render off-screen messages */
}

.chat-message:hover {
  transform: translateY(-0.5px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Message Entrance Animation - REPLACED BY GSAP
   ═══════════════════════════════════════════════════════════════════════════
   NOTE: slideUp animation now handled by GSAP for smoother 60fps performance
   Keeping this as fallback for browsers without GSAP (legacy support)
   ═══════════════════════════════════════════════════════════════════════════ */
@keyframes slideUp {
  from {
    opacity: 0;
    transform: translateY(16px) scale(0.96);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* OLD bot styles removed - see line 669 for new Slate System styles */

.chat-message.user {
  /* 🎨 ZURÜCK ZUM ORIGINAL: Gray war besser! */
  background: #D1D5DB;
  color: #000000;  /* Black text on gray */
  border: none;
  align-self: flex-end;
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 2px 4px rgba(0, 0, 0, 0.06);
}

.chat-message.user:hover {
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.08),
    0 4px 8px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

/* ═══════════════════════════════════════════════════════════════════════════
   MESSAGE STATUS INDICATORS - Optimistic UI (WhatsApp Style!)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Pending state - message sending */
.chat-message.user[data-pending="true"] {
  opacity: 0.85;
  animation: messagePending 1.5s ease-in-out infinite;
}

@keyframes messagePending {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

/* Sent state - message delivered */
.chat-message.user[data-sent="true"] {
  opacity: 1;
}

/* Failed state - message failed to send */
.chat-message.user[data-failed="true"] {
  opacity: 0.75;
  background: #FEE2E2;  /* 🎨 MINIMAL: Light red background */
  color: #DC2626;  /* Dark red text */
  box-shadow: 
    0 2px 6px rgba(239, 68, 68, 0.20),
    0 4px 12px rgba(220, 38, 38, 0.15);
}

.chat-message.user[data-failed="true"]:hover {
  opacity: 0.9;
  background: #FECACA;  /* 🎨 Slightly darker red */
  cursor: pointer;
}

/* Status icons */
.message-status {
  display: inline-block;
  font-size: 11px;
  margin-left: 6px;
  vertical-align: middle;
  transition: all 0.2s ease;
}

.message-status.pending {
  opacity: 0.6;
  animation: statusPulse 1.5s ease-in-out infinite;
}

@keyframes statusPulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 0.3; }
}

.message-status.sent {
  color: var(--gray-7);  /* Gray - neutral! */
  opacity: 0.7;
}

.message-status.failed {
  color: #ef4444; /* Red */
  cursor: pointer;
  opacity: 1;
}

.message-status.failed:hover {
  opacity: 0.7;
  transform: scale(1.1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   Agent Message: Luxurious Purple Theme - VISUAL EXCELLENCE v1.4.0
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-message.agent {
  background: #FFFFFF;  /* 🎨 HIGH CONTRAST: Pure white for Agent messages */
  color: #000000;  /* 🎨 Pure black text */
  align-self: flex-start;
  border: 1px solid rgba(0, 0, 0, 0.08);  /* 🎨 Subtle border */
  box-shadow: 
    0 1px 3px rgba(0, 0, 0, 0.08),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;  /* 🎨 Inner highlight */
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .chat-message.agent {
  background: rgba(30, 30, 30, 0.95);
  color: #e2e8f0;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-float);
}

.chat-message.agent:hover {
  transform: translateY(-1px);
  border-color: rgba(0, 0, 0, 0.12);  /* 🎨 Darker border on hover */
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 1) inset;  /* 🎨 Brighter inner highlight */
}

[data-theme="dark"] .chat-message.agent:hover {
  box-shadow: 0 10px 15px rgba(0, 0, 0, 0.5), 0 4px 6px rgba(0, 0, 0, 0.3);
  border-color: rgba(255, 255, 255, 0.12);
}

/* ═══════════════════════════════════════════════════════════════════════════
   AGENT IDENTITY STYLING - Multi-Agent System
   ═══════════════════════════════════════════════════════════════════════════ */

/* Agent Header - HIDDEN (Compact Design!) */
.agent-header {
  display: none !important;
}

/* Agent Avatar */
.agent-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #d1d5db;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

[data-theme="dark"] .agent-avatar {
  border-color: rgba(255, 255, 255, 0.15);
}

/* Agent Name + Badge Container */
.agent-name-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* Agent Name */
.agent-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--rn-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.05);
}

/* Agent Badge - Neutral Gray Theme */
.agent-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  background: #e5e7eb;
  color: #374151;
  border: 1px solid #d1d5db;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: -0.01em;
  border-radius: 12px;
  flex-shrink: 0;
  box-shadow: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-message:hover .agent-badge {
  background: #d1d5db;
  color: #1f2937;
  transform: scale(1.05);
  box-shadow: none;
}

/* Message Content Wrapper - PREMIUM READABILITY */
.message-content {
  line-height: 1.6; /* More breathing room! */
  word-break: break-word;
  word-spacing: 0.05em; /* Micro-polish for readability */
}

/* ═══════════════════════════════════════════════════════════════════════════
   v1.4.0: Clickable Links in Messages - Professional Style
   ═══════════════════════════════════════════════════════════════════════════ */
.message-link {
  color: #3b82f6;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  font-weight: 500;
  word-break: break-all; /* Long URLs wrap */
}

.message-link:hover {
  color: #2563eb;
  text-decoration-thickness: 2px;
  text-shadow: 0 0 8px rgba(59, 130, 246, 0.3);
}

.message-link:active {
  color: #1d4ed8;
}

/* External link icon */
.message-link::after {
  content: ' ↗';
  font-size: 0.85em;
  opacity: 0.7;
  margin-left: 2px;
}

/* Dark mode links */
[data-theme="dark"] .message-link {
  color: #60a5fa;
}

[data-theme="dark"] .message-link:hover {
  color: #93c5fd;
  text-shadow: 0 0 12px rgba(96, 165, 250, 0.4);
}

/* Agent Signature (footer) - Refined elegance */
.agent-signature {
  display: none !important;
}

/* Agent Takeover Notification - Neutral Theme */
.chat-system-message.agent-takeover {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 6px 12px;  /* 🎨 KOMPAKTER: 8px/16px → 6px/12px */
  margin: 6px auto;  /* 🎨 WENIGER: 8px → 6px */
  background: rgba(0, 0, 0, 0.03);  /* 🎨 SUBTILER: Fast transparent */
  border: none;  /* 🎨 NO BORDER: Cleaner */
  border-radius: 12px;  /* 🎨 MODERN: 16px → 12px */
  font-size: 12px;  /* 🎨 KLEINER: 14px → 12px (weniger prominent) */
  font-weight: 500;
  color: #525252;  /* 🎨 SUBTLER: Grauer */
  box-shadow: none;  /* 🎨 NO SHADOW: Minimal */
  animation: slideIn 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 240px;  /* 🎨 KOMPAKTER: 280px → 240px */
}

[data-theme="dark"] .chat-system-message.agent-takeover {
  background: rgba(255, 255, 255, 0.05);
  color: #A0A0A0;
  box-shadow: none;
}

.takeover-icon {
  font-size: 14px;  /* 🎨 KLEINER: 16px → 14px */
  animation: none;  /* 🎨 NO BOUNCE: Too playful */
}

.takeover-text {
  font-weight: 500;  /* 🎨 LIGHTER: 600 → 500 */
}

/* Agent Avatar Hover Effect - Enhanced */
@media (hover: hover) {
  .agent-avatar:hover {
    transform: scale(1.08); /* More zoom! */
    box-shadow: 0 4px 12px rgba(107, 124, 255, 0.3); /* Purple glow! */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Mobile Responsive */
@media (max-width: 480px) {
  .agent-header {
    gap: 8px;
  }
  
  .agent-avatar {
    width: 28px;
    height: 28px;
  }
  
  .agent-name {
    font-size: 14px;
  }
  
  .agent-badge {
    font-size: 10px;
    padding: 2px 8px;
  }
  
  .agent-signature {
    font-size: 11px;
  }
  
  .chat-system-message.agent-takeover {
    font-size: 14px;
    padding: 8px 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AI IDENTITY STYLING - v1.3.0 - GREEN THEME
   ═══════════════════════════════════════════════════════════════════════════ */

/* ═══════════════════════════════════════════════════════════════════════════
   AI Message: Vibrant Green Theme - VISUAL EXCELLENCE v1.4.0
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-message.bot {
  background: #FFFFFF;  /* 🎨 Pure white for AI messages */
  color: #000000;
  border: none;  /* 🎨 ZURÜCK: No border */
  align-self: flex-start;
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 2px 4px rgba(0, 0, 0, 0.06);  /* 🎨 ZURÜCK: Simple shadow */
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .chat-message.bot {
  background: rgba(26, 26, 26, 0.95);
  color: #e5e7eb;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow-float);
}

.chat-message.bot:hover {
  transform: translateY(-2px);  /* 🎨 MORE LIFT: 1px → 2px */
  border-color: rgba(0, 0, 0, 0.10);  /* 🎨 Slightly darker border */
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.08),
    0 6px 20px rgba(0, 0, 0, 0.06),
    0 2px 0 rgba(255, 255, 255, 1) inset;  /* 🎨 PREMIUM: Elevated + brighter glow */
}

[data-theme="dark"] .chat-message.bot:hover {
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
  border-color: rgba(255, 255, 255, 0.12);
}

/* AI Header - HIDDEN (Compact Design!) */
.ai-header {
  display: none !important;
}

/* AI Avatar/Logo */
.ai-avatar {
  width: 40px;  /* ✅ 40px for better visibility */
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gray-3);
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  flex-shrink: 0;
}

[data-theme="dark"] .ai-avatar {
  border-color: #34d399;
}

/* AI Name + Badge Container */
.ai-name-container {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

/* AI Name */
.ai-name {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--rn-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-shadow: 0 0.5px 1px rgba(0, 0, 0, 0.05);
}

/* AI Badge - Minimal Gray */
.ai-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background: var(--gray-12);  /* 🎨 MINIMAL: Simple black badge */
  color: white;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  border-radius: 6px;
  flex-shrink: 0;
  box-shadow: none;  /* 🎨 Clean, no shadow */
  transition: all 200ms;
}

.chat-message:hover .ai-badge {
  background: var(--gray-11);
  transform: scale(1.02);  /* 🎨 Subtle scale only */
}

/* AI Signature (footer) - Refined elegance */
.ai-signature {
  display: none !important;
}

/* AI Avatar Hover Effect - Enhanced */
@media (hover: hover) {
  .ai-avatar:hover {
    transform: scale(1.08); /* More zoom! */
    box-shadow: 0 4px 12px rgba(6, 214, 160, 0.3); /* Green glow! */
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  }
}

/* Mobile Responsive - AI Identity */
@media (max-width: 480px) {
  .ai-header {
    gap: 8px;
  }
  
  .ai-avatar {
    width: 28px;
    height: 28px;
  }
  
  .ai-name {
    font-size: 14px;
  }
  
  .ai-badge {
    font-size: 10px;
    padding: 2px 8px;
  }
  
  .ai-signature {
    font-size: 11px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PROACTIVE CHAT STYLING - v1.0.0
   ═══════════════════════════════════════════════════════════════════════════ */

/* Proactive Message - Visual Differentiation */
.chat-message.proactive {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  border: none;
  align-self: flex-start;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
  animation: proactiveSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
}

.chat-message.proactive::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
}

[data-theme="dark"] .chat-message.proactive {
  background: linear-gradient(135deg, #5a67d8 0%, #6b46c1 100%);
  box-shadow: 0 4px 12px rgba(90, 103, 216, 0.4);
}

.chat-message.proactive:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.chat-message.proactive .message-content {
  color: white;
  position: relative;
  z-index: 1;
}

.chat-message.proactive .message-content a {
  color: rgba(255, 255, 255, 0.9);
  text-decoration: underline;
}

/* Proactive Message Button */
.proactive-button {
  margin-top: 12px;
  padding: 10px 20px;
  background: rgba(255, 255, 255, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 8px;
  color: white;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(10px);
  display: inline-block;
  text-align: center;
}

.proactive-button:hover {
  background: rgba(255, 255, 255, 0.3);
  border-color: rgba(255, 255, 255, 0.5);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.proactive-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

/* Proactive Message Badge */
.proactive-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  color: white;
  margin-bottom: 8px;
  backdrop-filter: blur(10px);
}

.proactive-badge::before {
  content: '⚡';
  font-size: 12px;
}

/* Proactive Message Animation */
@keyframes proactiveSlideIn {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* Proactive Bounce Animation (for widget button) */
@keyframes proactiveBounce {
  0%, 100% {
    transform: scale(1);
  }
  25% {
    transform: scale(1.05);
  }
  50% {
    transform: scale(0.95);
  }
  75% {
    transform: scale(1.02);
  }
}

.chat-widget-button.proactive-bounce {
  animation: proactiveBounce 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mobile Responsive - Proactive Messages */
@media (max-width: 480px) {
  .chat-message.proactive {
    max-width: 90%;
  }
  
  .proactive-button {
    padding: 8px 16px;
    font-size: 13px;
  }
  
  .proactive-badge {
    font-size: 10px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   END PROACTIVE CHAT STYLING
   ═══════════════════════════════════════════════════════════════════════════ */

/* Message attachments */
.chat-attachments {
  margin-top: var(--rn-space-2);
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--rn-space-2);
}

.chat-attachment {
  position: relative;
  width: fit-content;
  min-width: 70px;
}

.chat-attachment a {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--rn-space-2);
  padding: var(--rn-space-2) var(--rn-space-3) var(--rn-space-2) 36px;
  background: var(--rn-surface);
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius-md);
  font-size: 14px;
  color: var(--rn-text);
  text-decoration: none;
  box-shadow: var(--rn-shadow-sm);
  transition: all var(--rn-transition-fast);
  max-width: 220px;
  overflow: hidden;
  word-break: break-word;
}

.chat-attachment a:hover {
  background: var(--rn-surface-hover);
  transform: translateY(-1px);
  box-shadow: var(--rn-shadow-md);
  text-decoration: none;
}

.chat-attachment a::before {
  content: '';
  position: absolute;
  left: var(--rn-space-3);
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  background: url('data:image/svg+xml;utf8,<svg fill="none" viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"><path d="M10 3v9.586l3.293-3.293 1.414 1.414-6 6-6-6 1.414-1.414L8 12.586V3h2z" fill="%235B7FFF"/><rect x="3" y="17" width="14" height="2" rx="1" fill="%23B8C6FF"/></svg>') no-repeat center;
}

/* ===== TYPING INDICATOR ===== */
.typing-indicator {
  display: flex;
  align-items: center;
  gap: var(--rn-space-2);
  padding: var(--rn-space-2) var(--rn-space-3);
  background: var(--rn-surface);
  border: 1px solid var(--rn-border);
  border-radius: var(--rn-radius-lg);
  box-shadow: var(--rn-shadow-sm);
  width: fit-content;
  margin: 0 0 var(--rn-space-2) 0;
}

.typing-indicator span {
  width: 6px;
  height: 6px;
  border-radius: var(--rn-radius-full);
  background: var(--rn-text-tertiary);
  animation: typingBounce 1.4s infinite ease-in-out;
}

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

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

@keyframes typingBounce {
  0%, 60%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }
  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* ===== INPUT AREA - Clean & Professional ===== */
.chat-input {
  display: flex;
  gap: 10px;  /* 🎨 More space between input and button */
  padding: 16px;
  background: #FFFFFF;  /* 🎨 PURE WHITE: Clean separation */
  border-top: 1px solid rgba(0, 0, 0, 0.06);  /* 🎨 Subtle divider */
  align-items: flex-end;
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   INPUT FIELD - Clean & Professional
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-input textarea,
.chat-input input {
  flex: 1;
  font-size: var(--font-size-base);
  line-height: var(--line-height-normal);
  padding: 13px 18px;  /* 🎨 ZURÜCK: Original padding */
  background: #F8F9FB;
  border: 1px solid rgba(0, 0, 0, 0.08);  /* 🎨 ZURÜCK: Normal border */
  border-radius: 24px;  /* 🎨 ZURÜCK: Pill-shape wie vorher! */
  outline: none;
  color: var(--rn-text);
  min-height: 56px;  /* 🎨 TALLER: 52px → 56px (better touch target!) */
  max-height: 140px;  /* 🎨 HIGHER MAX: 120px → 140px */
  resize: none;
  overflow-y: auto;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  font-family: inherit;
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;  /* 🎨 Subtle depth */
}

.chat-input textarea::placeholder,
.chat-input input::placeholder {
  color: #A3A3A3;  /* 🎨 Medium gray */
  font-weight: var(--font-weight-normal);
}

.chat-input textarea:hover,
.chat-input input:hover {
  background: #F5F6F8;
  border-color: rgba(0, 0, 0, 0.14);  /* 🎨 Darker on hover */
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.06),
    0 1px 0 rgba(255, 255, 255, 1) inset;
}

.chat-input textarea:focus,
.chat-input input:focus {
  background: #FFFFFF;  /* 🎨 Pure white on focus */
  border-color: #000000;  /* 🎨 Black border on focus */
  box-shadow: 
    0 0 0 3px rgba(0, 0, 0, 0.08),  /* 🎨 STRONGER RING: 0.06 → 0.08 */
    0 2px 8px rgba(0, 0, 0, 0.06);  /* 🎨 Subtle depth */
}

/* Custom scrollbar for textarea */
.chat-input textarea::-webkit-scrollbar {
  width: 6px;
}

.chat-input textarea::-webkit-scrollbar-thumb {
  background: var(--rn-border);
  border-radius: 3px;
}

.chat-input textarea::-webkit-scrollbar-thumb:hover {
  background: var(--rn-border-strong);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SEND BUTTON - Clean & Professional
   ═══════════════════════════════════════════════════════════════════════════ */
.chat-input button#send-button {
  min-width: 56px;  /* 🎨 BIGGER: 52px → 56px */
  min-height: 56px;
  /* 🎨 MODERN GRADIENT: Subtle dark gradient */
  background: linear-gradient(135deg, #1F1F1F 0%, #0A0A0A 100%);
  border: none;
  border-radius: 50%;  /* 🎨 Perfect circle */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 🎨 PREMIUM SHADOW: Multi-layer */
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 6px 20px rgba(0, 0, 0, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.1) inset;  /* 🎨 Inner glow */
  
  color: white;
  font-size: 20px;  /* 🎨 BIGGER ICON: 18px → 20px */
  position: relative;
  overflow: hidden;
  font-weight: 600;
}

/* Remove green ripple effect */
.chat-input button::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.3);  /* 🎨 White ripple, not green */
  transform: translate(-50%, -50%);
  transition: width 0.4s ease-out, height 0.4s ease-out;
}

.chat-input button:active::before {
  width: 60px;
  height: 60px;
}

.chat-input button#send-button:hover:not(:disabled) {
  /* 🎨 LIGHTER GRADIENT on hover */
  background: linear-gradient(135deg, #2D2D2D 0%, #1A1A1A 100%);
  transform: scale(1.08);  /* 🎨 MORE SCALE: 1.06 → 1.08 */
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.20),
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.15) inset;  /* 🎨 PREMIUM: Multi-layer */
}

.chat-input button#send-button:active:not(:disabled) {
  transform: scale(0.95);  /* 🎨 Press effect */
  box-shadow: 
    0 1px 4px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
  transition-duration: 100ms;
}

/* Disabled state */
.chat-input button#send-button:disabled {
  background: linear-gradient(135deg, #F0F0F0 0%, #E5E5E5 100%);  /* 🎨 Gradient even when disabled */
  color: #A3A3A3;
  cursor: not-allowed;
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
  opacity: 1;
}

/* Remove green pulse animation - replaced with clean hover */
.chat-input button#send-button.has-text {
  /* No animation - clean static design */
}

/* ═══════════════════════════════════════════════════════════════════════════
   Input Icons INSIDE Field (Intercom 5.0 Style!)
   ═══════════════════════════════════════════════════════════════════════════ */

/* Container for icons inside input */
.input-icons {
  position: absolute;
  right: 12px;
  bottom: 50%;
  transform: translateY(50%);
  display: flex;
  gap: 2px;  /* 🎨 Tighter gap between icons */
  align-items: center;
  pointer-events: auto;
}

/* Emoji & Attachment Buttons - Unicode Icons */
.emoji-btn,
.chat-attachment-btn {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  cursor: pointer;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 0;
  font-size: 20px;
  flex-shrink: 0;
  position: relative;
  opacity: 1;  /* 🔥 FIX: Full opacity, not 0.7! */
}

.emoji-btn:hover,
.chat-attachment-btn:hover {
  background: rgba(0, 0, 0, 0.06);
  transform: scale(1.1);
  opacity: 1;
}

.emoji-btn:active,
.chat-attachment-btn:active {
  transform: scale(0.95);
  background: rgba(0, 0, 0, 0.08);
}

/* Dark mode */
[data-theme="dark"] .emoji-btn:hover,
[data-theme="dark"] .chat-attachment-btn:hover {
  background: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .emoji-btn:active,
[data-theme="dark"] .chat-attachment-btn:active {
  background: rgba(255, 255, 255, 0.12);
}

/* Emoji Picker Popup */
.emoji-picker-popup {
  position: absolute;
  bottom: 60px;
  right: 56px;
  width: 320px;
  background: var(--rn-surface);
  border: 1.5px solid var(--rn-border);
  border-radius: 16px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.15);
  z-index: 1002;
  animation: slideUp 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
}

/* Emoji Grid */
.emoji-grid {
  padding: 12px;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 4px;
  max-height: 240px;
  overflow-y: auto;
}

/* Emoji Items */
.emoji-item {
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  font-size: 24px;
  cursor: pointer;
  border-radius: 8px;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.emoji-item:hover {
  background: var(--rn-surface-accent);
  transform: scale(1.2);
}

.emoji-item:active {
  transform: scale(1.1);
}

/* Mobile */
@media (max-width: 480px) {
  .emoji-picker-popup {
    left: 12px;
    right: 12px;
    bottom: 60px;
    width: auto;
  }
  
  .emoji-grid {
    grid-template-columns: repeat(7, 1fr);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MESSAGE REACTIONS FEATURE REMOVED (Nov 8, 2025)
   User request: Remove like/reaction functionality from widget
   ═══════════════════════════════════════════════════════════════════════════ */

.chat-input button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.1), 
              var(--rn-shadow-lg);
  transform: scale(1.05);
}

.chat-input button svg {
  width: 22px;  /* 🎨 Slightly larger icon */
  height: 22px;
  /* 🔥 REMOVED fill: currentColor - was overriding fill="none" in SVG! */
}

/* ===== INTRO SCREEN ===== */
#chat-intro {
  position: fixed;
  bottom: calc(var(--rn-space-6) + 64px);
  right: var(--rn-space-6);
  width: 400px;
  max-width: calc(100vw - var(--rn-space-8));
  height: 680px;
  max-height: calc(100vh - 120px);
  background: var(--rn-surface);
  border-radius: var(--rn-radius-2xl);
  box-shadow: var(--rn-shadow-2xl);
  padding: 40px 32px;
  z-index: 1100;
  border: 1px solid var(--rn-border);
  display: flex;
  flex-direction: column;
  gap: 20px;
  overflow-y: auto;
  justify-content: center;
}

/* Close Button für Intro */
.chat-intro-close-btn {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  border-radius: var(--rn-radius-md);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--rn-text-secondary);
  font-size: 20px;
  transition: all var(--rn-transition-fast);
  z-index: 10;
}

.chat-intro-close-btn:hover {
  background: var(--rn-surface-hover);
  color: var(--rn-text);
}

.chat-intro-close-btn:active {
  transform: scale(0.95);
}

.chat-intro {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 8px;
}

.chat-intro p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--rn-text);
  text-align: left;
  margin: 0;
  font-weight: 500;
}

.chat-intro input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--rn-border);
  border-radius: 8px;
  font-size: 15px;
  background: var(--rn-surface);
  color: var(--rn-text);
  outline: none;
  transition: border-color var(--rn-transition-fast), 
              box-shadow var(--rn-transition-fast);
}

.chat-intro input::placeholder {
  color: var(--rn-text-tertiary);
}

.chat-intro input:hover {
  border-color: var(--rn-border-strong);
}

.chat-intro input:focus {
  border-color: var(--rn-accent);
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.05);
  background: var(--rn-surface);
}

.chat-intro button#start-chat {
  width: 100%;
  padding: 13px 16px;
  background: var(--rn-accent);
  color: var(--rn-surface);
  border: 1px solid var(--rn-accent);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: none;
  transition: background var(--rn-transition-fast), 
              transform var(--rn-transition-fast), 
              box-shadow var(--rn-transition-fast);
  margin-top: 4px;
}

.chat-intro button#start-chat:hover {
  background: var(--rn-accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.chat-intro button:active {
  transform: translateY(0);
}

.chat-intro button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

/* Dark Mode Intro */
[data-theme="dark"] .chat-intro-close-btn:hover {
  background: var(--rn-surface-hover);
}

[data-theme="dark"] .chat-intro input:focus {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .chat-intro button:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.15);
}

/* ===== LOADER ===== */
#chat-loader,
.chat-loader {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  font-size: 15px;
  font-weight: 500;
  color: var(--rn-accent);
  background: var(--rn-surface);
  border-radius: var(--rn-radius-lg);
  margin: var(--rn-space-6) auto;
  width: 320px;
  max-width: 90vw;
  box-shadow: var(--rn-shadow-md);
  border: 1px solid var(--rn-border);
  z-index: 2000;
  gap: var(--rn-space-4);
}

.chat-loader-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--rn-accent-light);
  border-top-color: var(--rn-accent);
  border-radius: var(--rn-radius-full);
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ===== SENDER INFO + TIMESTAMP (Outside Bubble - WhatsApp Style!) ===== */
.message-sender-info {
  font-size: 11px;
  font-weight: 500;
  color: var(--gray-7);
  margin-top: 0;  /* 🎨 NO GAP: Tight to bubble! */
  margin-bottom: 4px;
  padding: 0 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.message-sender-name {
  font-weight: 500;
  color: #6b7280;
}

.message-sender-name::after {
  content: '•';
  color: #d1d5db;
  margin-left: 4px;
  margin-right: 0px;
  font-weight: 400;
}

.message-timestamp {
  font-size: 11px;
  font-weight: 400;
  color: #9ca3af;
}

.chat-message.user + .message-sender-info {
  justify-content: flex-end; /* Right align */
  margin-left: auto;
  margin-right: 0;
  max-width: 70%;
}

.chat-message.bot + .message-sender-info,
.chat-message.agent + .message-sender-info {
  justify-content: flex-start; /* Left align */
  margin-left: 0;
  max-width: 70%;
}

/* ===== MESSAGE ERROR STATE ===== */
.message-error {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 8px;
  color: #ef4444;
  font-size: 14px;
  font-weight: 500;
  margin: 8px 0;
}

.message-error svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.retry-button {
  padding: 4px 12px;
  background: #ef4444;
  color: #ffffff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  margin-left: auto;
}

.retry-button:hover {
  background: #dc2626;
}

/* ===== SEND BUTTON LOADING STATE ===== */
.send-button.loading {
  opacity: 0.7;
  pointer-events: none;
  position: relative;
}

.send-button.loading svg {
  opacity: 0;
}

.send-button.loading::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 18px;
  height: 18px;
  margin: -9px 0 0 -9px;
  border: 2px solid transparent;
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: spin 600ms linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ===== UTILITY CLASSES ===== */
.replainow-hidden {
  display: none !important;
}

.chat-intro.replainow-hidden,
.chat-body.replainow-hidden,
.chat-input.replainow-hidden,
#chat-loader.replainow-hidden,
.chat-loader.replainow-hidden,
#chat-connection-banner.replainow-hidden {
  display: none !important;
}

.chat-intro:not(.replainow-hidden) {
  display: flex !important;
}

.chat-body:not(.replainow-hidden) {
  display: flex !important;
  flex: 1 !important;
}

.chat-input:not(.replainow-hidden) {
  display: flex !important;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  #replainow-chat-window,
  #chat-intro {
    right: 0;
    left: 0;
    bottom: 0;
    top: 0;
    width: 100%;
    max-width: none;
    /* 🔥 ULTRA MODERN: Dynamic Viewport Height for iOS/Android 2025! */
    height: 100dvh;  /* Dynamic viewport (accounts for browser UI!) */
    height: 100vh;   /* Fallback for older browsers */
    max-height: none;
    border-radius: 0;  /* Full-screen on mobile! */
    
    /* 🍎 NO CONTAINER PADDING - Header/Tabs handle Safe-Areas individually! */
  }
  
  #replainow-chat-bubble {
    bottom: calc(var(--rn-space-4) + env(safe-area-inset-bottom));
    right: calc(var(--rn-space-4) + env(safe-area-inset-right));
    width: 60px;  /* 🔥 Touch-friendly size */
    height: 60px;
  }
  
  #replainow-chat-bubble svg {
    width: 32px;
    height: 32px;
  }
  
  .chat-body {
    padding: var(--rn-space-4) var(--rn-space-3);
  }
  
  .chat-input {
    padding: var(--rn-space-3);
  }
  
  .chat-message {
    max-width: 90%;
    font-size: 14px;
  }
  
  .chat-product-card {
    max-width: 100%;
    margin: var(--rn-space-2) 0;
  }
  
  .chat-product-cta-bubble {
    max-width: 100%;
  }
  
  .chat-product-image {
    height: 160px;
  }
  
  .chat-product-main {
    padding: var(--rn-space-3);
  }
  
  .chat-product-name {
    font-size: 14px;
  }
  
  .chat-product-price {
    font-size: 15px;
  }
  
  .chat-product-btn {
    padding: 12px var(--rn-space-3);
    font-size: 13px;
  }
  
  /* 🔥 TOUCH TARGETS: All interactive elements ≥44px (Apple HIG 2025) */
  .chat-header button {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
  }
  
  .chat-input button {
    min-width: 48px;
    min-height: 48px;
  }
  
  /* Proactive notification buttons */
  .proactive-button {
    min-height: 44px;
    padding: 12px 18px;
  }
  
  /* 🔥 HIDE EMOJI PICKER: Native keyboard emojis on mobile! */
  #emoji-btn,
  .emoji-btn {
    display: none !important;
  }
}

/* 🔥 TABLET & LARGE MOBILE (481px - 768px) */
@media (max-width: 768px) and (min-width: 481px) {
  #replainow-chat-window {
    width: 90vw;
    max-width: 420px;
    height: 85vh;
    max-height: 700px;
    right: var(--rn-space-5);
    bottom: var(--rn-space-5);
  }
}

/* 🔥 LARGE PHONES (391px - 480px) - iPhone 17 Pro Max, Galaxy S25 Ultra */
@media (max-width: 480px) and (min-width: 391px) {
  .widget-tabs {
    height: 78px;  /* Slightly smaller on large phones than default 80px */
  }
}

/* 🔥 LANDSCAPE MODE - All Mobile Devices */
@media (max-width: 896px) and (max-height: 480px) and (orientation: landscape) {
  #replainow-chat-window,
  #chat-intro {
    /* Use full width in landscape */
    width: 100vw;
    height: 100vh;
    right: 0;
    left: 0;
    top: 0;
    bottom: 0;
    border-radius: 0;
  }
  
  .chat-header {
    min-height: 48px;  /* Shorter header in landscape */
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  
  .widget-tabs {
    height: 64px;  /* Shorter tabs in landscape */
    padding: 8px 6px;
    padding-left: max(6px, env(safe-area-inset-left));
    padding-right: max(6px, env(safe-area-inset-right));
    padding-bottom: max(8px, env(safe-area-inset-bottom));
  }
  
  .chat-body {
    /* Maximize content area in landscape */
    padding: var(--rn-space-2) var(--rn-space-3);
    padding-left: max(var(--rn-space-3), env(safe-area-inset-left));
    padding-right: max(var(--rn-space-3), env(safe-area-inset-right));
  }
}

/* ===== PRODUCT CARDS - ULTRA MINIMAL PREMIUM DESIGN ===== */
.chat-product-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;  /* 🎨 Pure white */
  border: 1px solid rgba(0, 0, 0, 0.08);  /* 🎨 MODERN: Slightly darker border */
  border-radius: 16px;  /* 🎨 MODERN: More rounded */
  overflow: hidden;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;  /* 🎨 PREMIUM: 3-layer + inner glow */
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 280px;  /* 🎨 ZURÜCK: Original width */
  align-self: flex-start;
  margin: 12px 0;  /* 🎨 ZURÜCK: Weniger Space */
  
  /* 🔥 PERFORMANCE */
  contain: layout style paint;
  content-visibility: auto;
}

/* Hover state - GSAP handles main animation, this is fallback */
.chat-product-card:hover {
  will-change: transform, box-shadow;
  border-color: rgba(0, 0, 0, 0.12);  /* 🎨 Even darker on hover */
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.06),
    0 2px 0 rgba(255, 255, 255, 1) inset;  /* 🎨 PREMIUM: Ultra elevated */
}

.chat-product-image {
  width: 100%;
  height: 180px;  /* 🎨 ZURÜCK: Original height */
  object-fit: cover;
  background: #FAFAFA;
  display: block;
}

.chat-product-main {
  padding: 16px;  /* 🎨 ZURÜCK: Original */
  display: flex;
  flex-direction: column;
  gap: 8px;  /* 🎨 ZURÜCK: Normal gap */
  background: var(--rn-surface);
}

.chat-product-name {
  font-size: 16px;  /* 🎨 ZURÜCK: Original */
  font-weight: var(--font-weight-semibold);
  letter-spacing: var(--letter-spacing-tight);
  color: var(--rn-text);
  margin: 0;
  line-height: var(--line-height-snug);  /* 1.375 */
  
  /* 🎨 Truncate after 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.chat-product-price {
  font-size: 16px;  /* 🎨 ZURÜCK: Original */
  font-weight: 600;  /* 🎨 ZURÜCK: Semibold */
  letter-spacing: var(--letter-spacing-tighter);
  color: var(--rn-text);
  margin: 4px 0 0 0;
}

.chat-product-desc {
  font-size: 13px;  /* 🎨 ZURÜCK: Original */
  font-weight: var(--font-weight-normal);
  color: var(--rn-text-secondary);
  line-height: var(--line-height-relaxed);  /* 1.625 */
  margin: 4px 0 0 0;
  opacity: 0.9;  /* 🎨 Less transparent: 0.8 → 0.9 */
  
  /* 🎨 Truncate after 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Button - Integrated into card as last element */
.chat-product-cta-bubble {
  display: flex;
  align-self: flex-start;
  margin: var(--rn-space-1) 0 var(--rn-space-3) 0;
  max-width: 280px;
  width: 100%;
}

.chat-product-btn {
  width: 100%;
  padding: 16px 20px;  /* 🎨 MORE PADDING: 13px/16px → 16px/20px */
  /* 🎨 MODERN GRADIENT: Subtle depth */
  background: linear-gradient(135deg, #1F1F1F 0%, #0A0A0A 100%);
  color: #FFFFFF;
  border: none;  /* 🎨 BORDERLESS for modern look */
  border-radius: 12px;  /* 🎨 MORE ROUNDED: 8px → 12px */
  font-size: 15px;  /* 🎨 BIGGER: 14px → 15px */
  font-weight: var(--font-weight-semibold);
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  text-align: center;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  letter-spacing: var(--letter-spacing-normal);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.15),
    0 1px 0 rgba(255, 255, 255, 0.1) inset;  /* 🎨 Inner glow */
}

.chat-product-btn:hover {
  background: linear-gradient(135deg, #2D2D2D 0%, #1A1A1A 100%);  /* 🎨 Lighter gradient */
  transform: translateY(-2px) scale(1.01);  /* 🎨 LIFT + SCALE */
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.20),
    0 8px 32px rgba(0, 0, 0, 0.12),
    0 2px 0 rgba(255, 255, 255, 0.15) inset;  /* 🎨 PREMIUM: Multi-layer */
}

.chat-product-btn:active {
  transform: translateY(0) scale(0.99);
  box-shadow: 
    0 1px 4px rgba(0, 0, 0, 0.12),
    0 1px 0 rgba(255, 255, 255, 0.08) inset;
}

.chat-product-btn:focus-visible {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(0, 0, 0, 0.15),
    0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Dark Mode Product Card Optimizations */
[data-theme="dark"] .chat-product-card {
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .chat-product-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.8);
  border-color: rgba(255, 255, 255, 0.15);
}

[data-theme="dark"] .chat-product-image {
  background: #0F0F0F;
}

[data-theme="dark"] .chat-product-btn:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .chat-product-btn:focus-visible {
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.2);
}

/* ===== ANIMATIONS ===== */

/* Keyframes - Premium Smooth Animations */
@keyframes slideUpFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

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

@keyframes bounce {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-4px);
  }
}

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

/* 🔥 PHASE 3: LOADING SKELETON SCREENS (World-Class!) */

/* Skeleton Base */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--gray-1) 0%,
    var(--gray-2) 50%,
    var(--gray-1) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s ease-in-out infinite;
  border-radius: 4px;
}

/* Conversation Card Skeleton */
.conversation-card-skeleton {
  padding: 12px 16px;
  border-bottom: 1px solid var(--rn-border);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.conversation-card-skeleton .skeleton-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.conversation-card-skeleton .skeleton-name {
  width: 120px;
  height: 14px;
}

.conversation-card-skeleton .skeleton-time {
  width: 60px;
  height: 12px;
}

.conversation-card-skeleton .skeleton-preview {
  width: 100%;
  height: 14px;
}

.conversation-card-skeleton .skeleton-meta {
  display: flex;
  gap: 8px;
}

.conversation-card-skeleton .skeleton-meta-item {
  width: 80px;
  height: 12px;
}

/* News Card Skeleton */
.news-card-skeleton {
  padding: 12px;
  border: 1px solid var(--rn-border);
  border-radius: 12px;
  background: var(--rn-surface);
  margin-bottom: 10px;
}

.news-card-skeleton .skeleton-image {
  width: 100%;
  height: 120px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.news-card-skeleton .skeleton-title {
  width: 80%;
  height: 14px;
  margin-bottom: 8px;
}

.news-card-skeleton .skeleton-description {
  width: 100%;
  height: 12px;
  margin-bottom: 6px;
}

.news-card-skeleton .skeleton-description:last-child {
  width: 60%;
}

/* 🔥 PHASE 3: ERROR & SUCCESS STATES (Premium Feedback!) */

/* Input Error State */
.chat-input textarea.error,
.chat-input input.error {
  border-color: var(--rn-danger);
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.input-error-message {
  color: var(--rn-danger);
  font-size: 12px;
  margin-top: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
  animation: slideUpFadeIn 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Success State (Message Sent) */
.message-sent-feedback {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--rn-success);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
  animation: successPop 2s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
  z-index: 10001;
}

@keyframes successPop {
  0% {
    opacity: 0;
    transform: translateX(-50%) translateY(10px) scale(0.9);
  }
  10%, 90% {
    opacity: 1;
    transform: translateX(-50%) translateY(0) scale(1);
  }
  100% {
    opacity: 0;
    transform: translateX(-50%) translateY(-10px) scale(0.9);
  }
}

/* Loading Spinner (Minimal) */
.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--gray-2);
  border-top-color: var(--gray-12);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  gap: 12px;
}

.spinner-text {
  font-size: 13px;
  color: var(--gray-6);
}

@keyframes ripple {
  0% {
    transform: scale(0);
    opacity: 1;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

/* Typing Indicator Animation */
@keyframes typingDot {
  0%, 60%, 100% {
    transform: translateY(0);
    opacity: 0.7;
  }
  30% {
    transform: translateY(-8px);
    opacity: 1;
  }
}

/* Agent Takeover Notification Animations */
@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

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

/* ===== TYPING INDICATOR - INTERCOM STYLE ===== */
.typing-indicator {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 12px 16px;
  background: var(--rn-surface);
  border-radius: var(--rn-radius-2xl);
  box-shadow: var(--rn-shadow-sm);
  border: 1px solid var(--rn-border);
  animation: var(--rn-animation-slide-up);
  max-width: fit-content;
}

.typing-indicator span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--rn-text-tertiary);
  animation: typingDot 1.4s infinite ease-in-out;
}

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

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

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

/* Message Animations - removed duplicates, animations defined in main .chat-message rule */

/* ♿ ACCESSIBILITY: Reduced Motion Support */
/* GSAP animations handled in widget.js via timeScale(100) */
/* This is CSS fallback for non-GSAP animations */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== RTL SUPPORT (Arabic, Hebrew, Persian, Urdu) ===== */
[dir="rtl"] #replainow-chat-window,
[dir="rtl"] #chat-intro {
  direction: rtl;
}

[dir="rtl"] .chat-header {
  flex-direction: row-reverse;
}

[dir="rtl"] .chat-title {
  flex-direction: row-reverse;
}

[dir="rtl"] .chat-body {
  direction: rtl;
}

[dir="rtl"] .chat-message.user {
  align-self: flex-start;
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .chat-message.bot,
[dir="rtl"] .chat-message.agent {
  align-self: flex-end;
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .chat-input {
  direction: rtl;
}

[dir="rtl"] .chat-input input {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .chat-attachment a {
  direction: rtl;
  padding: var(--rn-space-2) 36px var(--rn-space-2) var(--rn-space-3);
}

[dir="rtl"] .chat-attachment a::before {
  left: auto;
  right: var(--rn-space-3);
}

[dir="rtl"] .chat-product-main,
[dir="rtl"] .chat-intro {
  direction: rtl;
  text-align: right;
}

[dir="rtl"] .chat-product-card,
[dir="rtl"] .chat-product-cta-bubble {
  align-self: flex-end;
}

[dir="rtl"] #replainow-chat-bubble {
  left: var(--rn-space-6);
  right: auto;
}

[dir="rtl"] #replainow-chat-window {
  left: var(--rn-space-6);
  right: auto;
}

@media (max-width: 480px) {
  [dir="rtl"] #replainow-chat-bubble {
    left: var(--rn-space-4);
    right: auto;
  }
  
  [dir="rtl"] #replainow-chat-window,
  [dir="rtl"] #chat-intro {
    left: var(--rn-space-4);
    right: var(--rn-space-4);
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AGENT PRODUCT CARDS - Manual Product Cards sent from Dashboard
   Separate from product_bot cards (focus_chunks) - Uses metadata format
   ═══════════════════════════════════════════════════════════════════════════ */

.agent-product-card-widget {
  display: flex;
  flex-direction: column;
  background: var(--card-bg-light);  /* 🎨 Tinted white */
  border: none;  /* 🎨 BORDERLESS */
  border-radius: var(--rn-radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-float);  /* 🎨 Premium layered shadow */
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  max-width: 280px;
  width: 280px;
  align-self: flex-start;
  margin: 16px 0;  /* 🎨 4px grid */
  contain: layout style paint;
  will-change: transform, box-shadow;
  flex-shrink: 0;
  /* animation: slideUp 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); */  /* 🎬 REPLACED BY GSAP */
}

.agent-product-card-widget:hover {
  transform: translateY(-4px) scale(1.01);  /* 🎨 Premium lift + scale */
  box-shadow: var(--shadow-float-hover);  /* 🎨 Ultra-premium elevation */
  background: #FFFFFF;  /* Full white on hover */
}

/* Product Card Header (Image + Info side by side) */
.agent-product-card-header {
  display: flex;
  gap: 12px;
  padding: 16px;
}

/* Product Image (compact for widget) */
.agent-product-image {
  width: 100px;
  height: 100px;
  border-radius: 8px;
  object-fit: cover;
  flex-shrink: 0;
  background: linear-gradient(to bottom right, #f8fafc, #f1f5f9);
}

/* Product Info Container */
.agent-product-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

/* Product Title */
.agent-product-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--rn-text);
  line-height: 1.3;
  margin: 0 0 2px 0;
  /* Truncate after 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product Description */
.agent-product-description {
  font-size: 12px;
  color: var(--rn-text-secondary);
  line-height: 1.4;
  margin: 0 0 4px 0;
  /* Truncate after 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Product Price */
.agent-product-price {
  font-size: 16px;  /* 🎨 ZURÜCK: War zu groß */
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--rn-text);
  margin: 4px 0 0 0;
}

/* Stock Info */
.agent-product-stock {
  font-size: 12px;
  color: var(--rn-text-secondary);
  font-weight: 500;
  margin-top: 2px;
}

/* Low Stock Warning */
.agent-product-stock.low-stock {
  color: #f59e0b;
  font-weight: 600;
}

/* Out of Stock */
.agent-product-stock.out-of-stock {
  color: #ef4444;
  font-weight: 600;
}

/* CTA Button - Neutral Theme */
.agent-product-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 16px;
  background: #f3f4f6;
  color: #111827 !important;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-top: 1px solid #e5e7eb;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  letter-spacing: 0;
}

.agent-product-cta:hover {
  background: #e5e7eb;
  color: #000000 !important;
}

.agent-product-cta:active {
  background: #d1d5db;
}

/* Disabled State (Out of Stock) */
.agent-product-cta:disabled {
  background: var(--rn-surface-accent);
  color: var(--rn-text-tertiary);
  cursor: not-allowed;
  opacity: 0.6;
}

/* Dark Mode Optimizations */
[data-theme="dark"] .agent-product-card-widget {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .agent-product-card-widget:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6);
}

[data-theme="dark"] .agent-product-image {
  background: linear-gradient(to bottom right, #1a1a1a, #0a0a0a);
}

/* Mobile Responsive */
@media (max-width: 400px) {
  .agent-product-card-widget {
    max-width: 100%;
    width: 100%;
    margin: 10px 0;
  }
  
  .agent-product-image {
    width: 80px;
    height: 80px;
  }
  
  .agent-product-title {
    font-size: 14px;
  }
  
  .agent-product-description {
    font-size: 11px;
    -webkit-line-clamp: 1;
    line-clamp: 1;
  }
  
  .agent-product-price {
    font-size: 18px;
  }
  
  .agent-product-cta {
    font-size: 14px;
    padding: 12px;
  }
}

/* Tablet Responsive */
@media (min-width: 401px) and (max-width: 768px) {
  .agent-product-card-widget {
    width: 260px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ⚡ WIDGET 3.0: MULTI-TAB NAVIGATION (Premium Minimal Design!)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ===== MULTI-TAB MODE: Widget-Container-Adjustments ===== */
#replainow-chat-window.multi-tab-mode {
  display: flex;
  flex-direction: column;
  overflow: hidden;  /* Prevent-content-overflow */
}

/* ===== TAB-CONTENTS-CONTAINER ===== */
.tab-contents {
  flex: 1;
  overflow: hidden;  /* Child-panels handle scrolling */
  position: relative;
}

.tab-content {
  display: none;
  flex-direction: column;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  
  /* 🔥 ENHANCED: Smooth Tab-Switch Animation (60 FPS!) */
  opacity: 1;
  transform: translateY(0);
  transition: opacity 150ms cubic-bezier(0.4, 0, 0.2, 1),
              transform 150ms cubic-bezier(0.4, 0, 0.2, 1);  /* 🔥 Doubled duration for smoother feel */
  will-change: transform, opacity;
}

.tab-content.active {
  display: flex;
  animation: fadeInUp 200ms cubic-bezier(0.4, 0, 0.2, 1);  /* 🔥 NEW: Entrance animation */
}

/* 🔥 NEW: Tab Content Entrance Animation */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Remove will-change when not-animating (Performance!) */
.tab-content:not(.exiting):not(.entering) {
  will-change: auto;
}

/* Scrollbar (Like chat-body) */
.tab-content::-webkit-scrollbar {
  width: 6px;
}

.tab-content::-webkit-scrollbar-track {
  background: transparent;
}

.tab-content::-webkit-scrollbar-thumb {
  background: rgba(0,0,0,0.15);
  border-radius: 9999px;
}

/* ===== BOTTOM-TAB-NAVIGATION ===== */
.widget-tabs {
  display: flex;
  border-top: 1px solid rgba(0, 0, 0, 0.08);  /* 🎨 DARKER SEPARATOR: More visible */
  
  /* 🎨 CLEAN BACKGROUND with subtle warmth */
  background: linear-gradient(180deg, #FFFFFF 0%, #FAFAFA 100%);
  
  padding: 12px;  /* 🎨 ZURÜCK: Normal padding */
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  gap: 6px;  /* 🎨 ZURÜCK: Normal gap */
  height: 72px;  /* 🎨 KOMPAKT: Nicht zu hoch */
  flex-shrink: 0;             
  position: relative;
  border-radius: 0 0 var(--rn-radius-2xl) var(--rn-radius-2xl);
  transition: opacity 200ms ease, transform 200ms ease;
  box-shadow: 0 -1px 0 rgba(255, 255, 255, 0.5) inset;  /* 🎨 Subtle inner glow top */
}

.widget-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;  /* 🎨 Space between icon and label */
  padding: 14px 16px 10px 16px;  /* 🎨 CRITICAL: 14px top padding for proper icon spacing! */
  border-radius: 14px;  /* 🎨 More rounded pill shape */
  background: transparent;
  border: none;
  position: relative;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

/* Removed duplicate - defined below */

.widget-tab.active {
  /* 🎨 MODERN GRADIENT: Subtle dark gradient */
  background: linear-gradient(135deg, #1F1F1F 0%, #0F0F0F 100%);
  color: #FFFFFF;
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.18),
    0 6px 20px rgba(0, 0, 0, 0.10),
    0 1px 0 rgba(255, 255, 255, 0.12) inset;  /* 🎨 PREMIUM: Multi-layer + glow */
  transform: none;
}

.widget-tab:active {
  transform: scale(0.96);
}

.widget-tab:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 2px var(--gray-12);  /* 🔥 FIXED: Black focus ring (not blue!) */
}

.widget-tab-icon {
  width: 26px;  /* 🎨 PERFECT: 26px balanced size */
  height: 26px;
  min-width: 26px;
  min-height: 26px;
  stroke: var(--gray-12);  /* 🎨 BLACK inactive (not gray!) */
  stroke-width: 2;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1), stroke 200ms;
  flex-shrink: 0;
}

/* 🔥 REMOVED: .widget-tab.active .widget-tab-icon transform */
/* translateY(-1px) caused icon to stick to top edge */
/* Icon now stays centered with proper padding */

.widget-tab-label {
  font-size: 11px;  /* 🎨 Compact for clean look */
  font-weight: 600;  /* 🎨 SEMIBOLD: Strong inactive state */
  letter-spacing: -0.01em;
  color: var(--gray-12);  /* 🎨 BLACK inactive (not gray!) */
  transition: color 200ms ease, font-weight 200ms ease;
}

/* Active Tab-Label - WHITE on BLACK pill! */
.widget-tab.active .widget-tab-label {
  font-weight: 600;
  color: #FFFFFF;  /* 🎨 WHITE on black pill */
}

/* Active Tab Icon - WHITE! */
.widget-tab.active .widget-tab-icon {
  stroke: #FFFFFF;  /* 🎨 WHITE icon on black pill */
}

/* Hover Tab */
.widget-tab:hover:not(.active) {
  background: var(--gray-1);  /* 🎨 Very subtle gray on hover */
}

.widget-tab:hover:not(.active) .widget-tab-icon {
  transform: translateY(-2px);  /* 🎨 Icon lifts on hover */
}

/* Tab-Badge (Unread-Counter) */
.tab-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  background: linear-gradient(135deg, #EF4444, #DC2626);
  color: white;
  border-radius: 9999px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border: 2px solid var(--rn-surface);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
  animation: badgePop 200ms cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes badgePop {
  0% { opacity: 0; transform: scale(0); }
  50% { transform: scale(1.2); }
  100% { opacity: 1; transform: scale(1); }
}

/* ===== HOME-TAB ===== */
#home-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  
  /* 🎨 TRANSPARENT: Let widget background show through for unified look */
  background: transparent;
}

.home-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  padding-bottom: 8px;
  border-bottom: none;
  background: transparent;  /* 🎨 TRANSPARENT: Let background show through! */
  flex-shrink: 0;
}

.home-branding {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-logo {
  width: 40px;  /* ✅ SAME SIZE as agent avatars! (was 28px) */
  height: 40px;
  border-radius: 10px;  /* Slightly rounded for logo */
  background: var(--rn-accent);
  color: var(--rn-surface);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 18px;  /* ✅ Larger font for bigger container */
  overflow: hidden;  /* Ensure image crops to rounded corners */
}

.home-team-avatars {
  display: flex;
  gap: -4px;  /* Overlap */
}

.team-avatar {
  position: relative;  /* For online indicator positioning */
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--rn-surface-accent);
  border: none;  /* ✅ No border - full 40x40 for image */
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  overflow: visible;  /* Allow green dot to overflow outside */
  flex-shrink: 0;
}

.team-avatar-img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}

/* ═══════════════════════════════════════════════════════════════
   OPTION B: ONLINE INDICATOR (Green Dot) - Oct 21, 2025
   ENHANCED: Größer und besser sichtbar!
   ═══════════════════════════════════════════════════════════════ */

.avatar-online-indicator {
  position: absolute !important;
  bottom: -2px !important;
  right: -2px !important;
  width: 12px !important;  /* ✅ Perfect size */
  height: 12px !important;
  background: #10b981 !important;  /* Bright green */
  border: 2px solid white !important;  /* ✅ Thinner border */
  border-radius: 50%;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6) !important;  /* Subtle glow */
  z-index: 999 !important;
  pointer-events: none;
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
}

/* Offline avatar (grayed out) */
.team-avatar-offline {
  opacity: 0.3;
  filter: grayscale(1);
}

/* Online avatar (full color, subtle pulse) */
.team-avatar-online {
  opacity: 1;
}

.home-content {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  background: transparent;  /* 🎨 TRANSPARENT: Background is on #home-panel now */
}

.home-greeting {
  font-size: 19px;  /* 🎨 LARGER: Better hierarchy (was 18px) */
  font-weight: 600;  /* 🎨 Semibold for presence */
  color: #000000;  /* 🎨 PURE BLACK: Maximum contrast */
  margin: 0;
  line-height: 1.3;
  letter-spacing: -0.025em;  /* 🎨 Slightly tighter for modern look */
}

/* Home-CTA-Card (Chat starten) */
.home-cta-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;  /* 🎨 UPGRADE: 12px → 16px for breathing room */
  background: #FFFFFF;  /* 🎨 PURE WHITE: Maximum contrast against gradient */
  border: 1px solid rgba(0, 0, 0, 0.06);  /* 🎨 SUBTLE BORDER: Defines edge clearly */
  border-radius: 12px;
  cursor: pointer;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);  /* 🎨 Smoother transition */
  
  /* 🎨 CLEAN SHADOW: Single layer, no blur effect */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  
  contain: layout style paint;  /* Performance optimization */
  will-change: transform;
}

.home-cta-card:hover {
  transform: translateY(-2px);  /* 🎨 Simple lift */
  border-color: rgba(0, 0, 0, 0.10);  /* 🎨 Darker border on hover */
  
  /* 🎨 CLEAN SHADOW: Clear elevation without blur */
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.home-cta-card:active {
  transform: translateY(-1px) scale(0.99);
}

.cta-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cta-title {
  font-size: 15px;  /* 🎨 Slightly larger for prominence */
  font-weight: 600;
  color: #000000;  /* 🎨 PURE BLACK: Maximum contrast */
  letter-spacing: -0.02em;  /* 🎨 Tight modern spacing */
  line-height: 1.2;
}

.cta-subtitle {
  font-size: 13px;
  font-weight: 500;  /* 🎨 Medium for better presence */
  color: #404040;  /* 🎨 DARKER: Better contrast (was gray-8) */
  letter-spacing: -0.01em;
}

.cta-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--rn-success);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
}

/* News-Section */
.home-news-section {
  display: flex;
  flex-direction: column;
  gap: 4px;  /* 🎨 TIGHT: Minimal gap between title and newsfeed */
}

.news-section-title {
  font-size: 14px;  /* 🎨 SLIGHTLY LARGER: Better hierarchy (was 13px) */
  font-weight: 600;
  color: #1A1A1A;  /* 🎨 DARKER: Better contrast (was gray-9) */
  margin: 0 0 4px 0;  /* 🎨 TIGHT: Minimal spacing (was 8px) */
  letter-spacing: -0.01em;
  text-transform: none;  /* Clean, not uppercase */
}

#news-cards-container {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* ===== NEWS-CARD (PREMIUM!) ===== */
.news-card {
  display: block;
  padding: 0;  /* 🎨 NO PADDING: Image goes edge-to-edge for magazine style! */
  margin-bottom: 0;
  background: #FFFFFF;
  border: 1px solid rgba(0, 0, 0, 0.08);  /* 🎨 DARKER BORDER */
  border-radius: 16px;  /* 🎨 MORE ROUNDED: 12px → 16px */
  overflow: hidden;  /* 🎨 For edge-to-edge image */
  
  /* 🎨 PREMIUM SHADOW: Multi-layer */
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.8) inset;
  
  cursor: pointer;
  user-select: none;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  contain: layout style paint;
  will-change: transform;
  
  /* Entrance-Animation */
  /* animation: slideUpFadeIn 300ms cubic-bezier(0.4, 0, 0.2, 1); */  /* 🎬 REPLACED BY GSAP */
  animation-fill-mode: both;
}

.news-card:hover {
  transform: translateY(-4px) scale(1.01);  /* 🎨 PREMIUM: More lift + scale */
  border-color: rgba(0, 0, 0, 0.12);
  
  /* 🎨 PREMIUM SHADOW: Ultra elevated */
  box-shadow: 
    0 4px 16px rgba(0, 0, 0, 0.08),
    0 12px 40px rgba(0, 0, 0, 0.06),
    0 2px 0 rgba(255, 255, 255, 1) inset;
}

.news-card:active {
  transform: translateY(-2px) scale(1);
}

.news-card-image {
  width: 100%;
  height: 160px;  /* 🎨 TALLER: 120px → 160px for magazine feel */
  border-radius: 0;  /* 🎨 SHARP CORNERS: Edge-to-edge! */
  object-fit: cover;
  margin-bottom: 0;  /* 🎨 No margin - content starts right below */
  background: linear-gradient(135deg, #F5F5F5 0%, #E5E5E5 100%);  /* 🎨 Gradient placeholder */
}

.news-card-content {
  display: flex;
  flex-direction: column;
  gap: 10px;  /* 🎨 MORE SPACE: 6px → 10px */
  padding: 16px;  /* 🎨 PADDING: Content has breathing room */
}

.news-card-title {
  font-size: 16px;  /* 🎨 BIGGER: 14px → 16px */
  font-weight: var(--font-weight-semibold);
  color: var(--rn-text);
  margin: 0;
  letter-spacing: var(--letter-spacing-tight);
  line-height: var(--line-height-snug);  /* 1.375 */
  
  /* Ellipsis after 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.news-card-description {
  font-size: 14px;  /* 🎨 BIGGER: 13px → 14px */
  font-weight: var(--font-weight-normal);
  color: var(--rn-text-secondary);
  line-height: var(--line-height-relaxed);  /* 1.625 */
  margin: 0;
  
  /* Ellipsis after 3 lines */
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ═══════════════════════════════════════════════════════════════
   NEWS CARD SUBTITLE (NEW! - Oct 21, 2025)
   Preview text below title
   ═══════════════════════════════════════════════════════════════ */

.news-card-subtitle {
  font-size: 12px;
  color: #1A1A1A;  /* 🎨 DARKER: Better contrast (was gray-600) */
  line-height: 1.5;  /* 🎨 BETTER READABILITY */
  margin-top: 4px;
  margin-bottom: 6px;
  font-weight: 500;
}

/* ═══════════════════════════════════════════════════════════════
   NEWS CARD CTA BUTTON (FIXED! - Oct 21, 2025)
   Purple gradient button matching Dashboard preview!
   ═══════════════════════════════════════════════════════════════ */

.news-card-cta-button {
  display: inline-block;
  width: 100%;
  margin-top: 12px;
  padding: 11px 18px;  /* 🎨 SLIGHTLY LARGER: Better presence */
  background: #17191a;  /* 🎨 MINIMAL: Professional dark, not gradient */
  color: white !important;
  font-size: 13px;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 10px;  /* 🎨 SLIGHTLY MORE ROUNDED (was 8px) */
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  
  /* 🎨 ENHANCED SHADOW: More dramatic */
  box-shadow: 
    0 3px 8px rgba(0, 0, 0, 0.18),
    0 6px 16px rgba(0, 0, 0, 0.14);
  
  letter-spacing: -0.01em;
}

.news-card-cta-button:hover {
  transform: translateY(-2px);
  background: #222527;  /* 🎨 Slightly lighter on hover */
  
  /* 🎨 DRAMATIC SHADOW on hover */
  box-shadow: 
    0 5px 14px rgba(0, 0, 0, 0.22),
    0 10px 28px rgba(0, 0, 0, 0.18);
}

.news-card-cta-button:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.18),
    0 4px 12px rgba(0, 0, 0, 0.14);
}

/* ═══════════════════════════════════════════════════════════════
   OLD CTA LINK STYLE (Deprecated - kept for backward compatibility)
   ═══════════════════════════════════════════════════════════════ */

.news-card-cta {
  font-size: 13px;
  font-weight: 600;
  color: #0284C7;  /* Primary-600 */
  display: inline-flex;
  align-items: center;
  gap: 4px;
  text-decoration: none;
  margin-top: 4px;
  transition: color 120ms;
}

.news-card-cta::after {
  content: '→';
  font-size: 14px;
  transition: transform 120ms;
}

.news-card:hover .news-card-cta {
  color: #0369A1;  /* Primary-700 */
}

.news-card:hover .news-card-cta::after {
  transform: translateX(2px);  /* Arrow-slides! */
}

/* ===== CONVERSATIONS-TAB ===== */
#conversations-panel {
  display: flex;
  flex-direction: column;
  padding: 0;
  
  /* 🎨 UNIFIED BACKGROUND: Same grain texture as Home tab */
  background: 
    url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><filter id="conv-noise"><feTurbulence type="fractalNoise" baseFrequency="0.9" numOctaves="4" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23conv-noise)" opacity="0.02"/></svg>'),
    linear-gradient(180deg, rgba(250, 250, 250, 0.5) 0%, rgba(255, 255, 255, 1) 100%);
  background-size: 200px 200px, 100%;
  background-position: 0 0, 0 0;
}

.conversations-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;  /* 🎨 CONSISTENT: Match home-header (was 10px 14px) */
  border-bottom: none;  /* 🎨 BORDERLESS: Cleaner aesthetic */
  flex-shrink: 0;
  background: transparent;  /* Ensure no white block */
}

.conversations-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--rn-text);
  margin: 0;
}

.conversations-content {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
}

#conversations-list {
  flex: 1;
}

/* ===== CONVERSATION-CARD ===== */
.conversation-card {
  padding: 18px;  /* 🎨 MORE PADDING: 16px → 18px */
  border-bottom: none;
  background: transparent;
  border-radius: 12px;  /* 🎨 MORE ROUNDED: 8px → 12px */
  margin: 0 12px 6px 12px;  /* 🎨 MORE SPACE: 8px/4px → 12px/6px */
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: all 250ms cubic-bezier(0.4, 0, 0.2, 1);
  border: 1px solid transparent;  /* 🎨 For hover border */
}

.conversation-card:hover {
  background: #FFFFFF;  /* 🎨 SOLID WHITE */
  border-color: rgba(0, 0, 0, 0.08);
  box-shadow: 
    0 2px 8px rgba(0, 0, 0, 0.06),
    0 8px 24px rgba(0, 0, 0, 0.04),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;  /* 🎨 PREMIUM */
  transform: translateX(4px) translateY(-1px);  /* 🎨 Slide + lift */
}

.conversation-card:active {
  background: var(--gray-2);
  transform: scale(0.99);
  box-shadow: 
    0 1px 2px rgba(0, 0, 0, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.5) inset;
}

.conversation-card:focus-visible {
  outline: 2px solid var(--gray-12);
  outline-offset: -2px;
}

.conversation-card.unread {
  background: var(--gray-1);  /* Subtle-gray, not blue! */
  font-weight: 600;
  border-left: 3px solid var(--danger);  /* Red-accent for unread! */
  padding-left: 11px;
}

.conversation-card:last-child {
  border-bottom: none;
}

.conversation-header {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
}

.unread-indicator {
  width: 6px;
  height: 6px;
  background: #EF4444;  /* Danger */
  border-radius: 50%;
  flex-shrink: 0;
}

.conversation-timestamp {
  font-size: 11px;
  color: var(--rn-text-tertiary);
  font-weight: 500;
}

.conversation-preview {
  font-size: 14px;
  color: var(--rn-text-secondary);
  line-height: 1.375;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-card.unread .conversation-preview {
  color: var(--rn-text);
}

.conversation-meta {
  font-size: 10px;
  color: var(--rn-text-tertiary);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.conversation-sender {
  font-weight: 500;
  color: var(--rn-text-secondary);
}

.conversation-count {
  color: var(--rn-text-tertiary);
}

.conversation-status {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 600;
}

.conversation-status.active {
  background: #D1FAE5;  /* Success-light */
  color: #065F46;       /* Success-dark */
}

.conversation-status.closed {
  background: var(--rn-surface-accent);
  color: var(--rn-text-secondary);
}

/* Load-More-Button */
.load-more-btn {
  padding: 12px;
  margin: 12px 14px;
  background: transparent;
  border: 1px solid var(--rn-border);
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--rn-text-secondary);
  cursor: pointer;
  transition: all 120ms;
}

.load-more-btn:hover {
  background: var(--rn-surface-hover);
  border-color: var(--rn-border-strong);
}

/* ===== EMPTY-STATES ===== */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  text-align: center;
  min-height: 400px;
}

.empty-state-icon {
  font-size: 48px;
  margin-bottom: 16px;
  opacity: 0.4;  /* 🔥 ENHANCED: More subtle (was 0.6) */
  filter: grayscale(0.5);  /* 🔥 NEW: Desaturated for minimal look */
}

.empty-state-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--gray-12);  /* 🔥 ENHANCED: Pure black for emphasis */
  margin: 0 0 8px 0;
  letter-spacing: -0.01em;  /* 🔥 NEW: Tighter tracking */
}

.empty-state-description {
  font-size: 14px;
  color: var(--gray-7);  /* 🔥 ENHANCED: Using design token */
  line-height: 1.5;
  margin: 0 0 20px 0;
  max-width: 280px;
}

.empty-state-cta {
  padding: 12px 24px;
  background: #17191a;  /* 🎨 MINIMAL: Professional dark */
  color: white;
  border: none;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 200ms cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 6px rgba(0, 0, 0, 0.15),
    0 4px 12px rgba(0, 0, 0, 0.12);
}

.empty-state-cta:hover {
  background: #222527;  /* 🎨 Slightly lighter */
  transform: translateY(-2px) scale(1.02);
  box-shadow: 
    0 4px 10px rgba(0, 0, 0, 0.20),
    0 8px 24px rgba(0, 0, 0, 0.18);
}

/* ===== COMPACT-DESIGN-ADJUSTMENTS (Woche 3.0 - Kompakter!) ===== */
/* Messages kompakter */
#replainow-chat-window.multi-tab-mode .chat-message {
  font-size: 14px;         /* 15px → 14px */
  padding: 12px 16px;      /* 🔥 FIXED: Perfect 8px grid */
}

#replainow-chat-window.multi-tab-mode .chat-header {
  height: 64px;            /* 🔥 FIXED: Fixed height on 8px grid */
  padding: 16px;           /* 🔥 FIXED: Perfect 16px padding */
}

#replainow-chat-window.multi-tab-mode .chat-title-text {
  font-size: 15px;         /* 16px → 15px */
}

/* Multi-tab mode - keep 40px avatars */
#replainow-chat-window.multi-tab-mode .chat-header img,
#replainow-chat-window.multi-tab-mode .chat-avatar-fallback,
#replainow-chat-window.multi-tab-mode .chat-avatar-ai-fallback,
#replainow-chat-window.multi-tab-mode .ai-avatar {
  width: 40px;  /* ✅ 40px everywhere */
  height: 40px;
}

#replainow-chat-window.multi-tab-mode .chat-product-name {
  font-size: 14px;         /* 16px → 14px */
}

/* ===== RESPONSIVE (MOBILE) ===== */
@media (max-width: 767px) {
  /* Tabs: Larger-touch-targets + iOS Safe Areas */
  .widget-tabs {
    height: 80px;  /* 🔥 INCREASED: 56px → 80px (Design Spec!) */
    padding: 12px 8px;
    padding-bottom: max(12px, env(safe-area-inset-bottom));  /* 🍎 iOS Safe Area (iPhone Home Indicator!) */
    border-radius: 0;  /* No border-radius on mobile fullscreen */
  }
  
  .widget-tab {
    padding: 10px 8px;
    min-height: 56px;  /* 🔥 Touch-target 56px (Apple HIG 2025!) */
  }
  
  .widget-tab-icon {
    width: 28px !important;    /* 🔥 BIGGER: 24px → 28px (better touch target) */
    height: 28px !important;
    min-width: 28px;
    min-height: 28px;
  }
  
  /* Fonts: +1px for readability */
  #replainow-chat-window.multi-tab-mode .chat-message {
    font-size: 15px;   /* 14px → 15px */
  }
  
  #replainow-chat-window.multi-tab-mode .news-card-title {
    font-size: 15px;   /* 14px → 15px */
  }
  
  /* Images: Bigger */
  .news-card-image {
    height: 140px;     /* 120px → 140px */
  }
  
  /* Home-Header with Safe-Area */
  .home-header {
    padding-top: calc(10px + env(safe-area-inset-top));
  }
  
  /* 🔥 PHASE 3: Enhanced Mobile Touch Targets */
  .conversation-card {
    padding: 16px;  /* More breathing room on mobile */
    min-height: 60px;  /* Comfortable tap area */
  }
  
  .news-card {
    padding: 16px;  /* More padding on mobile */
  }
  
  .home-cta-card {
    padding: 16px;
    min-height: 56px;
  }
  
  /* Buttons: Larger touch areas */
  button {
    min-width: 44px;
    min-height: 44px;
  }
  
  #send-button {
    min-width: 48px !important;
    min-height: 48px !important;
  }
}

/* 🔥 PHASE 3: REDUCED MOTION SUPPORT (Accessibility!) */
/* Respects user's OS preference for 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;
  }
  
  /* Disable shimmer on skeletons */
  .skeleton {
    animation: none !important;
    background: var(--gray-2);
  }
  
  /* Disable transforms on hover/active */
  .news-card:hover,
  .home-cta-card:hover,
  .conversation-card:hover {
    transform: none !important;
  }
  
  .conversation-card:active,
  #send-button:active {
    transform: none !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ⚡ WIDGET 3.0: HEROICONS SVG-STYLING (Professional!)
   ═══════════════════════════════════════════════════════════════════════════ */

/* 🎨 REMOVED: Old duplicate tab icon definitions - Using modern BLACK definitions above (line ~2859-2900) */

/* Close-Icons (X-Mark) */
.close-icon {
  width: 18px;
  height: 18px;
  stroke: var(--gray-8);
  transition: stroke 120ms;
}

.chat-close-btn:hover .close-icon {
  stroke: var(--gray-12);
}

/* Input-Icons (Paperclip, Smile) */
.input-icon {
  width: 20px;  /* 🎨 Standard size for crisp rendering */
  height: 20px;
  /* Let SVG attributes control appearance */
  transition: transform 120ms;
  shape-rendering: geometricPrecision;  /* Anti-aliasing */
  -webkit-font-smoothing: antialiased;
}

.chat-attachment-btn:hover .input-icon,
.emoji-btn:hover .input-icon {
  transform: scale(1.1);  /* Just scale on hover */
}

/* Send-Icon (Paper-Airplane) */
.send-icon {
  width: 18px;
  height: 18px;
  stroke: white;  /* White on green-button */
}

/* CTA-Icon (Sparkles - AI) */
.cta-icon-svg {
  width: 28px;
  height: 28px;
  stroke: var(--gray-12);  /* 🎨 MINIMAL: Simple black stroke */
  transition: transform 200ms;
}

.home-cta-card:hover .cta-icon-svg {
  transform: scale(1.1) rotate(5deg);  /* 🎨 Playful on hover */
}

/* Section-Icon (Newspaper) */
.section-icon {
  display: none;  /* 🎨 REMOVED: Icon not needed, text is clear enough */
}

/* Empty-State-Icon */
.empty-state-icon {
  width: 48px;
  height: 48px;
  stroke: var(--gray-5);  /* Very-subtle */
  margin-bottom: 16px;
}

/* Team-Avatar-Icons */
.avatar-icon {
  width: 16px;
  height: 16px;
  stroke: var(--gray-7);
}

/* CTA-Arrow */
.cta-arrow {
  width: 16px;
  height: 16px;
  stroke: currentColor;
  margin-left: 4px;
  transition: transform 120ms;
}

.empty-state-cta:hover .cta-arrow {
  transform: translateX(2px);  /* Arrow-slides! */
}

/* ═══════════════════════════════════════════════════════════════════════════
   ⚡ FONT-WEIGHT-CLEANUP (Only 2 Weights!)
   ═══════════════════════════════════════════════════════════════════════════ */

/* ELIMINATE Medium (500) and Bold (700) - Use only Regular (400) + Semibold (600) */

.widget-tab-label,
.news-card-title,
.conversation-sender,
.cta-title,
.empty-state-cta,
.news-section-title,
.conversations-title {
  font-weight: 600;  /* Semibold-only! */
}

/* Everything else: Regular (400) - already default */

/* ═══════════════════════════════════════════════════════════════════════════
   ⚡ CONVERSATION-CARD ENHANCEMENTS (Name + Ticket)
   ═══════════════════════════════════════════════════════════════════════════ */

.conversation-name {
  font-weight: 600;
  font-size: 14px;
  color: var(--rn-text);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.conversation-ticket {
  font-size: 12px;
  font-weight: 600;
  color: var(--gray-7);
  background: var(--gray-2);
  padding: 2px 8px;
  border-radius: 4px;
  flex-shrink: 0;
}

.conversation-timestamp {
  font-size: 12px;
  color: var(--rn-text-tertiary);
  margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ⚡ CHAT-CLOSED-BANNER (Read-Only Conversations)
   ═══════════════════════════════════════════════════════════════════════════ */

.chat-closed-banner {
  padding: 16px;
  background: var(--gray-1);
  border-top: 1px solid var(--gray-3);
  margin-top: auto;  /* Push to bottom */
}

.closed-banner-content {
  display: flex;
  align-items: center;
  gap: 12px;
}

.closed-icon {
  width: 24px;
  height: 24px;
  color: var(--success);
  flex-shrink: 0;
  stroke-width: 2;
}

.closed-text {
  flex: 1;
}

.closed-text strong {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-12);
  margin-bottom: 4px;
}

.closed-text p {
  font-size: 13px;
  color: var(--gray-8);
  margin: 0;
  line-height: 1.4;
}

.closed-new-chat-btn {
  padding: 8px 16px;
  background: var(--gray-12);
  color: white;
  border: none;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 120ms ease;
  white-space: nowrap;
}

.closed-new-chat-btn:hover {
  background: var(--gray-11);
  transform: translateY(-1px);
}

.closed-new-chat-btn:active {
  transform: translateY(0);
}

/* ═══════════════════════════════════════════════════════════════════════════
   🎁 DISCOUNT CARD - Enterprise Professional Design
   ═══════════════════════════════════════════════════════════════════════════
   Clean, universal design for 50,000+ Shopify merchants
   NO emojis - Professional icons only
   ═══════════════════════════════════════════════════════════════════════════ */

.discount-card-widget {
  background: white;
  border: 1px solid rgba(16, 185, 129, 0.3);
  border-radius: 12px;
  padding: 16px;
  max-width: 380px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: all 0.2s ease;
  margin-bottom: 12px;
}

/* Header */
.discount-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.discount-icon-professional {
  width: 36px;
  height: 36px;
  background: rgba(16, 185, 129, 0.1);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #10b981;
}

.discount-icon-professional svg {
  width: 16px;
  height: 16px;
}

.discount-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.01em;
}

.discount-value {
  margin: 2px 0 0 0;
  font-size: 12px;
  font-weight: 600;
  color: #10b981;
}

/* Code Section - Clean & Professional */
.discount-code-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.discount-code-label {
  margin: 0 0 8px 0;
  font-size: 10px;
  font-weight: 600;
  color: #6b7280;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.discount-code-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.discount-code {
  flex: 1;
  font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
  font-size: 16px;
  font-weight: 600;
  color: #111827;
  letter-spacing: 0.05em;
  word-break: break-all;
  user-select: all;
}

.discount-copy-btn {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  background: white;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  color: #6b7280;
}

.discount-copy-btn:hover {
  background: #f8fafc;
  border-color: #10b981;
  color: #10b981;
}

.discount-copy-btn:active {
  transform: scale(0.95);
}

.discount-copy-btn.copied {
  background: rgba(16, 185, 129, 0.1);
  border-color: #10b981;
  color: #10b981;
}

/* Details */
.discount-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.discount-detail {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: #6b7280;
}

.discount-detail svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}

.discount-urgent-item {
  color: #dc2626;
  font-weight: 600;
}

.discount-urgent {
  color: #dc2626;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .discount-card-widget {
    max-width: 100%;
  }
  
  .discount-code {
    font-size: 20px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   CHECKOUT LINK CARD - Enterprise Professional Design
   ═══════════════════════════════════════════════════════════════
   Conversion-optimized design
   Clear action, build trust, reduce friction
   ═══════════════════════════════════════════════════════════════ */

.checkout-card-widget {
  background: white;
  border: 1px solid #bfdbfe;
  border-radius: 12px;
  padding: 16px;
  max-width: 400px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  margin-bottom: 12px;
}

/* Header */
.checkout-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
}

.checkout-icon-professional {
  width: 36px;
  height: 36px;
  background: #dbeafe;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #2563eb;
}

.checkout-icon-professional svg {
  width: 16px;
  height: 16px;
}

.checkout-title h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #111827;
  letter-spacing: -0.01em;
}

.checkout-subtitle {
  margin: 2px 0 0 0;
  font-size: 12px;
  color: #6b7280;
}

/* Products Section */
.checkout-products-section {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 12px;
}

.checkout-product-row {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 6px;
}

.checkout-product-row:last-child {
  margin-bottom: 0;
}

.checkout-product-name {
  flex: 1;
  color: #111827;
  line-height: 1.4;
}

.checkout-product-price {
  font-weight: 500;
  color: #6b7280;
  white-space: nowrap;
}

.checkout-more-items {
  margin: 8px 0 0 0;
  padding-top: 8px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  color: #6b7280;
}

/* Discount Row */
.checkout-discount-row {
  display: flex;
  justify-content: space-between;
  padding-top: 8px;
  margin-top: 8px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
}

.checkout-discount-label {
  color: #10b981;
  font-weight: 600;
}

.checkout-discount-value {
  color: #10b981;
  font-weight: 700;
}

/* Total */
.checkout-total {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0 12px 0;
  border-top: 1px solid #e2e8f0;
  margin-bottom: 12px;
}

.checkout-total-label {
  font-size: 14px;
  font-weight: 600;
  color: #111827;
}

.checkout-total-value {
  font-size: 18px;
  font-weight: 700;
  color: #111827;
}

/* CTA Button - HERO ELEMENT! */
.checkout-cta-button {
  width: 100%;
  height: 44px;
  background: #2563eb;
  color: white;
  border: none;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2);
}

.checkout-cta-button:hover {
  background: #1d4ed8;
  box-shadow: 0 4px 8px rgba(37, 99, 235, 0.3);
  transform: translateY(-1px);
}

.checkout-cta-button:active {
  transform: translateY(0);
  box-shadow: 0 1px 2px rgba(37, 99, 235, 0.2);
}

.checkout-cta-button svg:first-child {
  width: 16px;
  height: 16px;
}

.checkout-cta-button svg:last-child {
  width: 14px;
  height: 14px;
  margin-left: auto;
}

/* Trust Signals */
.checkout-trust-signals {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.checkout-trust-item {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  color: #6b7280;
}

.checkout-trust-item svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* Mobile Responsive */
@media (max-width: 600px) {
  .checkout-card-widget {
    max-width: 100%;
  }
  
  .checkout-cta-button {
    height: 48px;
    font-size: 16px;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   🔥 INTERCOM-STYLE NOTIFICATION POPUP SYSTEM - MOBILE RESPONSIVE
   ═══════════════════════════════════════════════════════════════════════════
   Version: 1.0
   Date: October 25, 2025
   Quality: World-Class (Intercom/Linear/Stripe-level)
   Design: 100% Design System v3.0 Compliant
   ═══════════════════════════════════════════════════════════════════════════ */

/* Mobile Responsive - Notification Popups */
@media (max-width: 600px) {
  .notification-popup-card {
    /* Full width on mobile with margin */
    left: 16px !important;
    right: 16px !important;
    width: auto !important;
    max-width: none !important;
    border-radius: 12px !important;
    
    /* Positioned above bubble */
    bottom: 90px !important;
  }
  
  /* Ensure touch targets are large enough (44px minimum) */
  .notification-close {
    width: 44px !important;
    height: 44px !important;
    font-size: 24px !important;
  }
}

/* Tablet size optimization */
@media (min-width: 601px) and (max-width: 900px) {
  .notification-popup-card {
    width: 340px !important;
    border-radius: 12px !important;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ⚡ END WIDGET 3.0 STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
