/* ============================================================
   GameTeam — Copilot demo styling  (REAL BRAND: black + pink)
   Wrapper class .cp ; the auto-typed demo engine stays the same.
   Accent is the PINK brand color (--primary). Code renders mono.
   ============================================================ */

.cp {
  --cp-r: 4px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--cp-r);
  box-shadow: var(--shadow), 0 0 0 1px var(--primary-line), 0 0 60px -22px var(--primary-glow);
  overflow: hidden;
  display: flex; flex-direction: column;
  width: 100%;
  position: relative;
  isolation: isolate;
}

/* faux window chrome */
.cp-head {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 15px;
  border-bottom: 1px solid var(--hairline);
  background: var(--surface-1);
  flex-shrink: 0;
}
.cp-dots { display: flex; gap: 6px; }
.cp-dots i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-2); }
.cp-dots i:first-child { background: var(--red); }
.cp-dots i:nth-child(2) { background: var(--gold); }
.cp-dots i:nth-child(3) { background: var(--success); }
.cp-head .cp-ttl {
  font-family: var(--font-mono);
  font-size: 12px; font-weight: 500; color: var(--text-faint);
  display: flex; align-items: center; gap: 8px;
}
.cp-head .cp-ttl b { color: var(--text); font-weight: 600; }
.cp-head .cp-ttl .cp-srv { color: var(--text-mute); }
.cp-head .cp-ttl .cp-srv::before { content: '·'; margin-right: 7px; color: var(--border-2); }
.cp-head .cp-ttl .cp-bolt { color: var(--primary); }
.cp-head .cp-live {
  margin-left: auto; font-family: var(--font-mono);
  font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--primary);
  display: inline-flex; align-items: center; gap: 6px;
}
.cp-head .cp-live::before {
  content: ''; width: 6px; height: 6px; border-radius: 50%;
  background: var(--primary); box-shadow: 0 0 8px var(--primary);
  animation: cpPulse 2s infinite;
}
@keyframes cpPulse { 0%,100%{opacity:1} 50%{opacity:0.3} }

/* message log */
.cp-log {
  padding: 18px 15px 8px;
  display: flex; flex-direction: column; gap: 14px;
  flex: 1; min-height: 264px;
  justify-content: flex-end;
}

.cp-msg { display: flex; gap: 10px; max-width: 92%; animation: cpMsgIn .3s ease; }
.cp-msg.cp-user { align-self: flex-end; flex-direction: row-reverse; }
@keyframes cpMsgIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.cp-av {
  width: 28px; height: 28px; border-radius: 3px; flex-shrink: 0;
  display: grid; place-items: center;
  font-size: 12px; font-weight: 700;
}
.cp-bot .cp-av { background: var(--primary-soft); color: var(--primary); border: 1px solid var(--primary-line); }
.cp-user .cp-av { background: var(--surface-4); color: var(--text-dim); border: 1px solid var(--border-2); font-family: var(--font-mono); font-size: 10px; }

.cp-bubble {
  padding: 11px 14px;
  border-radius: 4px;
  background: var(--surface-3);
  border: 1px solid var(--border);
  font-size: 14px; line-height: 1.55;
  color: var(--text);
}
.cp-user .cp-bubble {
  background: var(--primary-soft);
  border-color: var(--primary-line);
}

/* thinking dots */
.cp-think .cp-bubble { display: inline-flex; gap: 5px; align-items: center; padding: 14px 16px; }
.cp-think .cp-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--text-mute); animation: cpBob 1.1s infinite; }
.cp-think .cp-dot:nth-child(2){ animation-delay: .15s; }
.cp-think .cp-dot:nth-child(3){ animation-delay: .3s; }
@keyframes cpBob { 0%,60%,100%{transform:translateY(0);opacity:.4} 30%{transform:translateY(-4px);opacity:1} }

/* tool pills (machine actions → mono) */
.cp-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.cp-pill {
  font-family: var(--font-mono);
  font-size: 11.5px; line-height: 1;
  padding: 6px 9px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 3px;
  color: var(--text-dim);
  display: inline-flex; align-items: center; gap: 6px;
  opacity: 0; transform: translateY(3px);
  animation: cpPillIn .28s ease forwards;
}
.cp-pill .gp { color: var(--primary); }
@keyframes cpPillIn { to { opacity: 1; transform: none; } }

/* result card */
.cp-result {
  margin-top: 11px;
  padding: 11px 13px;
  border-radius: 4px;
  background: linear-gradient(0deg, var(--primary-soft), var(--primary-soft)), var(--surface-1);
  border: 1px solid var(--primary-line);
  font-size: 13.5px; color: var(--text);
  display: flex; gap: 10px; align-items: flex-start;
  opacity: 0; transform: translateY(4px);
  animation: cpPillIn .3s ease forwards;
}
.cp-result .cp-check {
  flex-shrink: 0; width: 19px; height: 19px; border-radius: 3px; margin-top: 1px;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-size: 12px; font-weight: 800;
}
.cp-result b { color: var(--primary); font-weight: 700; }

/* composer */
.cp-composer {
  margin: 6px 13px 11px;
  display: flex; align-items: center; gap: 11px;
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 9px 9px 9px 15px;
  flex-shrink: 0;
}
.cp-composer.active { border-color: var(--primary-line); box-shadow: 0 0 0 3px var(--primary-soft); }
.cp-input {
  flex: 1; font-size: 14px; color: var(--text); min-height: 20px;
  white-space: nowrap; overflow: hidden;
}
.cp-input.placeholder { color: var(--text-mute); }
.cp-caret {
  display: inline-block; width: 2px; height: 16px; vertical-align: -3px;
  background: var(--primary); margin-left: 1px;
  animation: cpBlink 1s steps(1) infinite;
}
@keyframes cpBlink { 50% { opacity: 0; } }
.cp-send {
  width: 36px; height: 36px; border-radius: 3px; flex-shrink: 0;
  background: var(--primary); color: #fff;
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
  transition: transform .15s, background .15s;
}
.cp-send:hover { transform: translateY(-1px); background: var(--primary-hover); }
.cp-foot {
  text-align: center; font-family: var(--font-mono);
  font-size: 10px; color: var(--text-mute);
  padding: 0 12px 12px;
}

@media (prefers-reduced-motion: reduce) {
  .cp-pill, .cp-result, .cp-msg { animation: none !important; opacity: 1 !important; transform: none !important; }
  .cp-head .cp-live::before, .cp-think .cp-dot, .cp-caret { animation: none !important; }
}
