/* ═══════════════════════════════════════════
   voice-agent.css — Apex Systematic
   Page-specific styles for the voice agent demo.
   Requires: style.css, demo.css
═══════════════════════════════════════════ */

/* ── EXACT PROPOSALS DEMO DESIGN SYSTEM ── */


*, ::before, ::after { box-sizing: border-box; margin: 0; padding: 0; }

/* ── HEADER — exact proposals structure ── */

/* ── PIPELINE BAR — exact proposals structure ── */

/* ── CARDS ── */


.main-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 24px;
}



@media (max-width: 800px) { .main-grid { grid-template-columns: 1fr; } }



.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
}



.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

/* ── FORM ── */



.page-wrapper input, .page-wrapper select {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 14px;
  padding: 11px 14px;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
  appearance: none;
}

.page-wrapper input:focus, .page-wrapper select:focus {
  border-color: var(--border-gold);
  box-shadow: 0 0 0 3px rgba(201,168,76,0.07);
}

/* ── STATUS ── */


.status-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}



.status-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }



.call-block {
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
}



.call-initials {
  width: 38px; height: 38px;
  border-radius: var(--radius);
  background: var(--gold-dim);
  border: 1px solid var(--border-gold);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 15px; color: var(--gold);
  flex-shrink: 0;
}



.call-meta { flex: 1; }


.call-name   { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 2px; }


.call-detail { font-size: 12px; color: var(--text-muted); }



.call-timer {
  font-family: var(--font-display);
  font-size: 18px; color: var(--gold);
  min-width: 44px; text-align: right; letter-spacing: 0.04em;
}



.waveform {
  display: flex; align-items: center; gap: 3px;
  height: 24px; margin-bottom: 16px;
  opacity: 0; transition: opacity 0.4s;
}



.waveform.active { opacity: 1; }



.w-bar { width: 3px; background: var(--gold); border-radius: 2px; animation: wv 1.2s ease-in-out infinite; opacity: 0.7; }


.w-bar:nth-child(1)  { animation-delay: 0s;    height: 6px;  }


.w-bar:nth-child(2)  { animation-delay: 0.1s;  height: 16px; }


.w-bar:nth-child(3)  { animation-delay: 0.2s;  height: 22px; }


.w-bar:nth-child(4)  { animation-delay: 0.3s;  height: 12px; }


.w-bar:nth-child(5)  { animation-delay: 0.4s;  height: 20px; }


.w-bar:nth-child(6)  { animation-delay: 0.5s;  height: 8px;  }


.w-bar:nth-child(7)  { animation-delay: 0.6s;  height: 18px; }


.w-bar:nth-child(8)  { animation-delay: 0.7s;  height: 14px; }


.w-bar:nth-child(9)  { animation-delay: 0.8s;  height: 24px; }


.w-bar:nth-child(10) { animation-delay: 0.9s;  height: 10px; }


.w-bar:nth-child(11) { animation-delay: 1.0s;  height: 18px; }


.w-bar:nth-child(12) { animation-delay: 1.1s;  height: 7px;  }



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



.steps-list { display: flex; flex-direction: column; gap: 8px; }



.step-item { display: flex; align-items: center; gap: 10px; opacity: 0.25; transition: opacity 0.4s; }


.step-item.active { opacity: 1; }


.step-item.done   { opacity: 0.6; }



.step-num {
  width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; color: var(--text-dim);
  flex-shrink: 0; transition: all 0.4s;
}



.step-item.active .step-num { border-color: var(--gold);  background: var(--gold-dim);  color: var(--gold);  }


.step-item.done   .step-num { border-color: var(--green); background: var(--green-dim); color: var(--green); }



.step-label { font-size: 13px; color: var(--text-muted); }


.step-item.active .step-label { color: var(--text); }

/* ── TRANSCRIPT ── */


.transcript-card { grid-column: 1 / -1; min-height: 260px; }



.messages {
  display: flex; flex-direction: column; gap: 12px;
  max-height: 320px; overflow-y: auto; padding-right: 4px;
}



.messages::-webkit-scrollbar { width: 4px; }


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



.msg {
  display: flex; gap: 12px;
  opacity: 0; transform: translateY(8px);
  animation: fadeUp 0.4s ease forwards;
}



.msg-av {
  width: 32px; height: 32px; border-radius: var(--radius); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 600; letter-spacing: 0.04em;
}



.msg.agent .msg-av { background: var(--gold-dim);  border: 1px solid var(--border-gold); color: var(--gold); }


.msg.lead  .msg-av { background: var(--bg-input); border: 1px solid var(--border);      color: var(--text-muted); }



.msg-who {
  font-size: 10px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 5px;
}



.msg.agent .msg-who { color: var(--gold); }



.msg-bubble {
  font-size: 14px; line-height: 1.65; color: var(--text-muted);
  background: var(--bg-input); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 14px; display: inline-block;
}



.msg.agent .msg-bubble {
  background: rgba(201,168,76,0.04);
  border-color: rgba(201,168,76,0.12);
  color: var(--text);
}



.typing-row { display: none; gap: 12px; align-items: center; }


.typing-row.show { display: flex; }



.typing-dots {
  padding: 10px 14px;
  background: rgba(201,168,76,0.04); border: 1px solid rgba(201,168,76,0.12);
  border-radius: var(--radius); display: flex; gap: 4px; align-items: center;
}



.typing-dots span {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--gold); opacity: 0.4; animation: tdot 1.2s ease infinite;
}



.typing-dots span:nth-child(2) { animation-delay: 0.2s; }


.typing-dots span:nth-child(3) { animation-delay: 0.4s; }



@keyframes tdot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40%            { transform: scale(1);  opacity: 1;   }
}

/* ── OUTCOME ── */


.outcome-card { grid-column: 1 / -1; display: none; }


.outcome-card.show { display: block; }



.outcome-inner { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }



.outcome-badge {
  width: 52px; height: 52px; border-radius: var(--radius);
  background: var(--green-dim); border: 1px solid rgba(46,204,113,0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; flex-shrink: 0;
}



.outcome-text h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; color: var(--green); margin-bottom: 4px; }


.outcome-text p  { font-size: 13px; color: var(--text-muted); }



.outcome-meta { margin-left: auto; text-align: right; }


.outcome-meta-row { font-size: 12px; color: var(--text-muted); margin-bottom: 3px; }


.outcome-meta-row strong { color: var(--text); font-weight: 500; }

/* Reset */


.reset-wrap { text-align: center; margin-top: 20px; }



.reset-btn {
  display: none;
  padding: 10px 28px;
  border-radius: var(--radius); border: 1px solid var(--border);
  background: transparent; color: var(--text-muted);
  font-family: var(--font-body); font-size: 13px; font-weight: 500;
  cursor: pointer; transition: 0.2s; letter-spacing: 0.04em;
}



.reset-btn:hover { border-color: var(--border-gold); color: var(--gold); }


.reset-btn.show { display: inline-block; }

/* ── CTA — exact proposals match ── */

/* ── FOOTER — exact proposals match ── */



@media (max-width: 900px) {
  .main-grid { grid-template-columns: 1fr; }
  .cta-section { padding: 28px 20px; }
  .pipeline-bar { justify-content: flex-start; }
}