
:root {
  --ai-primary: #21c7a8;
  --ai-accent: #3b82f6;
  --ai-bg: rgba(10, 16, 30, 0.96);
  --ai-panel: #111a2e;
  --ai-border: rgba(255,255,255,0.12);
  --ai-text: #e6e9f2;
  --ai-muted: #9aa4b2;
}

.ai-assistant-button {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  background: linear-gradient(135deg, var(--ai-primary), var(--ai-accent));
  color: #05121f;
  font-size: 22px;
  cursor: pointer;
  box-shadow: 0 12px 30px rgba(33, 199, 168, 0.35);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ai-assistant-panel {
  position: fixed;
  right: 24px;
  bottom: 90px;
  width: 360px;
  max-width: calc(100vw - 48px);
  height: 520px;
  background: var(--ai-bg);
  border-radius: 18px;
  border: 1px solid var(--ai-border);
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
  display: none;
  flex-direction: column;
  overflow: hidden;
  z-index: 9998;
}

.ai-assistant-panel.active {
  display: flex;
}

.ai-assistant-header {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(33,199,168,0.25), rgba(59,130,246,0.25));
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--ai-text);
  font-weight: 600;
}

.ai-assistant-header button {
  border: none;
  background: transparent;
  color: var(--ai-text);
  font-size: 20px;
  cursor: pointer;
}

.ai-assistant-messages {
  flex: 1;
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ai-message {
  max-width: 85%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 0.95rem;
  line-height: 1.5;
}

.ai-message.bot {
  background: var(--ai-panel);
  border: 1px solid var(--ai-border);
  color: var(--ai-text);
  align-self: flex-start;
}

.ai-message.user {
  background: linear-gradient(135deg, rgba(33,199,168,0.3), rgba(59,130,246,0.3));
  color: var(--ai-text);
  align-self: flex-end;
}

.ai-assistant-input {
  display: flex;
  gap: 8px;
  padding: 14px 16px;
  border-top: 1px solid var(--ai-border);
  background: rgba(7, 11, 20, 0.95);
}

.ai-assistant-input input {
  flex: 1;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--ai-border);
  background: rgba(11, 18, 32, 0.9);
  color: var(--ai-text);
  font-size: 0.95rem;
}

.ai-assistant-input button {
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  background: var(--ai-primary);
  color: #05121f;
  font-weight: 600;
  cursor: pointer;
}

.ai-assistant-status {
  padding: 8px 16px 0;
  font-size: 0.8rem;
  color: var(--ai-muted);
}

@media (max-width: 600px) {
  .ai-assistant-panel {
    right: 16px;
    left: 16px;
    width: auto;
    bottom: 90px;
  }
  .ai-assistant-button {
    right: 16px;
    bottom: 16px;
  }
}

.ai-assistant-logo {
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.8px;
}

.ai-typing {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--ai-muted);
  font-size: 0.9rem;
}

.typing-dots span {
  display: inline-block;
  animation: tradieBlink 1.4s infinite;
  opacity: 0.3;
}

.typing-dots span:nth-child(2) {
  animation-delay: 0.2s;
}

.typing-dots span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes tradieBlink {
  0%, 80%, 100% { opacity: 0.3; }
  40% { opacity: 1; }
}
