/* GrowEzy floating FAQ chatbot — matches navy #0A1C38 + lime #A1B633 */

.ge-chat {
  --ge-navy: #0A1C38;
  --ge-navy-hover: #152a4a;
  --ge-lime: #A1B633;
  --ge-lime-deep: #8fa02d;
  --ge-lime-bg: #f4f7e8;
  --ge-lime-border: #d4dfb0;
  --ge-ink: #1a2332;
  --ge-muted: #64748b;
  --ge-line: #e8ece9;
  --ge-panel: #ffffff;
  --ge-shadow: 0 16px 48px rgba(10, 28, 56, 0.18);
  font-family: Manrope, Inter, system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.ge-chat-launcher {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 10050;
  width: 58px;
  height: 58px;
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ge-navy);
  color: #fff;
  box-shadow: 0 10px 28px rgba(10, 28, 56, 0.35);
  transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.ge-chat-launcher:hover {
  background: var(--ge-navy-hover);
  transform: translateY(-2px);
  box-shadow: 0 14px 32px rgba(10, 28, 56, 0.4);
}

.ge-chat-launcher:focus-visible {
  outline: 3px solid var(--ge-lime);
  outline-offset: 3px;
}

.ge-chat-launcher svg {
  width: 26px;
  height: 26px;
  display: block;
}

.ge-chat-launcher .ge-chat-ico-close {
  display: none;
}

.ge-chat.is-open .ge-chat-launcher .ge-chat-ico-chat {
  display: none;
}

.ge-chat.is-open .ge-chat-launcher .ge-chat-ico-close {
  display: block;
}

.ge-chat-panel {
  position: fixed;
  right: 22px;
  bottom: 92px;
  z-index: 10050;
  width: min(380px, calc(100vw - 28px));
  height: min(520px, calc(100vh - 120px));
  display: flex;
  flex-direction: column;
  background: var(--ge-panel);
  border: 1px solid var(--ge-line);
  border-radius: 18px;
  box-shadow: var(--ge-shadow);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px) scale(0.98);
  transform-origin: bottom right;
  transition: opacity 0.22s ease, transform 0.22s ease, visibility 0.22s;
}

.ge-chat.is-open .ge-chat-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.ge-chat-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, var(--ge-navy) 0%, #132a4f 100%);
  color: #fff;
}

.ge-chat-avatar {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--ge-lime-bg);
  color: var(--ge-navy);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ge-chat-avatar svg {
  width: 22px;
  height: 22px;
}

.ge-chat-header-copy {
  flex: 1;
  min-width: 0;
}

.ge-chat-header-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.ge-chat-header-sub {
  margin: 2px 0 0;
  font-size: 12px;
  opacity: 0.85;
}

.ge-chat-header-actions {
  display: flex;
  gap: 4px;
}

.ge-chat-icon-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ge-chat-icon-btn:hover {
  background: rgba(255, 255, 255, 0.18);
}

.ge-chat-icon-btn svg {
  width: 16px;
  height: 16px;
}

.ge-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  background:
    radial-gradient(ellipse at top right, rgba(161, 182, 51, 0.08), transparent 45%),
    #fafbfa;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

.ge-chat-msg {
  max-width: 92%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ge-chat-msg.is-bot {
  align-self: flex-start;
}

.ge-chat-msg.is-user {
  align-self: flex-end;
}

.ge-chat-bubble {
  padding: 11px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--ge-ink);
  white-space: pre-wrap;
  word-break: break-word;
}

.ge-chat-msg.is-bot .ge-chat-bubble {
  background: #fff;
  border: 1px solid var(--ge-line);
  border-bottom-left-radius: 4px;
  box-shadow: 0 2px 8px rgba(10, 28, 56, 0.04);
}

.ge-chat-msg.is-user .ge-chat-bubble {
  background: var(--ge-navy);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.ge-chat-msg-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.ge-chat-msg-links a {
  font-size: 12px;
  font-weight: 600;
  color: var(--ge-lime-deep);
  text-decoration: none;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--ge-lime-bg);
  border: 1px solid var(--ge-lime-border);
}

.ge-chat-msg-links a:hover {
  color: var(--ge-navy);
}

.ge-chat-composer {
  flex-shrink: 0;
  display: flex;
  gap: 8px;
  padding: 12px 12px 10px;
  border-top: 1px solid var(--ge-line);
  background: #fff;
}

.ge-chat-input {
  flex: 1;
  min-width: 0;
  border: 1.5px solid var(--ge-line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  font-size: 13.5px;
  color: var(--ge-ink);
  background: #fafbfa;
  outline: none;
  transition: border-color 0.15s;
}

.ge-chat-input:focus {
  border-color: var(--ge-lime);
  background: #fff;
}

.ge-chat-input::placeholder {
  color: #94a3b8;
}

.ge-chat-send {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: none;
  border-radius: 12px;
  background: var(--ge-navy);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
}

.ge-chat-send:hover {
  background: var(--ge-navy-hover);
}

.ge-chat-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ge-chat-send svg {
  width: 18px;
  height: 18px;
}

.ge-chat-footer-note {
  flex-shrink: 0;
  text-align: center;
  font-size: 10.5px;
  color: #94a3b8;
  padding: 0 12px 10px;
  background: #fff;
}

.ge-chat-typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 2px;
}

.ge-chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ge-muted);
  animation: ge-chat-bounce 1.2s infinite ease-in-out;
}

.ge-chat-typing span:nth-child(2) {
  animation-delay: 0.15s;
}

.ge-chat-typing span:nth-child(3) {
  animation-delay: 0.3s;
}

@keyframes ge-chat-bounce {
  0%,
  80%,
  100% {
    opacity: 0.35;
    transform: translateY(0);
  }
  40% {
    opacity: 1;
    transform: translateY(-3px);
  }
}

@media (max-width: 480px) {
  .ge-chat-launcher {
    right: 16px;
    bottom: 16px;
  }

  .ge-chat-panel {
    right: 10px;
    left: 10px;
    width: auto;
    bottom: 82px;
    height: min(70vh, 540px);
  }

  /* Lift above pricing mobile sticky CTA when present */
  body.has-mobile-cta .ge-chat-launcher {
    bottom: 78px;
  }

  body.has-mobile-cta .ge-chat-panel {
    bottom: 144px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ge-chat-launcher,
  .ge-chat-panel,
  .ge-chat-typing span {
    transition: none;
    animation: none;
  }
}
