/* ==========================================================================
   Nexus ⚡ — AXNEX Labs Gold Theme Override
   War Room-inspired metallic gold accent for OpenClaw Control UI
   ========================================================================== */

/* ---------- Dark theme (default) ---------- */
:root {
  --accent: #D4A843;
  --accent-hover: #E0B84E;
  --accent-muted: #B8891F;
  --accent-subtle: rgba(184, 137, 31, 0.15);
  --accent-foreground: #1a1a1a;
  --accent-glow: rgba(184, 137, 31, 0.25);
  --primary: #D4A843;
  --primary-foreground: #1a1a1a;
  --ring: #D4A843;
  --focus: rgba(184, 137, 31, 0.25);
  --focus-ring: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring);
  --focus-glow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring), 0 0 20px var(--accent-glow);
}

/* ---------- Light theme ---------- */
:root[data-theme="light"] {
  --accent: #A07518;
  --accent-hover: #B8891F;
  --accent-muted: #A07518;
  --accent-subtle: rgba(184, 137, 31, 0.12);
  --accent-foreground: #ffffff;
  --accent-glow: rgba(184, 137, 31, 0.15);
  --primary: #A07518;
  --primary-foreground: #ffffff;
  --ring: #B8891F;
  --focus: rgba(184, 137, 31, 0.2);
  --focus-glow: 0 0 0 2px var(--bg), 0 0 0 4px var(--ring), 0 0 16px var(--accent-glow);
}

/* ---------- Brand logo in topbar ---------- */
.brand-logo img {
  border-radius: 6px;
}

/* ---------- Gold send button (War Room style) ---------- */
.chat-compose__actions .btn.primary {
  background: linear-gradient(145deg, #D4A843, #B8891F) !important;
  color: #1a1a1a !important;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.2);
  box-shadow:
    4px 4px 8px rgba(0, 0, 0, 0.2),
    -2px -2px 6px rgba(212, 168, 67, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(184, 137, 31, 0.3) !important;
}

.chat-compose__actions .btn.primary:hover:not(:disabled) {
  background: linear-gradient(145deg, #E0B84E, #C4952A) !important;
  box-shadow:
    5px 5px 10px rgba(0, 0, 0, 0.25),
    -3px -3px 8px rgba(212, 168, 67, 0.5),
    inset 0 1px 1px rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-1px);
}

.chat-compose__actions .btn.primary:active:not(:disabled) {
  background: linear-gradient(145deg, #B8891F, #D4A843) !important;
  box-shadow:
    inset 2px 2px 4px rgba(0, 0, 0, 0.2),
    inset -1px -1px 3px rgba(212, 168, 67, 0.3) !important;
  transform: translateY(0) scale(0.98);
}

/* ---------- Active nav item gold accent ---------- */
.nav-item.active {
  background: rgba(184, 137, 31, 0.12);
}

.nav-item.active .nav-item__icon {
  color: #D4A843;
}

/* ---------- Config active tabs ---------- */
.config-subnav__item.active {
  color: #D4A843;
  border-color: rgba(184, 137, 31, 0.4);
  background: rgba(184, 137, 31, 0.12);
}

.config-nav__item.active {
  color: #D4A843;
  background: rgba(184, 137, 31, 0.12);
}

.agent-tab.active {
  background: #B8891F;
  border-color: #B8891F;
}

/* ---------- Gold pulsing border on streaming ---------- */
@keyframes chatStreamPulse {
  0%, 100% { border-color: var(--border); }
  50% { border-color: #D4A843; }
}

@keyframes glow-pulse {
  0%, 100% { box-shadow: 0 0 rgba(184, 137, 31, 0); }
  50% { box-shadow: 0 0 20px var(--accent-glow); }
}

/* ---------- Selection ---------- */
::selection {
  background: rgba(184, 137, 31, 0.25);
  color: var(--text-strong);
}

/* ---------- User bubble gold tint ---------- */
.chat-group.user .chat-bubble,
.chat-line.user .chat-bubble {
  background: rgba(184, 137, 31, 0.12);
  border-color: rgba(184, 137, 31, 0.2);
}

:root[data-theme="light"] .chat-group.user .chat-bubble,
:root[data-theme="light"] .chat-line.user .chat-bubble {
  background: rgba(184, 137, 31, 0.08);
  border-color: rgba(184, 137, 31, 0.15);
}

/* ---------- Scrollbar gold ---------- */
::-webkit-scrollbar-thumb:hover {
  background: rgba(184, 137, 31, 0.4);
}

/* ---------- Config changes badge gold ---------- */
.config-changes-badge {
  background: rgba(184, 137, 31, 0.12);
  border: 1px solid rgba(184, 137, 31, 0.3);
  color: #D4A843;
}

/* ---------- Config diff gold ---------- */
.config-diff {
  border-color: rgba(184, 137, 31, 0.25);
  background: rgba(184, 137, 31, 0.08);
}

.config-diff__summary {
  color: #D4A843;
}

/* ---------- Chat avatar for assistant — subtle gold ring ---------- */
img.chat-avatar {
  border: 2px solid rgba(184, 137, 31, 0.3);
}

/* ---------- Center brand logo in topbar ---------- */
.topbar {
  justify-content: center !important;
  position: relative !important;
}

.topbar-left {
  position: absolute !important;
  left: 0 !important;
  padding-left: 12px;
}

.topbar-left .nav-collapse-toggle {
  /* keep hamburger visible */
}

.topbar-left .brand {
  display: none !important;
}

/* Centered logo via pseudo-element on topbar */
.topbar::before {
  content: "";
  display: block;
  width: 220px;
  height: 36px;
  background: url("../nexus-title.webp") no-repeat center / contain;
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}

.topbar-status {
  position: absolute !important;
  right: 12px !important;
}

/* ---------- Brand override: Nexus by AXNEX Labs full logo ---------- */
.brand-text {
  display: none !important;
}

.brand-logo {
  width: auto !important;
  height: 36px !important;
  display: flex !important;
  align-items: center;
  gap: 0;
}

/* Hide the default SVG/emoji logo */
.brand-logo > svg,
.brand-logo > span {
  display: none !important;
}

/* Replace with the full Nexus title logo */
.brand-logo::before {
  content: "";
  display: block;
  width: 180px;
  height: 34px;
  background: url("../nexus-title.webp") no-repeat center / contain;
}

.brand-logo img {
  display: none !important;
}

/* Remove the old ::after pseudo we had */
.brand::after {
  display: none !important;
}

/* Mobile: smaller logo */
@media (max-width: 600px) {
  .brand-logo::before {
    width: 130px;
    height: 26px;
  }
}
