/* ══════════════════════════════════════════════════════════════
   Maestro Midcore Interactive Demo Styles
   The Outcome Compiler — From Human Intent to Operational SaaS
   ══════════════════════════════════════════════════════════════ */

/* Layout */
.mc-demo { min-height: 100vh; display: flex; flex-direction: column; background: var(--nbz-bg, #070A13); }

/* Fixed header */
.mc-header { position: fixed; top: 0; left: 0; right: 0; z-index: 50; background: color-mix(in srgb, var(--nbz-bg, #070A13) 85%, transparent); backdrop-filter: blur(20px); border-bottom: 1px solid var(--nbz-border, rgba(255,255,255,0.12)); }
.mc-header-inner { max-width: 1200px; margin: 0 auto; padding: 12px 16px; display: flex; align-items: center; justify-content: space-between; }
.mc-header-logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--nbz-text, rgba(255,255,255,0.93)); font-weight: 700; font-size: 16px; }
.mc-logo-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, #2563EB, #06B6D4); color: #fff; font-size: 16px; }
.mc-header-actions { display: flex; align-items: center; gap: 12px; }
.mc-step-counter { font-size: 13px; color: var(--nbz-muted, rgba(255,255,255,0.68)); }
.mc-btn-trial { padding: 8px 20px; font-size: 13px; font-weight: 600; background: linear-gradient(135deg, #2563EB, #06B6D4); color: #fff; border: none; border-radius: 10px; cursor: pointer; text-decoration: none; transition: opacity 0.2s; }
.mc-btn-trial:hover { opacity: 0.9; }
.mc-btn-close { padding: 8px; color: var(--nbz-muted); background: none; border: none; cursor: pointer; font-size: 18px; transition: color 0.2s; text-decoration: none; }
.mc-btn-close:hover { color: var(--nbz-text); }

/* Demo area */
.mc-stage { flex: 1; padding-top: 60px; position: relative; display: flex; flex-direction: column; min-height: 0; }
.mc-stage-bg { position: absolute; inset: 0; opacity: 0.06; transition: background 1s; z-index: 0; }
.mc-scene-container { position: relative; z-index: 1; flex: 1; min-height: 0; display: flex; align-items: flex-start; justify-content: center; padding: 12px 16px; overflow-y: auto; overflow-x: hidden; }
.mc-scene { width: 100%; max-width: 620px; animation: mcFadeIn 0.4s ease-out; }

@keyframes mcFadeIn { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }

/* Scene card */
.mc-card { background: var(--nbz-panel, rgba(255,255,255,0.06)); border: 1px solid var(--nbz-border, rgba(255,255,255,0.12)); border-radius: 20px; overflow: hidden; box-shadow: 0 25px 50px -12px rgba(0,0,0,0.25); }
.mc-card-header { padding: 14px 18px; border-bottom: 1px solid var(--nbz-border-2, rgba(255,255,255,0.06)); display: flex; align-items: center; gap: 12px; }
.mc-card-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-size: 18px; flex-shrink: 0; }
.mc-card-title { font-size: 14px; font-weight: 700; color: var(--nbz-text); }
.mc-card-subtitle { font-size: 11px; color: var(--nbz-muted); margin-top: 2px; }
.mc-card-body { padding: 16px 18px; }
.mc-card-footer { padding: 12px 18px; border-top: 1px solid var(--nbz-border-2); }

/* Item rows */
.mc-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 14px; background: var(--nbz-panel-3, rgba(255,255,255,0.03)); border: 1px solid var(--nbz-border, rgba(255,255,255,0.12)); margin-bottom: 8px; transition: all 0.3s; }
.mc-item:last-child { margin-bottom: 0; }
.mc-item-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.mc-item-info { flex: 1; min-width: 0; }
.mc-item-label { font-size: 13px; font-weight: 600; color: var(--nbz-text); }
.mc-item-desc { font-size: 11px; color: var(--nbz-muted); margin-top: 2px; }
.mc-item-badge { padding: 4px 10px; border-radius: 999px; font-size: 10px; font-weight: 600; }

/* Gradient classes */
.mc-grad-blue { background: linear-gradient(135deg, #2563EB, #3B82F6); }
.mc-grad-cyan { background: linear-gradient(135deg, #06B6D4, #22D3EE); }
.mc-grad-violet { background: linear-gradient(135deg, #7C3AED, #8B5CF6); }
.mc-grad-emerald { background: linear-gradient(135deg, #059669, #10B981); }
.mc-grad-amber { background: linear-gradient(135deg, #D97706, #F59E0B); }
.mc-grad-rose { background: linear-gradient(135deg, #E11D48, #F43F5E); }
.mc-grad-indigo { background: linear-gradient(135deg, #4F46E5, #6366F1); }
.mc-grad-teal { background: linear-gradient(135deg, #0D9488, #14B8A6); }
.mc-grad-orange { background: linear-gradient(135deg, #EA580C, #F97316); }
.mc-grad-pink { background: linear-gradient(135deg, #DB2777, #EC4899); }
.mc-grad-slate { background: linear-gradient(135deg, #475569, #64748B); }
.mc-grad-sky { background: linear-gradient(135deg, #0284C7, #0EA5E9); }
.mc-grad-lime { background: linear-gradient(135deg, #65A30D, #84CC16); }
.mc-grad-fuchsia { background: linear-gradient(135deg, #A21CAF, #D946EF); }

/* Status colors */
.mc-status-green { background: rgba(34,197,94,0.12); color: #22c55e; }
.mc-status-blue { background: rgba(59,130,246,0.12); color: #3b82f6; }
.mc-status-amber { background: rgba(245,158,11,0.12); color: #f59e0b; }
.mc-status-violet { background: rgba(124,58,237,0.12); color: #7c3aed; }
.mc-status-cyan { background: rgba(6,182,212,0.12); color: #06b6d4; }
.mc-status-rose { background: rgba(244,63,94,0.12); color: #f43f5e; }

/* Progress bar */
.mc-progress { height: 8px; background: var(--nbz-panel-3); border-radius: 999px; overflow: hidden; }
.mc-progress-bar { height: 100%; border-radius: 999px; transition: width 0.5s ease-out; }

/* Stats grid */
.mc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.mc-stats-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.mc-stat { text-align: center; padding: 8px; border-radius: 12px; background: var(--nbz-panel-3); }
.mc-stat-num { font-size: 16px; font-weight: 800; color: var(--nbz-text); }
.mc-stat-label { font-size: 10px; color: var(--nbz-muted); margin-top: 3px; text-transform: uppercase; letter-spacing: 0.05em; }

/* Grid layouts */
.mc-grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.mc-grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

/* Spinner animation */
@keyframes mcSpin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.mc-spin { animation: mcSpin 1s linear infinite; }

/* Pulse animation */
@keyframes mcPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.4; } }
.mc-pulse { animation: mcPulse 2s ease-in-out infinite; }

/* Typing dots */
.mc-typing { display: flex; gap: 5px; padding: 12px 16px; }
.mc-typing span { width: 8px; height: 8px; border-radius: 50%; background: #2563EB; }
@keyframes mcBounce { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-8px); } }
.mc-typing span:nth-child(1) { animation: mcBounce 1.4s infinite 0ms; }
.mc-typing span:nth-child(2) { animation: mcBounce 1.4s infinite 200ms; }
.mc-typing span:nth-child(3) { animation: mcBounce 1.4s infinite 400ms; }

/* Chat bubbles */
.mc-chat-msg { padding: 12px 16px; border-radius: 16px; margin-bottom: 10px; font-size: 13px; line-height: 1.6; max-width: 95%; }
.mc-chat-msg-user { background: linear-gradient(135deg, #2563EB, #3B82F6); color: #fff; margin-left: auto; border-bottom-right-radius: 4px; }
[dir="rtl"] .mc-chat-msg-user { margin-left: 0; margin-right: auto; border-bottom-right-radius: 16px; border-bottom-left-radius: 4px; }
.mc-chat-msg-ai { background: var(--nbz-panel-3); color: var(--nbz-text); border: 1px solid var(--nbz-border); border-bottom-left-radius: 4px; }
[dir="rtl"] .mc-chat-msg-ai { border-bottom-left-radius: 16px; border-bottom-right-radius: 4px; }
.mc-chat-input { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 14px; background: var(--nbz-panel-3); border: 1px solid var(--nbz-border); font-size: 13px; color: var(--nbz-muted); }

/* Terminal / code block */
.mc-terminal { background: #0D1117; border: 1px solid rgba(255,255,255,0.08); border-radius: 14px; overflow: hidden; font-family: 'JetBrains Mono', 'Fira Code', monospace; font-size: 11px; }
.mc-terminal-header { padding: 8px 14px; background: rgba(255,255,255,0.04); border-bottom: 1px solid rgba(255,255,255,0.06); display: flex; align-items: center; gap: 6px; }
.mc-terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.mc-terminal-body { padding: 12px 14px; color: #C9D1D9; line-height: 1.8; min-height: 80px; max-height: 220px; overflow-y: auto; }
.mc-terminal-line { display: flex; gap: 8px; }
.mc-terminal-prompt { color: #22C55E; }
.mc-terminal-cmd { color: #58A6FF; }
.mc-terminal-output { color: #8B949E; }
.mc-terminal-ok { color: #22C55E; }
.mc-terminal-warn { color: #F59E0B; }
.mc-terminal-err { color: #F43F5E; }

/* Pipeline / flow visualization */
.mc-pipeline { display: flex; flex-direction: column; gap: 4px; }
.mc-pipeline-step { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--nbz-panel-3); border: 1px solid var(--nbz-border); transition: all 0.4s; }
.mc-pipeline-step.active { border-color: #2563EB; background: rgba(37,99,235,0.08); }
.mc-pipeline-step.done { border-color: #22C55E; background: rgba(34,197,94,0.06); }
.mc-pipeline-num { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: 10px; font-weight: 700; background: var(--nbz-panel-3); color: var(--nbz-muted); flex-shrink: 0; transition: all 0.3s; }
.mc-pipeline-step.active .mc-pipeline-num { background: #2563EB; color: #fff; }
.mc-pipeline-step.done .mc-pipeline-num { background: #22C55E; color: #fff; }
.mc-pipeline-label { font-size: 12px; font-weight: 600; color: var(--nbz-text); }
.mc-pipeline-status { margin-left: auto; font-size: 10px; font-weight: 600; }

/* Connector lines between pipeline steps */
.mc-pipeline-connector { width: 2px; height: 8px; background: var(--nbz-border); margin-left: 22px; transition: background 0.3s; }
.mc-pipeline-connector.done { background: #22C55E; }

/* Tree / folder structure */
.mc-tree { font-family: 'JetBrains Mono', monospace; font-size: 11px; line-height: 1.9; color: var(--nbz-muted); padding: 12px 14px; background: var(--nbz-panel-3); border-radius: 12px; border: 1px solid var(--nbz-border); }
.mc-tree-highlight { color: #2563EB; font-weight: 600; }
.mc-tree-new { color: #22C55E; }
.mc-tree-folder { color: #F59E0B; }

/* Local badge */
.mc-local-badge { margin-left: auto; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid; display: flex; align-items: center; gap: 4px; }

/* Controls panel */
.mc-controls { background: var(--nbz-panel, rgba(255,255,255,0.06)); border-top: 1px solid var(--nbz-border); padding: 12px 16px 16px; flex-shrink: 0; }
.mc-controls-inner { max-width: 800px; margin: 0 auto; }

/* Step info */
.mc-step-info { text-align: center; margin-bottom: 10px; }
.mc-step-badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 14px; border-radius: 999px; color: #fff; font-size: 11px; font-weight: 600; margin-bottom: 6px; }
.mc-step-title { font-size: clamp(16px, 2.5vw, 22px); font-weight: 800; color: var(--nbz-text); margin: 0 0 4px; }
.mc-step-desc { font-size: 12px; color: var(--nbz-muted); max-width: 560px; margin: 0 auto; line-height: 1.5; }

/* Progress track */
.mc-progress-track { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.mc-nav-btn { width: 40px; height: 40px; border-radius: 12px; border: none; background: var(--nbz-panel-3); color: var(--nbz-text); cursor: pointer; display: grid; place-items: center; font-size: 16px; transition: background 0.2s; flex-shrink: 0; }
.mc-nav-btn:hover { background: var(--nbz-border); }
.mc-segments { display: flex; gap: 3px; flex: 1; align-items: center; }
.mc-segment { flex: 1; height: 4px; border-radius: 2px; background: var(--nbz-panel-3); overflow: hidden; cursor: pointer; transition: height 0.2s; }
.mc-segment:hover { height: 6px; }
.mc-segment-fill { height: 100%; border-radius: 2px; width: 0; transition: width 0.15s linear; }

/* Play row */
.mc-play-row { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 10px; }
.mc-play-btn { width: 36px; height: 36px; border-radius: 50%; border: none; background: linear-gradient(135deg, #2563EB, #06B6D4); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 14px; transition: opacity 0.2s; }
.mc-play-btn:hover { opacity: 0.85; }
.mc-play-label { font-size: 12px; color: var(--nbz-muted); }

/* CTA */
.mc-cta { text-align: center; }
.mc-cta-btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 28px; background: linear-gradient(135deg, #2563EB, #06B6D4); color: #fff; font-size: 15px; font-weight: 700; border: none; border-radius: 14px; cursor: pointer; text-decoration: none; transition: opacity 0.2s, transform 0.2s; }
.mc-cta-btn:hover { opacity: 0.9; transform: translateY(-1px); }
.mc-cta-sub { margin-top: 8px; font-size: 12px; color: var(--nbz-muted); }

/* ── Responsive ── */
@media (max-width: 768px) {
  .mc-stats-4 { grid-template-columns: repeat(2, 1fr); }
  .mc-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .mc-step-title { font-size: 18px; }
}

@media (max-width: 480px) {
  .mc-stats, .mc-grid-2 { grid-template-columns: 1fr; }
  .mc-grid-3, .mc-stats-4 { grid-template-columns: 1fr; }
  .mc-header-actions .mc-btn-trial { display: none; }
  .mc-cta-btn { padding: 10px 20px; font-size: 14px; }
}

/* ── RTL Adjustments ── */
[dir="rtl"] .mc-pipeline-connector { margin-left: 0; margin-right: 22px; }
[dir="rtl"] .mc-pipeline-status { margin-left: 0; margin-right: auto; }
[dir="rtl"] .mc-local-badge { margin-left: 0; margin-right: auto; }
