:root {
  --lm-ai-color: #111827;
  --lm-pulse-color: rgba(17, 24, 39, 0.15);
}

#logomish-ai-root {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 999999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}

/* ===== LAUNCHER BUTTON ANIMATIONS ===== */
#logomish-ai-launcher {
  border: 0;
  border-radius: 999px;
  background: var(--lm-ai-color);
  color: #fff;
  padding: 10px 15px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  cursor: pointer;
  font-weight: 600;
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Bounce animation - runs on load and then periodically */
#logomish-ai-launcher.bounce {
  animation: launcherBounce 0.8s ease;
}

/* Pulse ring effect */
#logomish-ai-launcher::before {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid var(--lm-ai-color);
  opacity: 0;
  animation: pulseRing 2.5s ease-out infinite;
}

/* Second pulse ring with delay */
#logomish-ai-launcher::after {
  content: '';
  position: absolute;
  inset: -6px;
  border-radius: 999px;
  border: 2px solid var(--lm-ai-color);
  opacity: 0;
  animation: pulseRing 2.5s ease-out 0.8s infinite;
}

/* Hover effect */
#logomish-ai-launcher:hover {
  transform: scale(1.05);
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.4);
}

/* Active/click effect */
#logomish-ai-launcher:active {
  transform: scale(0.95);
}

/* ===== ANIMATIONS ===== */

/* Bounce animation */
@keyframes launcherBounce {
  0% { transform: scale(1); }
  10% { transform: scale(1.2); }
  30% { transform: scale(0.9); }
  50% { transform: scale(1.1); }
  70% { transform: scale(0.95); }
  100% { transform: scale(1); }
}

/* Pulse ring animation */
@keyframes pulseRing {
  0% {
    transform: scale(1);
    opacity: 1;
  }
  100% {
    transform: scale(1.8);
    opacity: 0;
  }
}

/* Subtle floating animation (always on) */
#logomish-ai-launcher.float {
  animation: float 3s ease-in-out infinite;
}

@keyframes float {
  0%, 100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* ===== CHAT PANEL ===== */

.lm-avatar {
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #fff;
  color: var(--lm-ai-color);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}

.lm-avatar.big {
  width: 36px;
  height: 36px;
}

/* Avatar pulse in header */
.lm-avatar.big {
  animation: avatarPulse 3s ease-in-out infinite;
}

@keyframes avatarPulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.3);
  }
  50% {
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.1);
  }
}

#logomish-ai-panel {
  width: 390px;
  max-width: calc(100vw - 20px);
  height: 570px;
  max-height: calc(100vh - 25px);
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  border: 1px solid #e5e7eb;
  animation: panelSlideUp 0.3s ease;
}

@keyframes panelSlideUp {
  0% {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lm-hidden {
  display: none !important;
}

/* ===== REST OF STYLES (unchanged) ===== */

#logomish-ai-panel header {
  background: var(--lm-ai-color);
  color: #fff;
  padding: 13px 14px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.lm-profile {
  display: flex;
  gap: 10px;
  align-items: center;
}

.lm-profile b {
  display: block;
  font-size: 15px;
}

.lm-profile small {
  display: block;
  opacity: .72;
  font-size: 10px;
}

#lm-close {
  background: transparent;
  color: #fff;
  border: 0;
  font-size: 25px;
  cursor: pointer;
  transition: transform 0.2s ease;
}

#lm-close:hover {
  transform: rotate(90deg);
}

#lm-messages {
  flex: 1;
  overflow-y: auto;
  padding: 13px;
  background: #f8fafc;
}

.lm-msg {
  max-width: 90%;
  padding: 10px 12px;
  margin: 8px 0;
  border-radius: 13px;
  line-height: 1.48;
  font-size: 13px;
  animation: messageIn 0.3s ease;
}

@keyframes messageIn {
  0% {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.lm-msg.assistant {
  background: #fff;
  color: #111827;
  border: 1px solid #e5e7eb;
  margin-right: auto;
}

.lm-msg.user {
  background: var(--lm-ai-color);
  color: #fff;
  margin-left: auto;
  white-space: pre-wrap;
}

.lm-msg p {
  margin: 0 0 8px;
}

.lm-msg p:last-child {
  margin-bottom: 0;
}

.lm-msg h3 {
  font-size: 15px;
  margin: 2px 0 8px;
}

.lm-msg h4 {
  font-size: 14px;
  margin: 2px 0 7px;
}

.lm-msg ul,
.lm-msg ol {
  margin: 6px 0 8px 19px;
  padding: 0;
}

.lm-msg li {
  margin: 4px 0;
}

.lm-msg.typing {
  opacity: .7;
  font-style: italic;
}

.lm-msg.typing::after {
  content: '...';
  animation: typingDots 1.5s steps(4, end) infinite;
}

@keyframes typingDots {
  0% { content: ''; }
  25% { content: '.'; }
  50% { content: '..'; }
  75% { content: '...'; }
}

#lm-services {
  padding: 8px 12px 4px;
  display: flex;
  flex-wrap: wrap;
  gap: 3px 9px;
  background: #fff;
  border-top: 1px solid #eef0f3;
}

#lm-services button {
  border: 0;
  background: transparent;
  color: #374151;
  padding: 3px 0;
  cursor: pointer;
  font-size: 11px;
  line-height: 1.3;
  transition: color 0.2s ease, transform 0.2s ease;
  position: relative;
}

#lm-services button:hover {
  color: var(--lm-ai-color);
  transform: translateX(3px);
}

#lm-services button::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--lm-ai-color);
  transition: width 0.3s ease;
}

#lm-services button:hover::after {
  width: 100%;
}

#lm-services .help {
  font-weight: 700;
}

.lm-input {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    gap: 12px; /* Space between buttons and input */
    background-color: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.lm-input input {
  flex: 1;
  min-width: 0;
  border: 1px solid #d1d5db;
  border-radius: 10px;
  padding: 9px 10px;
  outline: 0;
  font-size: 13px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.lm-input input:focus {
  border-color: var(--lm-ai-color);
  box-shadow: 0 0 0 3px var(--lm-pulse-color);
}

.lm-input button {
  width: 39px;
  border: 0;
  border-radius: 10px;
  background: var(--lm-ai-color);
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease;
}

.lm-input button:hover {
  transform: scale(1.05);
}

.lm-input button:active {
  transform: scale(0.9);
}

#lm-mic.recording {
  background: #dc2626;
  animation: micPulse 0.8s ease-in-out infinite;
}

@keyframes micPulse {
  0%, 100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.1);
  }
}

#logomish-ai-panel footer {
  display: flex;
  justify-content: space-between;
  padding: 3px 12px 8px;
  font-size: 9px;
  color: #9ca3af;
}

#lm-voice {
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 10px;
  cursor: pointer;
  transition: color 0.2s ease;
}

#lm-voice:hover {
  color: var(--lm-ai-color);
}

/* --- BUTTONS (Mic & Send) --- */
#lm-mic, #lm-send {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;        /* Make the clickable square area nice and big */
    height: 44px;
    border-radius: 50%; /* Makes them circular */
    background-color: #111827; /* Dark background to match your theme */
    color: #ffffff;      /* White icon color */
    font-size: 22px;     /* 🔥 THIS MAKES THE EMOJIS BIGGER! */
    transition: all 0.2s ease;
}

/* Hover effects */
#lm-mic:hover, #lm-send:hover {
    background-color: #374151; /* Slightly lighter dark on hover */
    transform: scale(1.08);    /* Gives a gentle 'pop' effect */
}

/* TEXTAREA INPUT FIELD STYLING */
#lm-input {
    flex-grow: 1;       /* Fills remaining space */
    width: 100%;        /* Ensures it stretches */
    border: 1px solid #d1d5db;
    border-radius: 8px;
    outline: none;
    background: #ffffff;
    font-family: inherit; /* Keeps your site's font */
    
    /* ⚡ LARGER SIZE SETTINGS ⚡ */
    font-size: 18px;    /* Much larger text for easier reading */
    padding: 12px 16px; /* Extra internal spacing so text isn't cramped */
    min-height: 70px;   /* Forces it to be roughly double the standard height */
    resize: none;       /* Prevents user from dragging the corner to resize */
    box-sizing: border-box; 
}

#lm-input:focus {
    border-color: #111827;
}

/* SCROLLBAR FOR THE TEXTAREA (Optional - keeps it clean) */
#lm-input::-webkit-scrollbar {
    width: 6px;
}
#lm-input::-webkit-scrollbar-thumb {
    background-color: #d1d5db;
    border-radius: 4px;
}
#lm-input:focus {
    border-color: #111827; /* Dark border when typing */
}

/* ===== RTL SUPPORT ===== */
.lm-rtl #logomish-ai-panel {
    direction: rtl;
}

.lm-rtl .lm-msg.assistant {
    margin-right: 0;
    margin-left: auto;
}

.lm-rtl .lm-msg.user {
    margin-left: 0;
    margin-right: auto;
}

.lm-rtl .lm-profile {
    flex-direction: row-reverse;
}

.lm-rtl #lm-services {
    flex-direction: row-reverse;
}

.lm-rtl .lm-input {
    flex-direction: row-reverse;
}

.lm-rtl #lm-close {
    margin-right: auto;
    margin-left: 0;
}

/* Arabic/Urdu text styling */
.lm-rtl .lm-msg {
    font-family: 'Noto Sans Arabic', 'Scheherazade New', 'Amiri', 'Lateef', 'Droid Arabic Naskh', serif;
    line-height: 1.8;
}

.lm-rtl .lm-input input {
    font-family: 'Noto Sans Arabic', 'Scheherazade New', 'Amiri', 'Lateef', serif;
}

/* Hebrew text styling */
.lm-msg[lang="he"] {
    font-family: 'Noto Sans Hebrew', 'David', 'FrankRuehl', serif;
}

/* Hindi text styling */
.lm-msg[lang="hi"] {
    font-family: 'Noto Sans Devanagari', 'Mangal', 'Krutidev', serif;
}

/* ===== TYPING INDICATOR DOTS ===== */
.lm-msg.assistant.typing {
  color: #6b7280;
}



/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  #logomish-ai-root {
    right: 7px;
    bottom: 7px;
    left: 7px;
  }
  
  #logomish-ai-launcher {
    margin-left: auto;
  }
  
  #logomish-ai-panel {
    width: 100%;
    max-width: none;
    height: min(650px, calc(100vh - 14px));
  }
  
  /* Disable float on mobile for better UX */
  #logomish-ai-launcher.float {
    animation: none;
  }
}