:root {
  --bella-primary: #0a84ff;
  --bella-bg: #ffffff;
  --bella-text: #111827;
  --bella-muted: #6b7280;
  --bella-border: #e5e7eb;
  --bella-bot: #f2f2f7;
  --shadow: 0 10px 25px rgba(0,0,0,.08);
  --radius: 18px;
}

/* launcher */
.bella-launcher {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 2147483000;
  background: var(--bella-primary);
  color: #fff;
  border: none;
  border-radius: 999px;
  width: 56px;
  height: 56px;
  box-shadow: var(--shadow);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-weight: 700;
}

/* panel animációval */
.bella-panel {
  position: fixed;
  right: 16px;
  bottom: 84px;
  width: 360px;
  max-height: 70vh;
  background: var(--bella-bg);
  color: var(--bella-text);
  border: 1px solid var(--bella-border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  z-index: 2147483000;
  display: flex;
  flex-direction: column;

  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity .24s cubic-bezier(.22,.61,.36,1),
              transform .24s cubic-bezier(.22,.61,.36,1);
}
.bella-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* mobil */
@media (max-width: 640px) {
  .bella-panel {
    left: 8px;
    right: 8px;
    bottom: 8px;
    width: auto;
    max-height: 85vh;
    border-radius: 22px;
  }
  .bella-launcher {
    right: 12px;
    bottom: 12px;
  }
}

/* header */
.bella-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--bella-border);
  background: rgba(242,242,247,.6);
  backdrop-filter: saturate(180%) blur(20px);
}
.bella-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--bella-primary);
  color: #fff; display: grid; place-items: center; font-weight: 700;
}
.bella-title { font-weight: 700; }
.bella-sub   { color: var(--bella-muted); font-size: 12px; }

/* messages */
.bella-messages {
  flex: 1;
  overflow: auto;
  padding: 12px;
  background: linear-gradient(180deg, rgba(0,0,0,0.02), rgba(0,0,0,0)) #fff;
}
.bella-row {
  display: flex;
  margin: 8px 0;
}
.bella-row.bot  { justify-content: flex-start; align-items: flex-end; gap: 6px; }
.bella-row.user { justify-content: flex-end; }

.bella-bubble {
  max-width: 80%;
  word-wrap: break-word;
  padding: 10px 12px;
  border-radius: var(--radius);
  font-size: 14px;
  line-height: 1.35;
  white-space: pre-wrap;
}
.bella-row.bot .bella-bubble {
  background: var(--bella-bot);
  color: var(--bella-text);
  border-top-left-radius: 6px;
}
.bella-row.user .bella-bubble {
  background: var(--bella-primary);
  color: #fff;
  border-top-right-radius: 6px;
}

/* gépelés pontok az avatar mellett */
.bella-typing-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 6px 0;
}
.bella-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
  background: var(--bella-bot);
  padding: 6px 10px;
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}
.bella-dot {
  width: 4px; height: 4px; border-radius: 50%;
  background: #9ca3af;
  animation: bella-bounce 1.2s infinite ease-in-out;
}
.bella-dot:nth-child(2){ animation-delay: .15s; }
.bella-dot:nth-child(3){ animation-delay: .3s; }
@keyframes bella-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: .6; }
  40% { transform: translateY(-3px); opacity: 1; }
}

/* input bar */
.bella-inputbar {
  display: flex;
  gap: 8px;
  padding: 10px;
  border-top: 1px solid var(--bella-border);
  background: #fff;
}
.bella-input {
  flex: 1;
  border: 1px solid var(--bella-border);
  border-radius: 999px;
  padding: 12px 14px;
  font-size: 14px;
  outline: none;
}
.bella-send {
  background: var(--bella-primary);
  color: #fff;
  border: none; border-radius: 999px;
  padding: 0 16px; min-width: 64px;
  font-weight: 700;
}
.bella-send:disabled { opacity: .6; cursor: not-allowed; }

@media (prefers-reduced-motion: reduce) {
  .bella-panel { transition: none; }
  .bella-dot { animation: none; }
}