/* ═══════════════════════════════════════════════════════════
   NEXUS — Aura Intelligence Design System
   Theme: Obsidian Base + Gold Thread
   ═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ─── DESIGN TOKENS ──────────────────────────────────────── */
:root {
  --nexus-bg-base: #111417;
  --nexus-bg-surface: #181c20;
  --nexus-bg-elevated: #1e2328;
  --nexus-bg-hover: #252b32;
  --nexus-bg-input: #1a1f25;

  --nexus-gold: #ffd700;
  --nexus-gold-dim: rgba(255, 215, 0, 0.15);
  --nexus-gold-glow: rgba(255, 215, 0, 0.35);
  --nexus-gold-border: rgba(255, 215, 0, 0.6);

  --nexus-text-primary: #e8eaed;
  --nexus-text-secondary: #9aa0a6;
  --nexus-text-muted: #5f6368;
  --nexus-text-gold: #ffd700;

  --nexus-border: rgba(255, 255, 255, 0.06);
  --nexus-border-gold: rgba(255, 215, 0, 0.3);
  --nexus-error: #ef4444;
  --nexus-error-dim: rgba(239, 68, 68, 0.12);

  --nexus-shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.4);
  --nexus-shadow-md: 0 8px 32px rgba(0, 0, 0, 0.6);
  --nexus-shadow-gold: 0 0 20px rgba(255, 215, 0, 0.2);
  --nexus-shadow-widget: 0 20px 60px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 215, 0, 0.08);

  --nexus-radius-sm: 8px;
  --nexus-radius-md: 14px;
  --nexus-radius-lg: 20px;
  --nexus-radius-xl: 28px;
  --nexus-radius-full: 9999px;

  --nexus-font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --nexus-font-mono: 'JetBrains Mono', 'Courier New', monospace;

  --nexus-transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  --nexus-bounce: cubic-bezier(0.34, 1.56, 0.64, 1);

  --nexus-widget-w: 360px;
  --nexus-widget-h: 580px;
  --nexus-z: 99999;
}

/* ─── ROOT CONTAINER ─────────────────────────────────────── */
#nexus-root {
  position: fixed;
  bottom: 28px;
  right: 28px;
  z-index: var(--nexus-z);
  font-family: var(--nexus-font);
}

/* ─── TOGGLE BUTTON ──────────────────────────────────────── */
.nexus-toggle {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: var(--nexus-radius-full);
  border: none;
  background: linear-gradient(135deg, #1a1f26, #111417);
  color: var(--nexus-gold);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 4px 20px rgba(0, 0, 0, 0.5),
    0 0 0 1.5px var(--nexus-border-gold),
    inset 0 1px 0 rgba(255, 215, 0, 0.08);
  transition: var(--nexus-transition);
  outline: none;
}

.nexus-toggle:hover {
  transform: scale(1.06) translateY(-2px);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.6),
    0 0 0 1.5px var(--nexus-gold),
    var(--nexus-shadow-gold);
}

.nexus-toggle:active {
  transform: scale(0.96);
}

.nexus-toggle--active {
  background: linear-gradient(135deg, #ffd700, #e6a800);
  color: #111417;
  box-shadow:
    0 6px 24px rgba(255, 215, 0, 0.4),
    0 0 0 1.5px var(--nexus-gold);
}

.nexus-toggle--active:hover {
  box-shadow:
    0 10px 32px rgba(255, 215, 0, 0.5),
    0 0 0 1.5px var(--nexus-gold);
}

.nexus-toggle-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  position: relative;
  z-index: 1;
}

.nexus-toggle-icon svg {
  width: 100%;
  height: 100%;
}

/* Glowing pulse ring */
.nexus-toggle-pulse {
  position: absolute;
  inset: -4px;
  border-radius: var(--nexus-radius-full);
  border: 1.5px solid var(--nexus-gold);
  opacity: 0;
  animation: nexus-pulse-ring 2.5s ease-out infinite;
  pointer-events: none;
}

@keyframes nexus-pulse-ring {
  0% {
    opacity: 0.7;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.5);
  }
}

/* ─── WIDGET ─────────────────────────────────────────────── */
.nexus-widget {
  position: absolute;
  bottom: calc(100% + 14px);
  right: 0;
  width: var(--nexus-widget-w);
  height: var(--nexus-widget-h);
  background: var(--nexus-bg-base);
  border-radius: var(--nexus-radius-xl);
  box-shadow: var(--nexus-shadow-widget);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--nexus-border);
  transform: translateY(16px) scale(0.95);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s var(--nexus-bounce), opacity 0.25s ease;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.nexus-widget--open {
  transform: translateY(0) scale(1);
  opacity: 1;
  pointer-events: all;
}

/* ─── HEADER ─────────────────────────────────────────────── */
.nexus-close-btn svg {
  width: 16px;
  height: 16px;
}

/* ─── NEW HEADER LAYOUT ──────────────────────────────────── */
.nexus-header {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 12px 14px !important;
  background: #111417 !important;
  /* Matte dark header */
  border-bottom: 1px solid rgba(255, 215, 0, 0.1);
}

.nexus-header-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nexus-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1.5px solid var(--nexus-gold-border);
  background: #1a1f26;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 15px rgba(255, 215, 0, 0.2);
}

.nexus-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.nexus-header-info {
  display: flex;
  flex-direction: column;
}

.nexus-header-title {
  font-size: 16px;
  font-weight: 700;
  color: #ffd700;
  /* Gold Title */
  letter-spacing: 0.02em;
}

.nexus-header-status {
  font-size: 10px;
  color: #9aa0a6;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* ─── MORE ACTIONS MENU ──────────────────────────────────── */
.nexus-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nexus-more-btn,
.nexus-close-btn {
  width: 32px;
  height: 32px;
  border: none;
  background: transparent;
  color: #9aa0a6;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: var(--nexus-transition);
  outline: none;
}

.nexus-more-btn:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--nexus-gold);
}

.nexus-close-btn:hover {
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
}

.nexus-close-btn svg {
  width: 14px;
  height: 14px;
}

/* ─── SIDEBAR (ACTION MENU) ──────────────────────────────── */
.nexus-sidebar-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(4px);
  z-index: 140;
  opacity: 0;
  pointer-events: none;
  transition: var(--nexus-transition);
}

.nexus-sidebar-overlay--open {
  opacity: 1;
  pointer-events: all;
}

.nexus-sidebar {
  position: absolute;
  top: 0;
  right: -240px;
  width: 240px;
  height: 100%;
  background: var(--nexus-bg-surface);
  border-left: 1px solid var(--nexus-border-gold);
  z-index: 150;
  display: flex;
  flex-direction: column;
  padding: 20px;
  box-shadow: -10px 0 40px rgba(0, 0, 0, 0.6);
  transition: right 0.4s var(--nexus-bounce);
  backdrop-filter: blur(15px);
}

.nexus-sidebar--open {
  right: 0;
}

.nexus-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 30px;
  padding-bottom: 15px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nexus-sidebar-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--nexus-gold);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.nexus-menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--nexus-text-primary);
  font-size: 14px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  border-radius: var(--nexus-radius-md);
  transition: var(--nexus-transition);
  margin-bottom: 8px;
}

.nexus-menu-item:hover:not(.nexus-menu-item--disabled) {
  background: var(--nexus-gold-dim);
  color: var(--nexus-gold);
  transform: translateX(5px);
}

.nexus-menu-item--disabled {
  opacity: 0.3;
  cursor: not-allowed;
  filter: grayscale(1);
}

.nexus-menu-item svg {
  width: 18px;
  height: 18px;
}

.nexus-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 15px 0;
}

/* ─── TOAST NOTIFICATION ─────────────────────────────────── */
.nexus-toast-container {
  position: absolute;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.nexus-toast {
  background: rgba(17, 20, 23, 0.95);
  color: var(--nexus-gold);
  padding: 10px 20px;
  border-radius: var(--nexus-radius-full);
  border: 1px solid var(--nexus-border-gold);
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(10px);
  transform: translateY(20px);
  opacity: 0;
  transition: all 0.4s var(--nexus-bounce);
  white-space: nowrap;
}

.nexus-toast--visible {
  transform: translateY(0);
  opacity: 1;
}

.nexus-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 6px 0;
}

.nexus-menu-item svg {
  width: 16px;
  height: 16px;
}

.nexus-menu-divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.05);
  margin: 6px 0;
}

/* ─── HEADER ACTIONS ─────────────────────────────────────── */
.nexus-header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nexus-action-btn {
  width: 30px;
  height: 30px;
  border: none;
  background: transparent;
  color: var(--nexus-text-muted);
  cursor: pointer;
  border-radius: var(--nexus-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--nexus-transition);
  outline: none;
  position: relative;
}

.nexus-action-btn:hover {
  color: var(--nexus-gold);
  background: var(--nexus-bg-hover);
}

.nexus-action-btn svg {
  width: 15px;
  height: 15px;
}

/* Tooltip for actions */
.nexus-action-btn::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: -28px;
  left: 50%;
  transform: translateX(-50%) translateY(5px);
  padding: 4px 8px;
  background: var(--nexus-bg-elevated);
  color: var(--nexus-gold);
  font-size: 10px;
  white-space: nowrap;
  border-radius: 4px;
  border: 1px solid var(--nexus-border-gold);
  opacity: 0;
  pointer-events: none;
  transition: var(--nexus-transition);
}

.nexus-action-btn:hover::after {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* ─── CUSTOM MODAL ───────────────────────────────────────── */
.nexus-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 250;
  opacity: 0;
  pointer-events: none;
  transition: var(--nexus-transition);
  padding: 20px;
}

.nexus-modal-overlay--open {
  opacity: 1;
  pointer-events: all;
}

.nexus-modal {
  background: var(--nexus-bg-surface);
  border: 1px solid var(--nexus-border-gold);
  border-radius: var(--nexus-radius-lg);
  padding: 24px;
  width: 100%;
  max-width: 280px;
  text-align: center;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.8), var(--nexus-shadow-gold);
  transform: scale(0.9);
  transition: transform 0.3s var(--nexus-bounce);
}

.nexus-modal-overlay--open .nexus-modal {
  transform: scale(1);
}

.nexus-modal-icon {
  width: 48px;
  height: 48px;
  background: var(--nexus-gold-dim);
  color: var(--nexus-gold);
  border-radius: var(--nexus-radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
}

.nexus-modal-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--nexus-text-primary);
  margin-bottom: 8px;
}

.nexus-modal-text {
  font-size: 13px;
  color: var(--nexus-text-secondary);
  line-height: 1.5;
  margin-bottom: 20px;
}

.nexus-modal-actions {
  display: flex;
  gap: 10px;
}

.nexus-btn {
  flex: 1;
  padding: 10px;
  border-radius: var(--nexus-radius-md);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: var(--nexus-transition);
  border: 1px solid transparent;
}

.nexus-btn--cancel {
  background: var(--nexus-bg-hover);
  color: var(--nexus-text-primary);
  border-color: var(--nexus-border);
}

.nexus-btn--cancel:hover {
  background: var(--nexus-bg-elevated);
}

.nexus-btn--confirm {
  background: var(--nexus-error);
  color: white;
}

.nexus-btn--confirm:hover {
  background: #dc2626;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

/* ─── ATTACHMENT PREVIEW ────────────────────────────────── */
.nexus-attachment-preview {
  padding: 0 14px;
  margin-bottom: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-height: 80px;
  overflow-y: auto;
}

.nexus-file-chip {
  background: var(--nexus-gold-dim);
  border: 1px solid var(--nexus-border-gold);
  border-radius: var(--nexus-radius-sm);
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--nexus-gold);
  animation: nexus-fade-in 0.3s ease;
}

.nexus-file-chip-name {
  max-width: 150px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nexus-file-remove {
  cursor: pointer;
  display: flex;
  align-items: center;
  color: #ef4444;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.nexus-file-remove:hover {
  opacity: 1;
}

.nexus-file-remove svg {
  width: 12px;
  height: 12px;
}

@keyframes nexus-fade-in {
  from {
    opacity: 0;
    transform: translateY(5px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ─── DATE LABEL ─────────────────────────────────────────── */
.nexus-date-label {
  text-align: center;
  padding: 10px 16px;
  font-size: 10px;
  font-weight: 500;
  color: var(--nexus-text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--nexus-font-mono);
  flex-shrink: 0;
}

/* ─── MESSAGES AREA ──────────────────────────────────────── */
.nexus-messages {
  flex: 1;
  overflow-y: auto;
  padding: 8px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}

/* Custom scrollbar */
.nexus-messages::-webkit-scrollbar {
  width: 4px;
}

.nexus-messages::-webkit-scrollbar-track {
  background: transparent;
}

.nexus-messages::-webkit-scrollbar-thumb {
  background: var(--nexus-border);
  border-radius: 4px;
}

.nexus-messages::-webkit-scrollbar-thumb:hover {
  background: var(--nexus-text-muted);
}

/* ─── MESSAGE BASE ───────────────────────────────────────── */
.nexus-msg {
  display: flex;
  align-items: flex-end;
  gap: 8px;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.nexus-msg--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ─── NEXUS (AI) MESSAGES ────────────────────────────────── */
.nexus-msg--nexus {
  align-self: flex-start;
  flex-direction: row;
  max-width: 88%;
}

.nexus-msg-avatar {
  width: 28px;
  height: 28px;
  border-radius: var(--nexus-radius-full);
  background: linear-gradient(135deg, #2a2d33, #1e2328);
  border: 1px solid var(--nexus-border-gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 600;
  color: var(--nexus-gold);
  flex-shrink: 0;
  margin-bottom: 20px;
}

.nexus-msg--nexus .nexus-bubble {
  background: var(--nexus-bg-elevated);
  border: 1px solid var(--nexus-border);
  border-left: 2px solid var(--nexus-gold);
  border-radius: 4px var(--nexus-radius-md) var(--nexus-radius-md) var(--nexus-radius-md);
  padding: 10px 13px;
  box-shadow: var(--nexus-shadow-sm);
  position: relative;
}

.nexus-msg--nexus .nexus-bubble::before {
  content: '';
  position: absolute;
  left: -6px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 6px 5px 0;
  border-color: transparent var(--nexus-bg-elevated) transparent transparent;
}

/* ─── USER MESSAGES ──────────────────────────────────────── */
.nexus-msg--user {
  align-self: flex-end;
  flex-direction: row-reverse;
  max-width: 82%;
}

.nexus-msg--user .nexus-bubble {
  background: var(--nexus-bg-hover);
  border: 1px solid var(--nexus-border);
  border-right: 2px solid var(--nexus-gold);
  border-radius: var(--nexus-radius-md) 4px var(--nexus-radius-md) var(--nexus-radius-md);
  padding: 10px 13px;
  box-shadow: var(--nexus-shadow-sm);
  position: relative;
}

.nexus-msg--user .nexus-bubble::after {
  content: '';
  position: absolute;
  right: -6px;
  bottom: 8px;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 5px 0 5px 6px;
  border-color: transparent transparent transparent var(--nexus-bg-hover);
}

/* ─── ERROR STATE ────────────────────────────────────────── */
.nexus-msg--error .nexus-bubble {
  background: var(--nexus-error-dim);
  border-left-color: var(--nexus-error);
  border-color: rgba(239, 68, 68, 0.2);
}

/* ─── BUBBLE CONTENT ─────────────────────────────────────── */
.nexus-bubble {
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.6;
  color: var(--nexus-text-primary);
  word-break: break-word;
}

.nexus-bubble code {
  font-family: var(--nexus-font-mono);
  font-size: 12px;
  background: rgba(255, 215, 0, 0.08);
  color: var(--nexus-gold);
  border: 1px solid rgba(255, 215, 0, 0.15);
  border-radius: 4px;
  padding: 1px 5px;
}

.nexus-bubble strong {
  font-weight: 600;
  color: var(--nexus-text-primary);
}

.nexus-bubble em {
  color: var(--nexus-text-secondary);
  font-style: italic;
}

/* ─── MESSAGE TIMESTAMP ──────────────────────────────────── */
.nexus-msg-time {
  font-size: 10px;
  color: var(--nexus-text-muted);
  text-align: right;
  margin-top: 5px;
  font-family: var(--nexus-font-mono);
}

/* ─── TYPING INDICATOR ───────────────────────────────────── */
.nexus-bubble--typing {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 12px 16px;
  min-width: 56px;
}

.nexus-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--nexus-radius-full);
  background: var(--nexus-gold);
  opacity: 0.4;
  animation: nexus-typing-bounce 1.2s ease-in-out infinite;
}

.nexus-dot:nth-child(2) {
  animation-delay: 0.2s;
}

.nexus-dot:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes nexus-typing-bounce {

  0%,
  60%,
  100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  30% {
    opacity: 1;
    transform: translateY(-4px);
  }
}

/* ─── SUGGESTIONS (FAQ CHIPS) ────────────────────────────── */
.nexus-suggestions {
  display: flex;
  gap: 10px;
  padding: 8px 14px;
  overflow-x: auto;
  scrollbar-width: none;
  /* Hide scrollbar for Firefox */
  -ms-overflow-style: none;
  /* Hide scrollbar for IE/Edge */
  flex-shrink: 0;
}

.nexus-suggestions::-webkit-scrollbar {
  display: none;
  /* Hide scrollbar for Chrome/Safari */
}

.nexus-suggestion-chip {
  background: var(--nexus-bg-input);
  color: var(--nexus-gold);
  border: 1px solid var(--nexus-border-gold);
  border-radius: var(--nexus-radius-full);
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: var(--nexus-transition);
  outline: none;
}

.nexus-suggestion-chip:hover {
  background: var(--nexus-gold-dim);
  border-color: var(--nexus-gold);
  transform: translateY(-2px);
  box-shadow: var(--nexus-shadow-gold);
}

.nexus-suggestion-chip:active {
  transform: scale(0.95);
}

/* ─── INPUT AREA ─────────────────────────────────────────── */
.nexus-input-wrap {
  padding: 12px 14px;
  background: var(--nexus-bg-surface);
  border-top: 1px solid var(--nexus-border);
  flex-shrink: 0;
}

.nexus-input-row {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--nexus-bg-input);
  border: 1px solid var(--nexus-border);
  border-radius: var(--nexus-radius-full);
  padding: 6px 6px 6px 12px;
  transition: var(--nexus-transition);
}

.nexus-input-row:focus-within {
  border-color: var(--nexus-border-gold);
  box-shadow: 0 0 0 2px rgba(255, 215, 0, 0.08);
}

.nexus-attach-icon {
  display: flex;
  align-items: center;
  color: var(--nexus-text-muted);
  flex-shrink: 0;
}

.nexus-attach-icon svg {
  width: 17px;
  height: 17px;
}

.nexus-input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--nexus-font);
  font-size: 13.5px;
  font-weight: 400;
  color: var(--nexus-text-primary);
  caret-color: var(--nexus-gold);
  padding: 4px 0;
  min-width: 0;
}

.nexus-input::placeholder {
  color: var(--nexus-text-muted);
  font-weight: 400;
}

/* ─── SEND BUTTON ────────────────────────────────────────── */
.nexus-send-btn {
  width: 36px;
  height: 36px;
  border-radius: var(--nexus-radius-full);
  border: none;
  background: var(--nexus-gold);
  color: var(--nexus-bg-base);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: var(--nexus-transition);
  outline: none;
}

.nexus-send-btn:not(:disabled):hover {
  background: #ffe033;
  transform: scale(1.07);
  box-shadow: 0 2px 12px rgba(255, 215, 0, 0.4);
}

.nexus-send-btn:not(:disabled):active {
  transform: scale(0.94);
}

.nexus-send-btn:disabled {
  background: var(--nexus-bg-hover);
  color: var(--nexus-text-muted);
  cursor: default;
}

.nexus-send-btn svg {
  width: 16px;
  height: 16px;
}

/* ─── RESPONSIVE ─────────────────────────────────────────── */
@media (max-width: 480px) {
  #nexus-root {
    bottom: 16px;
    right: 16px;
  }

  .nexus-widget {
    width: calc(100vw - 32px);
    height: 75vh;
    max-height: 600px;
    right: 0;
    border-radius: var(--nexus-radius-xl) var(--nexus-radius-xl) var(--nexus-radius-lg) var(--nexus-radius-lg);
  }
}

@media (max-width: 360px) {
  .nexus-widget {
    bottom: calc(100% + 10px);
  }
}

transition: var(--nexus-transition);
}

.nexus-suggestion-chip:hover {
  border-color: var(--nexus-border-gold);
  color: var(--nexus-gold);
}

/* ─── HISTORY LIST ───────────────────────────────────────── */
.nexus-history-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  margin: 10px 0;
}

.nexus-sidebar-subtitle {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--nexus-text-muted);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
  padding: 0 8px;
}

.nexus-history-list {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nexus-history-list::-webkit-scrollbar {
  width: 3px;
}
.nexus-history-list::-webkit-scrollbar-thumb {
  background: var(--nexus-border);
  border-radius: 4px;
}

.nexus-history-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--nexus-text-secondary);
  font-size: 13px;
  text-align: left;
  cursor: pointer;
  border-radius: var(--nexus-radius-sm);
  transition: var(--nexus-transition);
}

.nexus-history-item:hover {
  background: rgba(255,255,255,0.03);
  color: var(--nexus-text-primary);
}

.nexus-history-item.active {
  background: var(--nexus-gold-dim);
  color: var(--nexus-gold);
}

.nexus-history-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.7;
}

.nexus-history-item-title {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

.nexus-history-empty {
  font-size: 12px;
  color: var(--nexus-text-muted);
  padding: 10px 4px;
  text-align: center;
}

.nexus-history-item-delete {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 4px;
  color: var(--nexus-text-muted);
  transition: all 0.2s ease;
  opacity: 0;
}

.nexus-history-item:hover .nexus-history-item-delete {
  opacity: 1;
}

.nexus-history-item-delete:hover {
  background: rgba(239, 68, 68, 0.1);
  color: var(--nexus-error);
}

.nexus-history-item-delete svg {
  width: 14px;
  height: 14px;
}