.vita-chatbot-root {
  --vita-primary: #0b6e4f;
  --vita-primary-dark: #08553c;
  --vita-bg: #f7faf8;
  --vita-text: #1a1f1c;
  --vita-muted: #5c6b63;
  --vita-bot-bubble: #ffffff;
  --vita-user-bubble: var(--vita-primary);
  --vita-shadow: 0 12px 40px rgba(16, 40, 30, 0.22);
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  z-index: 99999;
}

.vita-chatbot-root * {
  box-sizing: border-box;
}

.vita-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 50%;
  background: var(--vita-primary);
  color: #fff;
  cursor: pointer;
  box-shadow: var(--vita-shadow);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, background 0.2s ease;
}

.vita-launcher:hover {
  background: var(--vita-primary-dark);
  transform: scale(1.05);
}

.vita-launcher svg {
  width: 28px;
  height: 28px;
  fill: currentColor;
}

.vita-panel {
  position: fixed;
  right: 22px;
  bottom: 96px;
  width: min(380px, calc(100vw - 24px));
  height: min(560px, calc(100vh - 120px));
  background: var(--vita-bg);
  border-radius: 18px;
  box-shadow: var(--vita-shadow);
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(11, 110, 79, 0.12);
}

.vita-panel.is-open {
  display: flex;
  animation: vita-rise 0.22s ease;
}

@keyframes vita-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.vita-header {
  background: var(--vita-primary);
  color: #fff;
  padding: 14px 14px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.vita-header-title {
  font-weight: 700;
  font-size: 15px;
  line-height: 1.3;
}

.vita-header-sub {
  font-size: 12px;
  opacity: 0.9;
  margin-top: 2px;
}

.vita-header-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.vita-lang {
  display: flex;
  background: rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 2px;
}

.vita-lang button {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 4px 7px;
  border-radius: 999px;
  cursor: pointer;
}

.vita-lang button.is-active {
  background: #fff;
  color: var(--vita-primary);
}

.vita-close {
  border: 0;
  background: transparent;
  color: #fff;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
}

.vita-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.vita-msg {
  max-width: 86%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.vita-msg.bot {
  align-self: flex-start;
  background: var(--vita-bot-bubble);
  color: var(--vita-text);
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-bottom-left-radius: 4px;
}

.vita-msg.user {
  align-self: flex-end;
  background: var(--vita-user-bubble);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.vita-msg.bot[dir="rtl"],
.vita-msg.user[dir="rtl"] {
  text-align: right;
}

.vita-typing {
  align-self: flex-start;
  color: var(--vita-muted);
  font-size: 12px;
  padding: 0 4px;
}

.vita-composer {
  display: flex;
  gap: 8px;
  padding: 12px;
  background: #fff;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.vita-composer input {
  flex: 1;
  border: 1px solid #d7e0db;
  border-radius: 12px;
  padding: 11px 12px;
  font-size: 14px;
  outline: none;
}

.vita-composer input:focus {
  border-color: var(--vita-primary);
}

.vita-composer button {
  border: 0;
  border-radius: 12px;
  background: var(--vita-primary);
  color: #fff;
  font-weight: 600;
  padding: 0 14px;
  cursor: pointer;
}

.vita-composer button:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .vita-launcher {
    right: 14px;
    bottom: 14px;
  }

  .vita-panel {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 84px;
    height: min(70vh, 560px);
  }
}
