/**
 * Everyday AI™ — Everyday Assistant™ Global Cross-Suite Assistant HUD Styles
 * Next-gen executive copilot with dark glassmorphic styling and holographic telemetry.
 */

:root {
  --assistant-cyan: #38bdf8;
  --assistant-purple: #a855f7;
  --assistant-emerald: #10b981;
  --assistant-bg: rgba(9, 14, 26, 0.94);
  --assistant-border: rgba(56, 189, 248, 0.25);
  --assistant-glow: 0 0 35px rgba(56, 189, 248, 0.25);

  --jarvis-cyan: var(--assistant-cyan);
  --jarvis-purple: var(--assistant-purple);
  --jarvis-emerald: var(--assistant-emerald);
  --jarvis-bg: var(--assistant-bg);
  --jarvis-border: var(--assistant-border);
  --jarvis-glow: var(--assistant-glow);
}

/* Floating Trigger Button */
.everyday-assistant-trigger,
.everyday-omni-trigger,
.everyday-jarvis-trigger {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 99990;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.95), rgba(56, 189, 248, 0.95));
  color: #ffffff;
  padding: 10px 18px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  box-shadow: 0 8px 32px rgba(168, 85, 247, 0.45), 0 0 16px rgba(56, 189, 248, 0.35);
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.everyday-assistant-trigger:hover,
.everyday-jarvis-trigger:hover {
  transform: translateY(-3px) scale(1.03);
  box-shadow: 0 12px 40px rgba(168, 85, 247, 0.65), 0 0 24px rgba(56, 189, 248, 0.55);
}

.everyday-assistant-trigger .assistant-pulse-beacon,
.everyday-jarvis-trigger .jarvis-pulse-beacon {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #38bdf8;
  box-shadow: 0 0 10px #38bdf8, 0 0 20px #a855f7;
  animation: assistantPulse 1.8s infinite;
}

@keyframes assistantPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 6px #38bdf8); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

@keyframes jarvisPulse {
  0% { transform: scale(0.9); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; filter: drop-shadow(0 0 6px #38bdf8); }
  100% { transform: scale(0.9); opacity: 0.8; }
}

.everyday-assistant-trigger .assistant-kbd-pill,
.everyday-jarvis-trigger .jarvis-kbd-pill {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #e0e7ff;
}

/* Backdrop Overlay */
.everyday-assistant-backdrop,
.everyday-jarvis-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 16, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 99995;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.everyday-assistant-backdrop.active,
.everyday-jarvis-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

/* Command HUD Container */
.everyday-assistant-hud,
.everyday-jarvis-hud {
  position: fixed;
  bottom: 84px;
  right: 24px;
  width: 460px;
  max-width: calc(100vw - 32px);
  max-height: 680px;
  height: calc(100vh - 120px);
  background: var(--assistant-bg);
  border: 1px solid var(--assistant-border);
  border-radius: 20px;
  box-shadow: var(--assistant-glow), 0 20px 60px rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  z-index: 99998;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(20px) scale(0.96);
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

.everyday-assistant-hud.active,
.everyday-jarvis-hud.active {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

/* HUD Top Header */
.assistant-hud-header,
.jarvis-hud-header {
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assistant-brand-mark,
.jarvis-brand-mark {
  display: flex;
  align-items: center;
  gap: 12px;
}

.assistant-reactor-icon,
.jarvis-reactor-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.3), rgba(56, 189, 248, 0.3));
  border: 1px solid rgba(56, 189, 248, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--assistant-cyan);
  font-size: 1.1rem;
  box-shadow: inset 0 0 12px rgba(56, 189, 248, 0.4);
}

.assistant-title-text h4,
.jarvis-title-text h4 {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.assistant-title-text span,
.jarvis-title-text span {
  font-size: 0.72rem;
  color: #94a3b8;
  display: block;
}

.assistant-header-actions,
.jarvis-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.assistant-icon-btn,
.jarvis-icon-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.assistant-icon-btn:hover,
.jarvis-icon-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

/* Waveform Pulse Indicator */
.assistant-waveform-bar,
.jarvis-waveform-bar {
  display: flex;
  align-items: center;
  gap: 3px;
  height: 16px;
}

.assistant-waveform-bar span,
.jarvis-waveform-bar span {
  width: 3px;
  height: 100%;
  background: var(--assistant-cyan);
  border-radius: 2px;
  animation: assistantWave 1.2s infinite ease-in-out;
}

.assistant-waveform-bar span:nth-child(2),
.jarvis-waveform-bar span:nth-child(2) { animation-delay: 0.2s; height: 60%; }
.assistant-waveform-bar span:nth-child(3),
.jarvis-waveform-bar span:nth-child(3) { animation-delay: 0.4s; height: 90%; }
.assistant-waveform-bar span:nth-child(4),
.jarvis-waveform-bar span:nth-child(4) { animation-delay: 0.6s; height: 40%; }

@keyframes assistantWave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

@keyframes jarvisWave {
  0%, 100% { transform: scaleY(0.4); }
  50% { transform: scaleY(1); }
}

/* HUD Body / Conversation Log */
.assistant-hud-body,
.jarvis-hud-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Message Bubbles */
.assistant-msg,
.jarvis-msg {
  display: flex;
  flex-direction: column;
  max-width: 90%;
  animation: assistantMsgIn 0.25s ease-out;
}

@keyframes assistantMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes jarvisMsgIn {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

.assistant-msg-user,
.jarvis-msg-user {
  align-self: flex-end;
}

.assistant-msg-user .assistant-msg-bubble,
.jarvis-msg-user .jarvis-msg-bubble {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  color: #ffffff;
  border-radius: 16px 16px 4px 16px;
  padding: 12px 16px;
  font-size: 0.88rem;
  line-height: 1.45;
  box-shadow: 0 4px 14px rgba(2, 132, 199, 0.3);
}

.assistant-msg-bot,
.jarvis-msg-bot {
  align-self: flex-start;
}

.assistant-msg-bot .assistant-msg-bubble,
.jarvis-msg-bot .jarvis-msg-bubble {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f1f5f9;
  border-radius: 16px 16px 16px 4px;
  padding: 14px 18px;
  font-size: 0.88rem;
  line-height: 1.5;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

/* Action Card Result */
.assistant-action-card,
.jarvis-action-card {
  margin-top: 10px;
  background: rgba(56, 189, 248, 0.06);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 12px;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.assistant-action-card-header,
.jarvis-action-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.assistant-action-card-title,
.jarvis-action-card-title {
  font-weight: 700;
  color: #38bdf8;
  font-size: 0.82rem;
  display: flex;
  align-items: center;
  gap: 6px;
}

.assistant-action-card-desc,
.jarvis-action-card-desc {
  font-size: 0.78rem;
  color: #cbd5e1;
  line-height: 1.4;
}

.assistant-action-card-btn,
.jarvis-action-card-btn {
  background: rgba(56, 189, 248, 0.15);
  border: 1px solid rgba(56, 189, 248, 0.4);
  color: #38bdf8;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  transition: all 0.15s ease;
}

.assistant-action-card-btn:hover,
.jarvis-action-card-btn:hover {
  background: rgba(56, 189, 248, 0.3);
  color: #ffffff;
}

/* Quick Action Pills */
.assistant-quick-pills,
.jarvis-quick-pills {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  overflow-x: auto;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  scrollbar-width: none;
}

.assistant-quick-pills::-webkit-scrollbar,
.jarvis-quick-pills::-webkit-scrollbar {
  display: none;
}

.assistant-pill,
.jarvis-pill {
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #94a3b8;
  padding: 6px 12px;
  border-radius: 9999px;
  font-size: 0.76rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.assistant-pill:hover,
.jarvis-pill:hover {
  background: rgba(56, 189, 248, 0.12);
  border-color: rgba(56, 189, 248, 0.35);
  color: #38bdf8;
  transform: translateY(-1px);
}

/* Bottom Input Bar */
.assistant-hud-input-bar,
.jarvis-hud-input-bar {
  padding: 14px 16px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  gap: 10px;
}

.assistant-input-field,
.jarvis-input-field {
  flex: 1;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  color: #ffffff;
  padding: 10px 14px;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
}

.assistant-input-field:focus,
.jarvis-input-field:focus {
  border-color: var(--assistant-cyan);
  background: rgba(255, 255, 255, 0.08);
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.2);
}

.assistant-input-field::placeholder,
.jarvis-input-field::placeholder {
  color: #64748b;
}

.assistant-mic-btn,
.jarvis-mic-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #94a3b8;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.assistant-mic-btn:hover,
.jarvis-mic-btn:hover {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.assistant-mic-btn.listening,
.jarvis-mic-btn.listening {
  background: #ef4444;
  color: #ffffff;
  border-color: #ef4444;
  animation: micPulse 1.2s infinite;
}

@keyframes micPulse {
  0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7); }
  70% { transform: scale(1.05); box-shadow: 0 0 0 10px rgba(239, 68, 68, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

.assistant-send-btn,
.jarvis-send-btn {
  background: linear-gradient(135deg, #0284c7, #2563eb);
  border: none;
  color: #ffffff;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  box-shadow: 0 4px 12px rgba(2, 132, 199, 0.35);
}

.assistant-send-btn:hover,
.jarvis-send-btn:hover {
  transform: translateY(-1px) scale(1.03);
  box-shadow: 0 6px 16px rgba(2, 132, 199, 0.5);
}

/* Thinking Pulse Dots */
.assistant-thinking,
.jarvis-thinking {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 12px;
}

.assistant-thinking span,
.jarvis-thinking span {
  width: 6px;
  height: 6px;
  background: var(--assistant-cyan);
  border-radius: 50%;
  animation: thinkingDot 1.4s infinite ease-in-out;
}

.assistant-thinking span:nth-child(2),
.jarvis-thinking span:nth-child(2) { animation-delay: 0.2s; }
.assistant-thinking span:nth-child(3),
.jarvis-thinking span:nth-child(3) { animation-delay: 0.4s; }

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