.ask-lekha-fab {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 16000;
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff7a1a, #ff6600);
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 102, 0, 0.38);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
  cursor: pointer;
}

.ask-lekha-fab:hover { filter: brightness(1.05); }
.ask-lekha-fab.open { background: #1f1f2e; box-shadow: 0 8px 20px rgba(15, 23, 42, 0.28); }

.ask-lekha-panel {
  position: fixed;
  right: 22px;
  bottom: 88px;
  z-index: 16000;
  width: min(400px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 120px));
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 16px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, 0.16);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ask-lekha-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem;
  background: #1f1f2e;
  color: #fff;
}

.ask-lekha-head strong { display: block; font-size: 0.95rem; }
.ask-lekha-provider {
  display: inline-block;
  margin-top: 0.15rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #ffb380;
}

.ask-lekha-close {
  border: 0;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.ask-lekha-body {
  flex: 1;
  overflow: auto;
  padding: 0.9rem;
  background: #f7f7f8;
}

.ask-lekha-msg { margin-bottom: 0.75rem; }
.ask-lekha-msg.user { text-align: right; }

.ask-lekha-bubble {
  display: inline-block;
  max-width: 92%;
  text-align: left;
  white-space: pre-wrap;
  padding: 0.65rem 0.8rem;
  border-radius: 12px;
  font-size: 0.86rem;
  line-height: 1.45;
  background: #fff;
  border: 1px solid #ececec;
  color: #111827;
}

.ask-lekha-msg.user .ask-lekha-bubble {
  background: #fff4eb;
  border-color: #ffd7b8;
}

.ask-lekha-bubble.muted { color: #6b7280; }

.ask-lekha-links,
.ask-lekha-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  margin-top: 0.45rem;
}

.ask-lekha-links button,
.ask-lekha-chips button {
  border: 1px solid #fdba8c;
  background: #fff;
  color: #c2410c;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
}

.ask-lekha-chips {
  padding: 0.55rem 0.8rem 0;
  margin: 0;
  border-top: 1px solid #f3f4f6;
}

.ask-lekha-form {
  display: flex;
  gap: 0.45rem;
  padding: 0.7rem 0.8rem 0.85rem;
  border-top: 1px solid #f3f4f6;
}

.ask-lekha-form input {
  flex: 1;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  font-size: 0.86rem;
}

.ask-lekha-form button {
  width: 40px;
  border: 0;
  border-radius: 10px;
  background: #ff6600;
  color: #fff;
}

.ask-lekha-form button:disabled { opacity: 0.5; }

.ask-lekha-mic {
  background: #1f1f2e !important;
}

.ask-lekha-mic.listening {
  background: #dc2626 !important;
  animation: ask-lekha-pulse 1s ease-in-out infinite;
}

.ask-lekha-lang {
  width: 36px !important;
  background: #fff !important;
  color: #c2410c !important;
  border: 1px solid #fdba8c !important;
  font-size: 0.72rem;
  font-weight: 700;
}

.ask-lekha-speech-error {
  margin: 0;
  padding: 0 0.8rem;
  font-size: 0.72rem;
  color: #b91c1c;
}

@keyframes ask-lekha-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}

.item-ai-assist {
  border: 1px solid #ece7e0;
  background: #fffaf6;
  border-radius: 10px;
  padding: 0.7rem 0.85rem;
}

.item-ai-assist-head {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.item-ai-assist-head i { color: #ff6600; }
.item-ai-assist-head strong { color: #1f1f2e; font-size: 0.86rem; }
.item-ai-assist-head span { color: #6b7280; font-size: 0.75rem; flex: 1 1 12rem; }
.item-ai-assist-head .btn { margin-left: auto; }

.item-ai-assist-reply,
.item-ai-assist-similar {
  margin: 0.45rem 0 0;
  white-space: pre-wrap;
  font-size: 0.8rem;
  color: #374151;
}

.item-ai-assist-error,
.item-ai-assist-warn {
  margin: 0.45rem 0 0;
  font-size: 0.8rem;
  color: #b45309;
}

.item-ai-assist-error { color: #b91c1c; }

.item-ai-assist-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.55rem;
}
