.grow-chatbot {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 1200;
  font-family: system-ui, -apple-system, sans-serif;
}

.grow-chatbot__toggle {
  width: 3.5rem;
  height: 3.5rem;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #1246ff, #7c5cff);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  box-shadow: 0 8px 28px rgba(18, 70, 255, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.grow-chatbot__toggle:hover {
  transform: scale(1.05);
  box-shadow: 0 12px 32px rgba(18, 70, 255, 0.45);
}

.grow-chatbot__panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 0.75rem);
  width: min(380px, calc(100vw - 2rem));
  height: 560px;
  max-height: calc(100dvh - 6rem);
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(15, 23, 42, 0.18);
  border: 1px solid rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.grow-chatbot__panel[hidden] {
  display: none !important;
}

.grow-chatbot__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
  background: linear-gradient(135deg, #1246ff, #5b3fd4);
  color: #fff;
}

.grow-chatbot__header-text {
  min-width: 0;
}

.grow-chatbot__header-actions {
  display: flex;
  gap: 0.35rem;
  flex-shrink: 0;
}

.grow-chatbot__icon-btn {
  background: rgba(255, 255, 255, 0.15);
  border: none;
  color: #fff;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}

.grow-chatbot__icon-btn:hover {
  background: rgba(255, 255, 255, 0.25);
}

.grow-chatbot__title {
  display: block;
  font-size: 1rem;
  font-weight: 700;
}

.grow-chatbot__subtitle {
  display: block;
  font-size: 0.78rem;
  opacity: 0.9;
  margin-top: 0.15rem;
}

.grow-chatbot__messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: #f8fafc;
}

.grow-chatbot__msg {
  max-width: 88%;
  padding: 0.65rem 0.85rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.55;
  word-break: break-word;
}

.grow-chatbot__msg a {
  color: inherit;
  text-decoration: underline;
}

.grow-chatbot__msg--bot a {
  color: #1246ff;
}

.grow-chatbot__msg--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  color: #1e293b;
}

.grow-chatbot__msg--user {
  align-self: flex-end;
  background: #1246ff;
  color: #fff;
}

.grow-chatbot__msg--typing {
  opacity: 0.7;
  font-style: italic;
}

.grow-chatbot__quick {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 0.55rem 0.75rem 0;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.grow-chatbot__chip {
  border: 1px solid rgba(18, 70, 255, 0.25);
  background: rgba(18, 70, 255, 0.06);
  color: #1246ff;
  border-radius: 999px;
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
  line-height: 1.3;
  max-width: 100%;
  text-align: left;
}

.grow-chatbot__chip:hover {
  background: rgba(18, 70, 255, 0.12);
}

.grow-chatbot__handoff {
  display: flex;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: #fff;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.grow-chatbot__handoff-btn {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  text-decoration: none;
  background: #f1f5f9;
  color: #334155;
}

.grow-chatbot__handoff-btn:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.grow-chatbot__handoff-btn--wa {
  background: rgba(37, 211, 102, 0.12);
  color: #128c7e;
}

.grow-chatbot__handoff-btn--wa:hover {
  background: rgba(37, 211, 102, 0.22);
  color: #0f766e;
}

.grow-chatbot__form {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #fff;
}

.grow-chatbot__input {
  flex: 1;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 999px;
  padding: 0.6rem 1rem;
  font-size: 0.9rem;
  outline: none;
}

.grow-chatbot__input:focus {
  border-color: #1246ff;
  box-shadow: 0 0 0 3px rgba(18, 70, 255, 0.12);
}

.grow-chatbot__send {
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: #1246ff;
  color: #fff;
  cursor: pointer;
  flex-shrink: 0;
}

.grow-chatbot__send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

@media (max-width: 480px) {
  .grow-chatbot {
    right: 1rem;
    bottom: 1rem;
  }

  .grow-chatbot__panel {
    width: calc(100vw - 2rem);
    height: min(78dvh, 560px);
  }
}
