/* Commandar -- the dashboard's workspace/voice command bar. Holographic HUD
   treatment: a glowing reactor "orb" that visibly reacts to mic/speaker
   activity, animated corner brackets, a live waveform, gradient title --
   the dashboard's visual centerpiece, not just another panel. */

.vcc-bar {
  background:
    radial-gradient(ellipse 480px 220px at 10% 0%, rgba(62,90,76,0.14), transparent 65%),
    radial-gradient(ellipse 420px 220px at 100% 10%, rgba(228,221,206,0.1), transparent 60%),
    linear-gradient(160deg, rgba(29,33,44,0.94), rgba(18,20,28,0.88));
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  margin-bottom: 22px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 0 1px rgba(62,90,76,0.06), 0 20px 60px -30px rgba(62,90,76,0.35);
}
.vcc-bar::before {
  content: "";
  position: absolute; left: 0; right: 0; top: 0; height: 2px;
  background: linear-gradient(90deg, #3E5A4C, #6b8f7a, #9B958A, #E4DDCE, #3E5A4C);
  background-size: 200% 100%;
  animation: vcc-scan 5s linear infinite;
  filter: drop-shadow(0 0 6px rgba(62,90,76,0.6));
}
/* Faint scanline sweep across the whole panel -- subtle, not distracting. */
.vcc-bar::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(228,221,206,0.05) 50%, transparent 100%);
  background-size: 100% 300%;
  animation: vcc-sweep 7s ease-in-out infinite;
  pointer-events: none;
}
@keyframes vcc-scan { to { background-position: -200% 0; } }
@keyframes vcc-sweep { 0%, 100% { background-position: 0 -100%; } 50% { background-position: 0 200%; } }

/* HUD corner brackets */
.vcc-corner {
  position: absolute; width: 14px; height: 14px;
  border: 2px solid var(--accent-2);
  opacity: 0.55;
  pointer-events: none;
}
.vcc-corner.tl { top: 8px; left: 8px; border-right: none; border-bottom: none; border-top-left-radius: 6px; }
.vcc-corner.tr { top: 8px; right: 8px; border-left: none; border-bottom: none; border-top-right-radius: 6px; }
.vcc-corner.bl { bottom: 8px; left: 8px; border-right: none; border-top: none; border-bottom-left-radius: 6px; }
.vcc-corner.br { bottom: 8px; right: 8px; border-left: none; border-top: none; border-bottom-right-radius: 6px; }

.vcc-bar-head {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px 12px;
  position: relative;
  z-index: 1;
}

/* Reactor orb -- idle: slow ambient pulse. listening: verdigris, fast,
   reacts via JS setting .listening. speaking: bone, via .speaking.
   This is the primary "is it live" signal -- large, animated, unmissable. */
.vcc-orb {
  position: relative;
  width: 34px; height: 34px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
}
.vcc-orb-core {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff, var(--text-dim) 70%);
  box-shadow: 0 0 10px 2px rgba(255,255,255,0.25);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
.vcc-orb-ring {
  position: absolute; inset: 0;
  border-radius: 50%;
  border: 1.5px solid var(--border);
  opacity: 0.7;
}
.vcc-orb-ring.r2 { inset: -6px; border-color: transparent; }

.vcc-orb.connecting .vcc-orb-core { background: radial-gradient(circle at 35% 30%, #fff, var(--amber) 70%); box-shadow: 0 0 12px 3px rgba(245,184,79,0.5); animation: vcc-pulse 1s ease-in-out infinite; }
.vcc-orb.connecting .vcc-orb-ring { border-color: var(--amber); animation: vcc-spin 2.5s linear infinite; }

.vcc-orb.ready .vcc-orb-core { background: radial-gradient(circle at 35% 30%, #fff, var(--accent-2) 70%); box-shadow: 0 0 10px 2px rgba(85,124,104,0.35); animation: vcc-pulse 3s ease-in-out infinite; }
.vcc-orb.ready .vcc-orb-ring { border-color: rgba(85,124,104,0.4); }

.vcc-orb.listening .vcc-orb-core { background: radial-gradient(circle at 35% 30%, #fff, var(--verdigris) 60%); box-shadow: 0 0 18px 5px rgba(62,90,76,0.75); animation: vcc-pulse 0.6s ease-in-out infinite; }
.vcc-orb.listening .vcc-orb-ring { border-color: var(--accent); box-shadow: 0 0 14px -2px var(--accent); }
.vcc-orb.listening .vcc-orb-ring.r2 { border: 1.5px solid rgba(62,90,76,0.5); animation: vcc-ripple 1.1s ease-out infinite; }

.vcc-orb.speaking .vcc-orb-core { background: radial-gradient(circle at 35% 30%, #fff, #9B958A 65%); box-shadow: 0 0 18px 5px rgba(155,149,138,0.7); animation: vcc-pulse 0.5s ease-in-out infinite; }
.vcc-orb.speaking .vcc-orb-ring { border-color: #9B958A; box-shadow: 0 0 14px -2px #9B958A; }
.vcc-orb.speaking .vcc-orb-ring.r2 { border: 1.5px solid rgba(228,221,206,0.5); animation: vcc-ripple 0.9s ease-out infinite; }

.vcc-orb.offline .vcc-orb-core { background: var(--text-dim); box-shadow: none; animation: none; }
.vcc-orb.offline .vcc-orb-ring { border-color: var(--border); }

@keyframes vcc-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.22); } }
@keyframes vcc-spin { to { transform: rotate(360deg); } }
@keyframes vcc-ripple {
  0% { transform: scale(0.6); opacity: 0.9; }
  100% { transform: scale(1.9); opacity: 0; }
}

.vcc-head-text { display: flex; flex-direction: column; flex: 1; min-width: 0; gap: 2px; }
.vcc-title {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.14em;
  background: linear-gradient(120deg, #fff 0%, var(--accent-2) 35%, #9B958A 65%, #E4DDCE 100%);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: vcc-title-shift 6s ease-in-out infinite;
}
@keyframes vcc-title-shift { 0%, 100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }
.vcc-substatus { font-size: 10.5px; color: var(--text-dim); text-transform: uppercase; letter-spacing: 0.05em; }

.vcc-icon-btn {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  color: var(--text-dim);
  flex-shrink: 0;
}
.vcc-icon-btn:hover { color: var(--text); border-color: var(--accent-2); }
.vcc-icon-btn .icon-svg { width: 16px; height: 16px; }
.vcc-icon-btn.active { color: var(--accent-2); border-color: var(--accent-2); box-shadow: 0 0 10px -2px rgba(62,90,76,0.5); }

.vcc-mic-btn.active {
  color: var(--verdigris);
  border-color: var(--verdigris);
  box-shadow: 0 0 12px -2px var(--verdigris);
  animation: vcc-pulse 1.4s ease-in-out infinite;
}

.vcc-thread {
  min-height: 140px;
  max-height: 340px;
  overflow-y: auto;
  padding: 4px 22px 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  position: relative;
  z-index: 1;
}
.vcc-empty { color: var(--text-dim); font-size: 12.5px; padding: 10px 0 16px; }

.vcc-msg { display: flex; }
.vcc-msg .bubble {
  max-width: 78%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}
.vcc-msg.user { justify-content: flex-end; }
.vcc-msg.user .bubble { background: var(--accent); color: #070605; font-weight: 600; border-bottom-right-radius: 3px; }
.vcc-msg.assistant .bubble { background: var(--panel-2); border: 1px solid var(--border); border-bottom-left-radius: 3px; box-shadow: 0 0 0 1px rgba(228,221,206,0.06) inset; }
.vcc-msg.system .bubble { background: rgba(255,107,107,0.1); border: 1px solid rgba(255,107,107,0.3); color: var(--red); font-size: 12px; }

.vcc-tool-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px;
  color: var(--text-dim);
  padding: 2px 2px;
}
.vcc-tool-note .icon-svg { width: 12px; height: 12px; }

/* Click-through chip on a tool note -- jumps straight to the work item /
   project / idea Commandar just created or looked up. */
.vcc-ref-link {
  display: inline-flex; align-items: center; gap: 3px;
  margin-left: 2px;
  padding: 1px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-2);
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 220px;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.vcc-ref-link:hover { color: var(--verdigris); border-color: var(--verdigris); }
.vcc-ref-link .icon-svg { width: 10px; height: 10px; flex-shrink: 0; }
.vcc-ref-link span { overflow: hidden; text-overflow: ellipsis; }

/* Live waveform -- reacts continuously to mic input level (and to assistant
   playback level) so activity is always visible, not just implied by a
   status dot. Bars collapse to a flat line at rest. */
.vcc-waveform {
  display: flex; align-items: flex-end; justify-content: center; gap: 4px;
  height: 32px;
  padding: 0 22px;
  position: relative;
  z-index: 1;
}
.vcc-bar-seg {
  width: 4px;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  transition: height 0.08s ease-out, background 0.2s ease;
}
.vcc-waveform.active.listening .vcc-bar-seg { background: var(--accent); box-shadow: 0 0 6px -1px var(--accent); }
.vcc-waveform.active.speaking .vcc-bar-seg { background: #9B958A; box-shadow: 0 0 6px -1px #9B958A; }

.vcc-input-row {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 22px 18px;
  border-top: 1px solid var(--border);
  margin-top: 4px;
  position: relative;
  z-index: 1;
}
.vcc-input-row input {
  flex: 1;
  background: var(--panel-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text);
  font-size: 13px;
}
.vcc-input-row input:focus { border-color: var(--accent); }
.vcc-send-btn {
  display: flex; align-items: center; justify-content: center;
  width: 34px; height: 34px;
  background: var(--accent);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  flex-shrink: 0;
}
.vcc-send-btn .icon-svg { width: 16px; height: 16px; color: #070605; }
