/* HyperVizuals Aurora widget — dark theme, accent #e8ff5f */
.hv-chat-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #e8ff5f;
  color: #0a0a0a;
  box-shadow: 0 8px 24px rgba(232, 255, 95, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  cursor: pointer;
  z-index: 200;
  border: none;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}
.hv-chat-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(232, 255, 95, 0.45);
}
.hv-chat-fab.pulse {
  animation: hvChatPulse 1.4s ease-out 3;
}
@keyframes hvChatPulse {
  0% { box-shadow: 0 8px 24px rgba(232, 255, 95, 0.35), 0 0 0 0 rgba(232, 255, 95, 0.5); }
  100% { box-shadow: 0 8px 24px rgba(232, 255, 95, 0.35), 0 0 0 20px rgba(232, 255, 95, 0); }
}

.hv-chat-panel {
  position: fixed;
  bottom: calc(24px + 58px + 20px);
  right: 24px;
  width: 360px;
  height: 480px;
  max-height: calc(100vh - 120px);
  background: #161616;
  border: 1px solid #2a2a2a;
  border-radius: 16px;
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.55);
  z-index: 199;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(16px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  font-family: 'Geist', -apple-system, sans-serif;
  color: #f5f3ee;
}
.hv-chat-panel.open {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}
.hv-chat-header {
  background: linear-gradient(135deg, #1a1a1a, #0a0a0a);
  border-bottom: 1px solid #2a2a2a;
  color: #f5f3ee;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 14px;
}
.hv-chat-header-actions { display: flex; align-items: center; gap: 8px; }
.hv-chat-close,
.hv-chat-back {
  color: #f5f3ee;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  border-radius: 50%;
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  cursor: pointer;
  padding: 0;
}
.hv-chat-close:hover,
.hv-chat-back:hover { background: rgba(255, 255, 255, 0.18); }
.hv-chat-back[hidden] { display: none; }

.hv-chat-body {
  flex: 1;
  padding: 18px 18px 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.hv-chat-mode { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.hv-chat-mode[hidden] { display: none; }

.hv-chat-welcome {
  font-size: 13.5px;
  color: #999591;
  line-height: 1.55;
  margin-bottom: 14px;
}
.hv-chat-choice-btns { display: flex; flex-direction: column; gap: 10px; }
.hv-chat-choice-btn {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  border: 1px solid #2a2a2a;
  border-radius: 12px;
  background: #121212;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
  color: inherit;
  font: inherit;
}
.hv-chat-choice-btn:hover {
  border-color: #e8ff5f;
  background: #1a1a1a;
  transform: translateY(-1px);
}
.hv-chat-choice-icon {
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: rgba(232, 255, 95, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.hv-chat-choice-label { font-size: 14px; font-weight: 600; display: block; color: #f5f3ee; }
.hv-chat-choice-sub { font-size: 12px; color: #999591; display: block; margin-top: 2px; }

.hv-chat-messages {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding-bottom: 10px;
  min-height: 0;
}
.hv-chat-bubble {
  max-width: 88%;
  padding: 10px 13px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
  word-break: break-word;
}
.hv-chat-bubble.user {
  align-self: flex-end;
  background: #e8ff5f;
  color: #0a0a0a;
  border-bottom-right-radius: 4px;
}
.hv-chat-bubble.assistant {
  align-self: flex-start;
  background: #222;
  color: #f5f3ee;
  border-bottom-left-radius: 4px;
}
.hv-chat-bubble.loading { color: #999591; font-style: italic; }

.hv-chat-compose {
  display: flex;
  gap: 8px;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid #2a2a2a;
  flex-shrink: 0;
}
.hv-chat-compose input {
  flex: 1;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  background: #121212;
  color: #f5f3ee;
  outline: none;
  min-width: 0;
}
.hv-chat-compose input:focus { border-color: #e8ff5f; }
.hv-chat-compose button {
  border: none;
  background: #e8ff5f;
  color: #0a0a0a;
  font-weight: 600;
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 10px;
  cursor: pointer;
  flex-shrink: 0;
}
.hv-chat-compose button:disabled { opacity: 0.6; cursor: progress; }

.hv-chat-form { display: flex; flex-direction: column; gap: 10px; }
.hv-chat-form .field {
  display: flex;
  align-items: center;
  background: #121212;
  border: 1px solid #2a2a2a;
  border-radius: 10px;
  padding: 0 12px;
}
.hv-chat-form .field:focus-within { border-color: #e8ff5f; }
.hv-chat-form .prefix {
  font-size: 13px;
  color: #999591;
  padding-right: 8px;
  border-right: 1px solid #2a2a2a;
  margin-right: 8px;
}
.hv-chat-form input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 11px 0;
  font-size: 16px;
  color: #f5f3ee;
  outline: none;
  min-width: 0;
}
.hv-chat-submit {
  width: 100%;
  background: #e8ff5f;
  color: #0a0a0a;
  padding: 12px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}
.hv-chat-submit:disabled { opacity: 0.65; cursor: progress; }

.hv-chat-status { font-size: 12.5px; margin-top: 10px; line-height: 1.45; color: #999591; }
.hv-chat-status.ok { color: #7dd87d; }
.hv-chat-status.err { color: #ff6b6b; }
.hv-chat-foot {
  text-align: center;
  margin-top: 12px;
  font-size: 11px;
  color: #5a5852;
}

@media (max-width: 420px) {
  .hv-chat-panel { right: 12px; left: 12px; width: auto; }
  .hv-chat-fab { right: 16px; bottom: 16px; }
}
