/* GO33 AI Chatbot — floating widget */

#go33-chat-launcher {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99999;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #0a0a0a;
  border: 2px solid #00d4ff;
  box-shadow: 0 0 16px rgba(0, 212, 255, 0.35);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 0.2s, transform 0.2s;
}

#go33-chat-launcher:hover {
  box-shadow: 0 0 24px rgba(0, 212, 255, 0.6);
  transform: scale(1.06);
}

#go33-chat-launcher svg {
  width: 26px;
  height: 26px;
  fill: #00d4ff;
}

#go33-chat-window {
  position: fixed;
  bottom: 92px;
  right: 24px;
  z-index: 99998;
  width: 360px;
  max-width: calc(100vw - 32px);
  height: 520px;
  max-height: calc(100vh - 120px);
  background: #0f0f0f;
  border: 1px solid #1e1e1e;
  border-radius: 14px;
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.7);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  transition: opacity 0.2s, transform 0.2s;
}

#go33-chat-window.go33-hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
}

/* Header */
#go33-chat-header {
  background: #0a0a0a;
  border-bottom: 1px solid #1e1e1e;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

#go33-chat-header .go33-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: #00d4ff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

#go33-chat-header .go33-avatar svg {
  width: 18px;
  height: 18px;
  fill: #0a0a0a;
}

#go33-chat-header .go33-title {
  flex: 1;
}

#go33-chat-header .go33-title strong {
  display: block;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.2;
}

#go33-chat-header .go33-title span {
  color: #00d4ff;
  font-size: 11px;
}

#go33-chat-close {
  background: none;
  border: none;
  color: #666;
  font-size: 20px;
  cursor: pointer;
  padding: 0 4px;
  line-height: 1;
  transition: color 0.15s;
}

#go33-chat-close:hover { color: #fff; }

/* Messages */
#go33-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scrollbar-width: thin;
  scrollbar-color: #2a2a2a transparent;
}

#go33-chat-messages::-webkit-scrollbar { width: 4px; }
#go33-chat-messages::-webkit-scrollbar-thumb { background: #2a2a2a; border-radius: 2px; }

.go33-msg {
  max-width: 88%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  word-break: break-word;
}

.go33-msg-bot {
  background: #1a1a1a;
  color: #e0e0e0;
  border-bottom-left-radius: 4px;
  align-self: flex-start;
}

.go33-msg-user {
  background: #00d4ff;
  color: #0a0a0a;
  border-bottom-right-radius: 4px;
  align-self: flex-end;
  font-weight: 500;
}

.go33-msg-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 12px 14px;
}

.go33-msg-typing span {
  width: 7px;
  height: 7px;
  background: #00d4ff;
  border-radius: 50%;
  animation: go33-bounce 1.2s infinite ease-in-out;
}

.go33-msg-typing span:nth-child(2) { animation-delay: 0.2s; }
.go33-msg-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes go33-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40%            { transform: scale(1);   opacity: 1;   }
}

/* Input */
#go33-chat-footer {
  border-top: 1px solid #1e1e1e;
  padding: 12px;
  display: flex;
  gap: 8px;
  align-items: flex-end;
  background: #0a0a0a;
}

#go33-chat-input {
  flex: 1;
  background: #1a1a1a;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  color: #e0e0e0;
  font-size: 13.5px;
  padding: 9px 12px;
  resize: none;
  outline: none;
  max-height: 100px;
  font-family: inherit;
  line-height: 1.4;
  transition: border-color 0.15s;
}

#go33-chat-input::placeholder { color: #555; }
#go33-chat-input:focus { border-color: #00d4ff; }

#go33-chat-send {
  background: #00d4ff;
  border: none;
  border-radius: 8px;
  width: 38px;
  height: 38px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: background 0.15s, transform 0.1s;
}

#go33-chat-send:hover   { background: #00b8d9; }
#go33-chat-send:active  { transform: scale(0.95); }
#go33-chat-send:disabled { background: #2a2a2a; cursor: default; }

#go33-chat-send svg {
  width: 18px;
  height: 18px;
  fill: #0a0a0a;
}

/* Powered-by */
#go33-chat-powered {
  text-align: center;
  font-size: 10px;
  color: #444;
  padding: 4px 0 8px;
  background: #0a0a0a;
}

@media (max-width: 400px) {
  #go33-chat-window { right: 8px; bottom: 80px; width: calc(100vw - 16px); }
  #go33-chat-launcher { right: 16px; bottom: 16px; }
}
