/* ============================================================
   OpsForge AI Demo Widget — inline hero section
   Auto-playing simulation of an OpsForge AI agent conversation.
   Uses same visual language as the floating chatbot (dark, cyan).
   ============================================================ */

.demo-chat-section {
  position: relative;
  max-width: 1100px;
  margin: 0 auto;
  width: 100%;
  padding: 4rem 2rem 0;
}

/* Section header */
.demo-header {
  text-align: center;
  margin-bottom: 2rem;
}
.demo-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Manrope', sans-serif;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(0, 229, 255, 0.7);
  margin-bottom: 0.5rem;
}
.demo-eyebrow-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #00E5FF;
  animation: demo-pulse 2s infinite;
}
@keyframes demo-pulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 4px #00E5FF; }
  50% { opacity: 0.4; box-shadow: none; }
}
.demo-title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 3vw, 1.9rem);
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
  margin-bottom: 0.5rem;
}
.demo-sub {
  font-family: 'Manrope', sans-serif;
  font-size: 0.88rem;
  color: rgba(255,255,255,0.45);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Demo container */
.demo-chat-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: #0A0F1E;
  border: 1px solid rgba(0, 229, 255, 0.12);
  border-radius: 20px;
  overflow: hidden;
  box-shadow:
    0 0 60px rgba(0, 229, 255, 0.06),
    0 30px 80px rgba(0, 0, 0, 0.5);
}

/* Left panel — browser chrome / avatar */
.demo-left {
  background: rgba(0, 229, 255, 0.03);
  border-right: 1px solid rgba(0, 229, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  gap: 1.5rem;
  position: relative;
  overflow: hidden;
}
.demo-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 80% at 50% 40%, rgba(0,229,255,0.06) 0%, transparent 70%);
  pointer-events: none;
}
.demo-avatar-ring {
  width: 90px;
  height: 90px;
  border-radius: 50%;
  background: rgba(0, 229, 255, 0.08);
  border: 2px solid rgba(0, 229, 255, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 30px rgba(0, 229, 255, 0.15);
  animation: avatar-glow 3s ease-in-out infinite;
}
@keyframes avatar-glow {
  0%, 100% { box-shadow: 0 0 20px rgba(0, 229, 255, 0.15); }
  50% { box-shadow: 0 0 40px rgba(0, 229, 255, 0.3); }
}
.demo-avatar-ring svg { width: 48px; height: 48px; }
.demo-agent-info { text-align: center; }
.demo-agent-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 0.3rem;
}
.demo-agent-role {
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  margin-bottom: 0.9rem;
}
.demo-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(52, 211, 153, 0.12);
  border: 1px solid rgba(52, 211, 153, 0.25);
  border-radius: 100px;
  padding: 0.3rem 0.8rem;
  font-family: 'Manrope', sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  color: #34D399;
}
.demo-status-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #34D399;
  animation: status-blink 1.6s infinite;
}
@keyframes status-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}
.demo-capability-list {
  margin-top: 1.5rem;
  width: 100%;
}
.demo-capability {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.45rem 0;
  font-family: 'Manrope', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.55);
}
.demo-cap-icon {
  width: 18px;
  height: 18px;
  border-radius: 4px;
  background: rgba(0, 229, 255, 0.1);
  border: 1px solid rgba(0, 229, 255, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.demo-cap-icon svg { width: 10px; height: 10px; }

/* Right panel — the chat thread */
.demo-right {
  display: flex;
  flex-direction: column;
  min-height: 420px;
  max-height: 420px;
}
.demo-chat-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid rgba(0,229,255,0.08);
  background: rgba(0,229,255,0.02);
}
.demo-chat-header-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.demo-chat-header-icon svg { width: 14px; height: 14px; }
.demo-chat-header-name {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
}
.demo-chat-header-status {
  font-family: 'Manrope', sans-serif;
  font-size: 0.68rem;
  color: #00E5FF;
  display: flex;
  align-items: center;
  gap: 4px;
}
.demo-chat-header-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #00E5FF;
}
.demo-live-badge {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 4px;
  background: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.2);
  border-radius: 100px;
  padding: 0.2rem 0.6rem;
  font-family: 'Manrope', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  color: #F87171;
  letter-spacing: 0.05em;
}
.demo-live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #F87171;
  animation: live-blink 1s infinite;
}
@keyframes live-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.2; }
}

/* Chat messages */
.demo-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
  scrollbar-width: thin;
  scrollbar-color: rgba(0,229,255,0.15) transparent;
}
.demo-messages::-webkit-scrollbar { width: 3px; }
.demo-messages::-webkit-scrollbar-thumb { background: rgba(0,229,255,0.15); border-radius: 2px; }

/* Message bubbles */
.demo-msg {
  display: flex;
  gap: 8px;
  animation: msg-enter 0.3s ease-out;
}
@keyframes msg-enter {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}
.demo-msg.user { align-self: flex-end; flex-direction: row-reverse; }
.demo-msg-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.demo-msg-icon svg { width: 10px; height: 10px; }
.demo-msg.user .demo-msg-icon { display: none; }
.demo-bubble {
  padding: 9px 13px;
  font-family: 'Manrope', sans-serif;
  font-size: 0.8rem;
  line-height: 1.55;
  color: var(--cb-text, #E2E8F0);
  max-width: 85%;
  word-break: break-word;
}
.demo-msg.ai .demo-bubble {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px 12px 12px 3px;
  color: rgba(255,255,255,0.85);
}
.demo-msg.user .demo-bubble {
  background: rgba(0,229,255,0.1);
  border: 1px solid rgba(0,229,255,0.18);
  border-radius: 12px 12px 3px 12px;
  color: #fff;
}

/* Typing indicator */
.demo-typing {
  display: flex;
  gap: 4px;
  align-items: center;
  padding: 0 0 2px 28px;
}
.demo-typing span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: rgba(0,229,255,0.5);
  animation: typing-bounce 1.1s infinite;
}
.demo-typing span:nth-child(2) { animation-delay: 0.18s; }
.demo-typing span:nth-child(3) { animation-delay: 0.36s; }
@keyframes typing-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50% { transform: translateY(-4px); opacity: 1; }
}

/* "Continue chatting" footer */
.demo-footer {
  padding: 0.75rem 1.2rem;
  border-top: 1px solid rgba(0,229,255,0.06);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: rgba(0,229,255,0.01);
}
.demo-footer-text {
  font-family: 'Manrope', sans-serif;
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
}
.demo-footer-text strong {
  color: rgba(255,255,255,0.7);
  font-weight: 600;
}
.demo-chat-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #00E5FF;
  color: #080B14;
  font-family: 'Manrope', sans-serif;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.45rem 0.9rem;
  border-radius: 6px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
  box-shadow: 0 0 12px rgba(0,229,255,0.3);
}
.demo-chat-cta:hover {
  background: #33EBFF;
  transform: translateY(-1px);
  box-shadow: 0 0 20px rgba(0,229,255,0.45);
}
.demo-chat-cta svg { width: 12px; height: 12px; }

/* Responsive */
@media (max-width: 768px) {
  .demo-chat-wrap { grid-template-columns: 1fr; }
  .demo-left { border-right: none; border-bottom: 1px solid rgba(0,229,255,0.08); padding: 2rem 1.5rem; }
  .demo-right { min-height: 350px; max-height: 350px; }
  .demo-chat-section { padding: 3rem 1.5rem 0; }
}