.jbb-chatbot-root {
  --jbb-primary: #102342;
  --jbb-accent: #22c55e;
  --jbb-bg: #ffffff;
  --jbb-surface: #f8fafc;
  --jbb-border: #dbe3ee;
  --jbb-text: #0f172a;
  --jbb-muted: #64748b;
  font-family: Inter, Poppins, Arial, sans-serif;
  position: fixed;
  z-index: 999999;
}

.jbb-chatbot-root * { box-sizing: border-box; }
.jbb-chatbot-root.jbb-floating { bottom: 18px; }
.jbb-chatbot-root.jbb-right { right: 18px; }
.jbb-chatbot-root.jbb-left { left: 18px; }

.jbb-chatbot-toggle {
  width: 66px;
  height: 66px;
  border: 0;
  border-radius: 999px;
  background: var(--jbb-primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  position: relative;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .28);
  transition: transform .18s ease, box-shadow .18s ease, opacity .18s ease;
}

.jbb-chatbot-toggle:hover { transform: translateY(-2px); }
.jbb-chatbot-toggle:focus-visible {
  outline: 0;
  box-shadow: 0 0 0 4px rgba(59, 130, 246, .18), 0 18px 45px rgba(15, 23, 42, .28);
}

.jbb-chatbot-ring {
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  border: 1px solid rgba(255, 255, 255, .3);
  animation: jbbRing 2.1s infinite ease-out;
}

@keyframes jbbRing {
  0%, 100% { transform: scale(1); opacity: .18; }
}

.jbb-chatbot-toggle::before {
  content: "";
  position: absolute;
  inset: 4px;
  border-radius: inherit;
  background: rgba(255,255,255,.08);
}

.jbb-chatbot-toggle-icon {
  position: relative;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.jbb-chatbot-toggle-icon svg { width: 28px; height: 28px; }
.jbb-chatbot-toggle-text { display: none; }

.jbb-chatbot-window {
  position: absolute;
  right: 0;
  bottom: 84px;
  width: 390px;
  max-width: calc(100vw - 22px);
  height: min(720px, calc(100vh - 110px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(219, 227, 238, .9);
  border-radius: 28px;
  box-shadow: 0 32px 90px rgba(15, 23, 42, .22);
}

.jbb-chatbot-header {
  padding: 18px;
  color: #fff;
  background: var(--jbb-primary);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.jbb-chatbot-status { display: none; }

.jbb-chatbot-status-dot { display: none; }

.jbb-chatbot-header strong {
  display: block;
  font-size: 20px;
  line-height: 1.25;
  font-weight: 700;
}

.jbb-chatbot-subtitle {
  margin: 8px 0 0;
  font-size: 13px;
  line-height: 1.5;
  opacity: .95;
}

.jbb-chatbot-close {
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 34px;
  opacity: .92;
}
.jbb-chatbot-close svg { width: 18px; height: 18px; }

.jbb-chatbot-quick-actions {
  display: flex;
  gap: 8px;
  padding: 12px 14px 0;
  overflow-x: auto;
  background: #fff;
}
.jbb-chatbot-quick-actions::-webkit-scrollbar { display: none; }

.jbb-chatbot-chip {
  border: 1px solid var(--jbb-border);
  background: #fff;
  color: var(--jbb-text);
  border-radius: 999px;
  padding: 9px 13px;
  white-space: nowrap;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
}

.jbb-chatbot-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
}

.jbb-message {
  max-width: 86%;
  margin-bottom: 10px;
  padding: 13px 15px;
  border-radius: 18px;
  white-space: pre-wrap;
  line-height: 1.58;
  font-size: 14px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .05);
}

.jbb-bot {
  background: #fff;
  border: 1px solid var(--jbb-border);
  color: var(--jbb-text);
  border-top-left-radius: 8px;
}

.jbb-user {
  margin-left: auto;
  background: var(--jbb-primary);
  color: #fff;
  border-top-right-radius: 8px;
}

.jbb-typing {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.jbb-typing span {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #94a3b8;
  display: inline-block;
  animation: jbbTyping 1.2s infinite ease-in-out;
}
.jbb-typing span:nth-child(2) { animation-delay: .15s; }
.jbb-typing span:nth-child(3) { animation-delay: .3s; }

@keyframes jbbTyping {
  0%, 100% { transform: translateY(0); opacity: .4; }
  50% { transform: translateY(-3px); opacity: 1; }
}

.jbb-chatbot-form {
  display: flex;
  gap: 10px;
  align-items: flex-end;
  padding: 14px;
  background: #fff;
  border-top: 1px solid var(--jbb-border);
}

.jbb-chatbot-input-wrap { flex: 1; }

.jbb-chatbot-input {
  width: 100%;
  min-height: 54px;
  max-height: 128px;
  resize: none;
  border: 1px solid var(--jbb-border);
  border-radius: 16px;
  padding: 15px 16px;
  background: #fff;
  color: var(--jbb-text);
  font-family: inherit;
  font-size: 14px;
  outline: 0;
}

.jbb-chatbot-input:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,.10);
}

.jbb-chatbot-send {
  width: 54px;
  height: 54px;
  border: 0;
  border-radius: 16px;
  background: var(--jbb-primary);
  color: #fff;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 56px;
}

.jbb-chatbot-send:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.jbb-chatbot-footer {
  padding: 0 16px 14px;
  background: #fff;
  font-size: 12px;
  color: var(--jbb-muted);
}

.jbb-chatbot-footer a {
  color: var(--jbb-primary);
  font-weight: 700;
  text-decoration: none;
}

.jbb-open .jbb-chatbot-toggle {
  opacity: 0;
  pointer-events: none;
  transform: scale(.95);
}

@media (max-width: 640px) {
  .jbb-chatbot-root.jbb-floating {
    right: 12px;
    left: auto;
    bottom: 12px;
  }

  .jbb-chatbot-window {
    position: fixed;
    right: 10px;
    left: 10px;
    bottom: 10px;
    width: auto;
    max-width: none;
    height: min(78vh, 680px);
    border-radius: 24px;
  }

  .jbb-chatbot-header { padding: 16px; }
  .jbb-chatbot-header strong { font-size: 18px; }
  .jbb-chatbot-subtitle { font-size: 12px; }
  .jbb-message { max-width: 90%; }
  .jbb-chatbot-form { padding: 12px; }
  .jbb-chatbot-toggle {
    width: 60px;
    height: 60px;
  }
}


.jbb-chatbot-send svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}
