/* Shared AI Agent demo chrome */

.agent-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.85rem 0 0;
}

.agent-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.agent-chip.is-live {
  color: var(--green);
  border-color: rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
}

.agent-layout {
  display: grid;
  gap: 1rem;
}

@media (min-width: 960px) {
  .agent-layout {
    grid-template-columns: 1.15fr 0.85fr;
    align-items: start;
  }
}

.agent-panel {
  border-radius: 1.15rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.32);
  overflow: hidden;
  min-height: 480px;
  display: flex;
  flex-direction: column;
}

.agent-panel-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.95rem 1rem;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.agent-panel-head .avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.78rem;
  color: #04140c;
  background: linear-gradient(135deg, var(--green), var(--cyan));
  flex-shrink: 0;
}

.agent-panel-head strong {
  display: block;
  font-size: 0.95rem;
}

.agent-panel-head span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.agent-stream {
  flex: 1;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  overflow-y: auto;
  max-height: 340px;
}

.agent-bubble {
  max-width: 90%;
  padding: 0.75rem 0.9rem;
  border-radius: 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}

.agent-bubble.bot {
  align-self: flex-start;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  border-bottom-left-radius: 0.25rem;
}

.agent-bubble.user {
  align-self: flex-end;
  background: linear-gradient(135deg, rgba(34, 197, 94, 0.9), rgba(34, 211, 238, 0.75));
  color: #04140c;
  font-weight: 600;
  border-bottom-right-radius: 0.25rem;
}

.agent-bubble.system {
  align-self: center;
  max-width: 100%;
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  background: transparent;
  border: none;
  padding: 0.25rem;
}

.agent-card {
  align-self: stretch;
  margin-top: 0.25rem;
  padding: 0.9rem;
  border-radius: 0.95rem;
  border: 1px solid rgba(34, 197, 94, 0.35);
  background: rgba(34, 197, 94, 0.08);
  font-size: 0.86rem;
}

.agent-card strong {
  display: block;
  margin-bottom: 0.35rem;
}

.agent-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border);
}

.agent-side h4 {
  margin: 0 0 0.65rem;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.agent-steps {
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
  display: grid;
  gap: 0.45rem;
}

.agent-steps li {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0.55rem;
  padding: 0.65rem 0.7rem;
  border-radius: 0.8rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  font-size: 0.84rem;
  color: var(--muted);
}

.agent-steps li.is-done {
  color: var(--white);
  border-color: rgba(34, 197, 94, 0.3);
}

.agent-steps li.is-active {
  color: var(--white);
  border-color: rgba(34, 211, 238, 0.4);
  background: rgba(34, 211, 238, 0.08);
}

.agent-steps .n {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.06);
}

.agent-steps li.is-done .n,
.agent-steps li.is-active .n {
  background: rgba(34, 197, 94, 0.2);
  color: var(--green);
}

.arch-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.arch-pill {
  padding: 0.35rem 0.65rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
}

.arch-pill.accent {
  color: var(--cyan);
  border-color: rgba(34, 211, 238, 0.3);
}

/* Instagram phone */
.ig-phone {
  width: min(320px, 100%);
  margin: 0 auto;
  border-radius: 1.6rem;
  border: 1px solid var(--border);
  background: #05070d;
  padding: 0.55rem;
  min-height: 520px;
}

.ig-screen {
  height: 100%;
  min-height: 500px;
  border-radius: 1.25rem;
  background: #0a0f18;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ig-top {
  padding: 0.75rem 0.85rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.ig-top .dot {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f97316, #ec4899, #8b5cf6);
}

.ig-stream {
  flex: 1;
  padding: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  overflow-y: auto;
  max-height: 360px;
}

.ig-product {
  border: 1px solid var(--border);
  border-radius: 0.9rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
}

.ig-product .price {
  color: var(--green);
  font-weight: 800;
}

/* Voice call UI */
.voice-stage {
  text-align: center;
  padding: 1.25rem 1rem 1rem;
}

.voice-orb {
  width: 120px;
  height: 120px;
  margin: 0.5rem auto 1rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at 35% 30%, rgba(34, 211, 238, 0.45), rgba(34, 197, 94, 0.15) 55%, rgba(0, 0, 0, 0.4));
  border: 1px solid rgba(34, 211, 238, 0.35);
  box-shadow: 0 0 40px rgba(34, 211, 238, 0.15);
  font-size: 2rem;
}

.voice-orb.is-live {
  animation: voicePulse 1.6s ease-in-out infinite;
}

.voice-orb.is-speaking {
  animation: voicePulse 0.7s ease-in-out infinite;
  border-color: rgba(34, 197, 94, 0.7);
}

@keyframes voicePulse {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 30px rgba(34, 211, 238, 0.15);
  }
  50% {
    transform: scale(1.05);
    box-shadow: 0 0 50px rgba(34, 197, 94, 0.28);
  }
}

.voice-transcript {
  text-align: left;
  margin-top: 0.75rem;
  max-height: 220px;
  overflow-y: auto;
  display: grid;
  gap: 0.45rem;
}

.voice-line {
  padding: 0.55rem 0.7rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.22);
  font-size: 0.84rem;
}

.voice-line.agent {
  border-color: rgba(34, 211, 238, 0.25);
}

.voice-line.caller {
  border-color: rgba(34, 197, 94, 0.25);
}

.agents-hub-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.75rem;
}

@media (min-width: 768px) {
  .agents-hub-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1100px) {
  .agents-hub-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.agent-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  min-height: 220px;
  padding: 1.25rem;
  color: inherit;
}

.agent-hub-card h3 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
}

.agent-hub-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  flex: 1;
}

@media (prefers-reduced-motion: reduce) {
  .voice-orb.is-live {
    animation: none;
  }
}
