/* EQAI Chat Widget Styles */

#eqai-chat-toggle {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #00d4ff, #7c3aed);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
  z-index: 9999;
  transition: transform 0.2s, box-shadow 0.2s;
}
#eqai-chat-toggle:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(0, 212, 255, 0.45);
}
#eqai-chat-toggle svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}

#eqai-chat-panel {
  position: fixed;
  bottom: 96px;
  right: 24px;
  width: 400px;
  max-width: calc(100vw - 48px);
  height: 560px;
  max-height: calc(100vh - 140px);
  background: #0f1118;
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 16px;
  display: none;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 8px 40px rgba(0,0,0,0.6);
  z-index: 9998;
  font-family: 'Inter', sans-serif;
}
#eqai-chat-panel.open {
  display: flex;
}

#eqai-chat-header {
  padding: 16px 20px;
  background: linear-gradient(135deg, rgba(0,212,255,0.1), rgba(124,58,237,0.1));
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 12px;
}
#eqai-chat-header .avatar {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00d4ff, #7c3aed);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}
#eqai-chat-header .info h3 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #f0f0f0;
}
#eqai-chat-header .info p {
  margin: 2px 0 0;
  font-size: 11px;
  color: #888;
}
#eqai-chat-close {
  margin-left: auto;
  background: none;
  border: none;
  color: #888;
  cursor: pointer;
  font-size: 18px;
  padding: 4px;
}
#eqai-chat-close:hover { color: #fff; }

#eqai-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
#eqai-chat-messages::-webkit-scrollbar { width: 4px; }
#eqai-chat-messages::-webkit-scrollbar-track { background: transparent; }
#eqai-chat-messages::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }

.eqai-msg {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
  word-wrap: break-word;
}
.eqai-msg.user {
  align-self: flex-end;
  background: linear-gradient(135deg, #00d4ff22, #7c3aed22);
  border: 1px solid rgba(0,212,255,0.15);
  color: #e0e0e0;
}
.eqai-msg.assistant {
  align-self: flex-start;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  color: #d0d0d0;
}
.eqai-msg.system {
  align-self: center;
  background: transparent;
  color: #666;
  font-size: 11px;
  text-align: center;
  max-width: 100%;
}

.eqai-typing {
  display: inline-flex;
  gap: 4px;
  padding: 4px 0;
}
.eqai-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #00d4ff;
  animation: eqai-bounce 1.4s infinite both;
}
.eqai-typing span:nth-child(2) { animation-delay: 0.2s; }
.eqai-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes eqai-bounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

#eqai-chat-input-area {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
#eqai-chat-input {
  flex: 1;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 10px;
  padding: 10px 14px;
  color: #f0f0f0;
  font-size: 13px;
  font-family: 'Inter', sans-serif;
  resize: none;
  max-height: 80px;
  outline: none;
  transition: border-color 0.2s;
}
#eqai-chat-input:focus {
  border-color: rgba(0,212,255,0.4);
}
#eqai-chat-input::placeholder {
  color: #555;
}
#eqai-chat-send {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, #00d4ff, #7c3aed);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: opacity 0.2s;
}
#eqai-chat-send:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}
#eqai-chat-send svg {
  width: 16px;
  height: 16px;
  fill: #fff;
}
