:root {
  --qja-ink: #161616;
  --qja-cream: #fff8e6;
  --qja-paper: #ffffff;
  --qja-avocado: #8cc63f;
  --qja-lime: #d7f06a;
  --qja-yellow: #f2c94c;
  --qja-purple: #8b5cf6;
}

.qja-launcher {
  position: fixed;
  z-index: 90;
  right: 22px;
  bottom: 22px;
  min-height: 62px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 8px 18px 8px 9px;
  border: 3px solid var(--qja-ink);
  border-radius: 999px;
  background: var(--qja-avocado);
  color: var(--qja-ink);
  font: 900 14px/1.1 "Montserrat", Arial, sans-serif;
  box-shadow: 6px 6px 0 var(--qja-ink);
  cursor: pointer;
}

.qja-launcher:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--qja-ink); }

.qja-mini-avocado {
  position: relative;
  width: 40px;
  height: 47px;
  flex: 0 0 auto;
  border: 3px solid var(--qja-ink);
  border-radius: 48% 48% 45% 45% / 63% 63% 37% 37%;
  background: #2e5b2c;
}

.qja-mini-avocado::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid var(--qja-ink);
  border-radius: inherit;
  background: var(--qja-lime);
}

.qja-mini-avocado::after {
  content: "";
  position: absolute;
  z-index: 2;
  left: 50%;
  bottom: 6px;
  width: 16px;
  height: 16px;
  transform: translateX(-50%);
  border: 2px solid var(--qja-ink);
  border-radius: 50%;
  background: #a86332;
}

.qja-panel {
  position: fixed;
  z-index: 95;
  right: 22px;
  bottom: 98px;
  width: min(390px, calc(100vw - 24px));
  height: min(610px, calc(100vh - 130px));
  display: none;
  grid-template-rows: auto 1fr auto;
  overflow: hidden;
  border: 4px solid var(--qja-ink);
  border-radius: 28px;
  background: var(--qja-cream);
  box-shadow: 10px 10px 0 var(--qja-ink);
  font-family: "Montserrat", Arial, sans-serif;
}

.qja-panel.qja-open { display: grid; }

.qja-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 16px;
  border-bottom: 3px solid var(--qja-ink);
  background: var(--qja-avocado);
}

.qja-head-title { font-weight: 900; line-height: 1.05; }
.qja-head-subtitle { margin-top: 3px; font-size: 11px; font-weight: 700; }

.qja-close {
  width: 40px;
  height: 40px;
  border: 3px solid var(--qja-ink);
  border-radius: 50%;
  background: var(--qja-paper);
  color: var(--qja-ink);
  font: 900 22px/1 "Montserrat", Arial, sans-serif;
  cursor: pointer;
}

.qja-body {
  overflow-y: auto;
  padding: 15px;
  scroll-behavior: smooth;
}

.qja-message {
  max-width: 88%;
  margin: 0 0 10px;
  padding: 11px 13px;
  border: 2px solid var(--qja-ink);
  border-radius: 17px;
  color: var(--qja-ink);
  font-size: 13px;
  line-height: 1.45;
  font-weight: 650;
  white-space: pre-wrap;
}

.qja-message.qja-agent { border-bottom-left-radius: 4px; background: var(--qja-paper); }
.qja-message.qja-user { margin-left: auto; border-bottom-right-radius: 4px; background: var(--qja-lime); }
.qja-message.qja-error { background: #fee4e2; }

.qja-quick,
.qja-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 7px 0 14px;
}

.qja-chip,
.qja-action {
  min-height: 36px;
  padding: 7px 10px;
  border: 2px solid var(--qja-ink);
  border-radius: 999px;
  background: var(--qja-paper);
  color: var(--qja-ink);
  font: 800 11px/1.15 "Montserrat", Arial, sans-serif;
  cursor: pointer;
}

.qja-action[data-action="buy"] { background: var(--qja-yellow); }
.qja-action[data-action="whatsapp"] { background: var(--qja-avocado); }
.qja-action[data-action="how"] { background: var(--qja-paper); }

.qja-typing {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}
.qja-typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--qja-ink);
  animation: qja-bounce 1s infinite alternate;
}
.qja-typing i:nth-child(2) { animation-delay: .15s; }
.qja-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes qja-bounce { to { transform: translateY(-5px); opacity: .55; } }

.qja-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  padding: 12px;
  border-top: 3px solid var(--qja-ink);
  background: var(--qja-paper);
}

.qja-input {
  min-width: 0;
  min-height: 45px;
  border: 3px solid var(--qja-ink);
  border-radius: 14px;
  padding: 10px 11px;
  color: var(--qja-ink);
  font: 650 13px/1.2 "Montserrat", Arial, sans-serif;
}

.qja-send {
  min-width: 48px;
  border: 3px solid var(--qja-ink);
  border-radius: 14px;
  background: var(--qja-purple);
  color: white;
  font: 900 18px/1 "Montserrat", Arial, sans-serif;
  cursor: pointer;
}

.qja-send:disabled { opacity: .55; cursor: wait; }

@media (max-width: 600px) {
  .qja-launcher { right: 12px; bottom: 12px; }
  .qja-launcher-label { display: none; }
  .qja-panel {
    right: 8px;
    bottom: 82px;
    width: calc(100vw - 16px);
    height: min(650px, calc(100vh - 94px));
    border-radius: 22px;
    box-shadow: 5px 5px 0 var(--qja-ink);
  }
}
