/* ── Assistant Helix — styles ── */

#helix-assistant-btn {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: linear-gradient(135deg, #5b6af5, #7c3aed);
  border: none;
  cursor: pointer;
  z-index: 9999;
  box-shadow: 0 4px 20px rgba(91, 106, 245, 0.5);
  font-size: 24px;
  color: white;
  transition: transform 0.15s, box-shadow 0.15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
#helix-assistant-btn:hover {
  transform: scale(1.08);
  box-shadow: 0 6px 28px rgba(91, 106, 245, 0.65);
}

#helix-assistant-panel {
  display: none;
  position: fixed;
  bottom: 92px;
  right: 24px;
  width: 380px;
  height: 500px;
  background: #1a1d2e;
  border: 1px solid #2a2d3e;
  border-radius: 16px;
  z-index: 9998;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  font-family: 'DM Sans', -apple-system, sans-serif;
}

.ha-header {
  padding: 14px 16px;
  border-bottom: 1px solid #2a2d3e;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #1e2235;
}
.ha-header-title {
  color: #e0e4ff;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.3px;
}
.ha-header-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}
.ha-header-actions button {
  background: none;
  border: none;
  color: #7d8590;
  cursor: pointer;
  font-size: 16px;
  padding: 4px 6px;
  border-radius: 6px;
  transition: background 0.12s, color 0.12s;
}
.ha-header-actions button:hover {
  background: #2a2d3e;
  color: #e0e4ff;
}

#ha-messages {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scroll-behavior: smooth;
}
#ha-messages::-webkit-scrollbar { width: 4px; }
#ha-messages::-webkit-scrollbar-track { background: transparent; }
#ha-messages::-webkit-scrollbar-thumb { background: #2a2d3e; border-radius: 4px; }

.ha-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
  word-break: break-word;
}
.ha-bubble-user {
  background: #5b6af5;
  color: white;
  align-self: flex-end;
  border-radius: 14px 14px 4px 14px;
}
.ha-bubble-bot {
  background: #252840;
  color: #e0e4ff;
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
  border: 1px solid #2a2d3e;
  white-space: pre-wrap;
}
.ha-bubble-typing {
  background: #252840;
  color: #7d8590;
  align-self: flex-start;
  border-radius: 14px 14px 14px 4px;
  border: 1px solid #2a2d3e;
  font-style: italic;
}

.ha-footer {
  padding: 12px;
  border-top: 1px solid #2a2d3e;
  display: flex;
  gap: 8px;
  align-items: center;
  background: #1e2235;
}
#ha-input {
  flex: 1;
  background: #0d0f1a;
  border: 1px solid #2a2d3e;
  border-radius: 10px;
  color: #e0e4ff;
  padding: 9px 13px;
  font-size: 13px;
  outline: none;
  transition: border-color 0.15s;
  font-family: inherit;
}
#ha-input:focus { border-color: #5b6af5; }
#ha-input::placeholder { color: #4a5070; }

.ha-btn-send {
  background: #5b6af5;
  border: none;
  border-radius: 10px;
  color: white;
  padding: 9px 14px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  transition: background 0.12s;
  flex-shrink: 0;
}
.ha-btn-send:hover { background: #4338ca; }

.ha-btn-mic {
  background: #252840;
  border: 1px solid #2a2d3e;
  border-radius: 10px;
  color: #e0e4ff;
  padding: 9px 11px;
  cursor: pointer;
  font-size: 15px;
  transition: background 0.12s;
  flex-shrink: 0;
}
.ha-btn-mic:hover { background: #2a2d3e; }
.ha-btn-mic.listening {
  background: #dc2626;
  border-color: #dc2626;
  animation: ha-pulse 1s infinite;
}
@keyframes ha-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.4); }
  50%       { box-shadow: 0 0 0 8px rgba(220, 38, 38, 0); }
}

@media (max-width: 480px) {
  #helix-assistant-panel {
    right: 8px;
    left: 8px;
    width: auto;
    bottom: 84px;
  }
}
