/* Jalax Growth Assistant — chat widget styles */

#jalax-chat-launcher,
#jalax-chat-launcher *,
#jalax-chat-panel,
#jalax-chat-panel * {
  box-sizing: border-box;
}

#jalax-chat-launcher {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #fff;
  color: #0b0b0b;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0,0,0,0.35);
  z-index: 9998;
  border: none;
  transition: transform 0.2s ease;
}
#jalax-chat-launcher:hover { transform: scale(1.06); }
#jalax-chat-launcher-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  pointer-events: none;
}

#jalax-chat-launcher .jc-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid #0b0b0b;
}

#jalax-chat-panel {
  position: fixed;
  right: 24px;
  bottom: 96px;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 140px);
  background: #0b0b0b;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 18px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9999;
  font-family: inherit;
  color: #f5f5f5;
}
#jalax-chat-panel.jc-open { display: flex; }

#jalax-chat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}
#jalax-chat-header .jc-title {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.01em;
}
#jalax-chat-header .jc-sub {
  font-size: 12px;
  color: rgba(245,245,245,0.55);
  margin-top: 2px;
}
#jalax-chat-close {
  background: none;
  border: none;
  color: rgba(245,245,245,0.6);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
  padding: 4px;
}
#jalax-chat-close:hover { color: #fff; }

#jalax-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 14px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#jalax-chat-messages::-webkit-scrollbar { width: 6px; }
#jalax-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.15); border-radius: 3px; }

.jc-msg {
  max-width: 84%;
  padding: 10px 13px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.45;
  word-wrap: break-word;
}
.jc-msg.jc-bot {
  align-self: flex-start;
  background: rgba(255,255,255,0.08);
  border-bottom-left-radius: 4px;
}
.jc-msg.jc-user {
  align-self: flex-end;
  background: #fff;
  color: #0b0b0b;
  border-bottom-right-radius: 4px;
  font-weight: 500;
}

.jc-typing {
  align-self: flex-start;
  display: flex;
  gap: 4px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.08);
  border-radius: 14px;
  border-bottom-left-radius: 4px;
}
.jc-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(245,245,245,0.6);
  animation: jc-blink 1.2s infinite ease-in-out;
}
.jc-typing span:nth-child(2) { animation-delay: 0.15s; }
.jc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes jc-blink { 0%, 80%, 100% { opacity: 0.25; } 40% { opacity: 1; } }

#jalax-chat-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0 14px 12px;
}
.jc-chip {
  background: transparent;
  border: 1px solid rgba(255,255,255,0.25);
  color: #f5f5f5;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 12.5px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.jc-chip:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }

#jalax-chat-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px;
  border-top: 1px solid rgba(255,255,255,0.1);
  background: rgba(255,255,255,0.02);
}
#jalax-chat-input {
  flex: 1 1 auto;
  min-width: 0;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 999px;
  padding: 10px 15px;
  color: #f5f5f5;
  font-size: 13.5px;
  outline: none;
  font-family: inherit;
}
#jalax-chat-input::placeholder { color: rgba(245,245,245,0.4); }
#jalax-chat-input:focus { border-color: rgba(255,255,255,0.4); }

#jalax-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: #fff;
  border: none;
  color: #0b0b0b;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
#jalax-chat-send:disabled { opacity: 0.4; cursor: not-allowed; }
#jalax-chat-send svg { width: 16px; height: 16px; }

@media (max-width: 480px) {
  #jalax-chat-panel {
    right: 16px;
    left: 16px;
    width: auto;
    bottom: 88px;
  }
  #jalax-chat-launcher { right: 16px; bottom: 16px; }
}
