/* ============================================================
   VIDEO DEMO — animated "video-like" product walkthrough
   Bukan file video asli — ini sequence HTML/CSS/JS yang jalan
   sendiri, dibangun dari mockup yang sama dengan Demo Interaktif.
   Palet & komponen tetap Nota Dapur.
   ============================================================ */

.vd-wrap {
  position: relative;
  margin-top: 36px;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  background: #0f1512;
  aspect-ratio: 16/9;
  max-width: 880px;
}

/* fake "player chrome" bar on top, sells the video framing */
.vd-chrome {
  position: absolute; top: 0; left: 0; right: 0; z-index: 5;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(180deg, rgba(15,21,18,0.75), transparent);
}
.vd-chrome-dot { width: 9px; height: 9px; border-radius: 50%; }
.vd-chrome-dot.red { background: #E5675A; }
.vd-chrome-dot.yellow { background: #E8B84B; }
.vd-chrome-dot.green { background: #5FAE79; }
.vd-chrome-label {
  margin-left: 8px; font-family: var(--font-mono); font-size: 11px; font-weight: 600;
  color: rgba(255,255,255,0.65); letter-spacing: .03em;
}
.vd-chrome-live {
  margin-left: auto; display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; color: #fff;
  background: rgba(193,67,42,0.9); padding: 3px 9px; border-radius: var(--radius-full);
  letter-spacing: .04em;
}
.vd-chrome-live-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: vd-blink 1.2s infinite; }
@keyframes vd-blink { 0%,100% { opacity: 1; } 50% { opacity: .25; } }

/* stage: fills the frame, each scene is absolutely positioned & cross-fades */
.vd-stage {
  position: absolute; inset: 0;
  background: linear-gradient(135deg, #F2F3EF 0%, #EAEBE5 100%);
  overflow: hidden;
}
.vd-scene {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(0.97) translateY(10px);
  transition: opacity .55s cubic-bezier(.16,1,.3,1), transform .55s cubic-bezier(.16,1,.3,1);
  pointer-events: none;
  padding: 46px 32px 40px;
}
.vd-scene.vd-active {
  opacity: 1; transform: scale(1) translateY(0);
  pointer-events: auto;
  z-index: 2;
}

/* ── Scene 1 & 9: opening / closing brand card ─────────────── */
.vd-brand-scene { flex-direction: column; gap: 14px; text-align: center; color: #fff; }
.vd-brand-logo {
  width: 64px; height: 64px; border-radius: 18px;
  background: var(--brand-primary); display: flex; align-items: center; justify-content: center;
  font-size: 28px; box-shadow: 0 10px 30px rgba(31,77,62,0.4);
  animation: vd-pop-in .6s cubic-bezier(.16,1,.3,1);
}
@keyframes vd-pop-in { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
.vd-brand-name { font-family: var(--font-display); font-size: 26px; font-weight: 800; }
.vd-brand-tag { font-family: var(--font-mono); font-size: 12.5px; color: rgba(255,255,255,0.65); letter-spacing: .04em; }
.vd-brand-scene .btn { margin-top: 6px; }

/* ── generic mini browser chrome used inside scenes (mirrors demo-window) ── */
.vd-mini-app {
  width: 100%; height: 100%; background: #fff; border-radius: var(--radius-lg);
  overflow: hidden; box-shadow: var(--shadow-md); display: flex; flex-direction: column;
  transform-origin: center; position: relative;
}
.vd-mini-bar {
  display: flex; align-items: center; gap: 6px; padding: 8px 12px;
  background: var(--bg-surface); border-bottom: 1px solid var(--border-subtle); flex-shrink: 0;
}
.vd-mini-dot { width: 7px; height: 7px; border-radius: 50%; }
.vd-mini-body { flex: 1; overflow: hidden; position: relative; }

/* zoom effect for dashboard stats scene */
.vd-zoom-target { transition: transform 2.6s cubic-bezier(.16,1,.3,1); transform-origin: 62% 55%; }
.vd-scene.vd-active .vd-zoom-target { transform: scale(1.18); }

/* highlight glow ring used to draw attention to an element — JS toggles .vd-pulse-now */
.vd-highlight { position: relative; }
.vd-highlight.vd-pulse-now::after {
  content: ''; position: absolute; inset: -4px; border-radius: inherit;
  border: 2px solid var(--brand-secondary, #C98A2C);
  opacity: 0; animation: vd-highlight-pulse 1.6s ease-in-out 2;
}
@keyframes vd-highlight-pulse {
  0% { opacity: 0; transform: scale(0.96); }
  30% { opacity: 1; transform: scale(1.02); }
  100% { opacity: 0; transform: scale(1.05); }
}

/* fake cursor that moves across a scene */
.vd-cursor {
  position: absolute; width: 20px; height: 20px; z-index: 20;
  pointer-events: none; opacity: 0;
  transition: left 1.1s cubic-bezier(.45,0,.2,1), top 1.1s cubic-bezier(.45,0,.2,1), opacity .3s ease;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.35));
}
.vd-cursor.vd-show { opacity: 1; }
.vd-cursor svg { display: block; }
.vd-cursor.vd-click::before {
  content: ''; position: absolute; top: 50%; left: 30%; width: 26px; height: 26px;
  margin: -13px 0 0 -13px; border-radius: 50%; background: rgba(31,77,62,0.35);
  animation: vd-click-ripple .5s ease-out;
}
@keyframes vd-click-ripple { 0% { transform: scale(0.3); opacity: .9; } 100% { transform: scale(1.6); opacity: 0; } }

/* counters */
.vd-counter { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* toast/notification slide-in used in "pesanan realtime" scene */
.vd-toast {
  position: absolute; top: 14px; right: 14px;
  background: #fff; border-left: 3px solid var(--brand-primary);
  border-radius: var(--radius-md); box-shadow: var(--shadow-lg);
  padding: 10px 14px; font-size: 11.5px; font-weight: 600; color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
  transform: translateX(140%); transition: transform .5s cubic-bezier(.16,1,.3,1);
  z-index: 10;
}
.vd-toast.vd-show { transform: translateX(0); }
.vd-toast-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand-secondary,#C98A2C); animation: wa-pulse-ring 1.4s infinite; }

/* order status pill transition (Baru -> Diproses -> Siap -> Selesai) */
.vd-status-pill {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 10.5px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-full);
  transition: background .4s ease, color .4s ease;
}
.vd-status-pill[data-state="baru"] { background: rgba(193,67,42,0.12); color: #C1432A; }
.vd-status-pill[data-state="proses"] { background: rgba(201,138,44,0.15); color: #C98A2C; }
.vd-status-pill[data-state="siap"] { background: rgba(91,140,62,0.14); color: #5B8C3E; }
.vd-status-pill[data-state="selesai"] { background: rgba(31,77,62,0.12); color: #1F4D3E; }

/* QR generate reveal */
.vd-qr-box {
  width: 96px; height: 96px; border-radius: var(--radius-md);
  background: repeating-conic-gradient(#1B2420 0% 25%, #fff 0% 50%) 0 0/16px 16px;
  border: 6px solid #fff; box-shadow: var(--shadow-md);
  clip-path: circle(0% at 50% 50%);
  transition: clip-path .9s cubic-bezier(.16,1,.3,1);
}
.vd-scene.vd-active .vd-qr-box.vd-qr-reveal { clip-path: circle(75% at 50% 50%); }

/* progress bar (scrubber) */
.vd-controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 6;
  padding: 10px 14px 12px;
  background: linear-gradient(0deg, rgba(15,21,18,0.85), transparent);
  display: flex; align-items: center; gap: 10px;
}
.vd-progress-track {
  flex: 1; height: 4px; border-radius: 99px; background: rgba(255,255,255,0.22); overflow: hidden;
  cursor: pointer;
}
.vd-progress-fill { height: 100%; width: 0%; background: var(--brand-secondary,#C98A2C); border-radius: 99px; }
.vd-time { font-family: var(--font-mono); font-size: 10.5px; color: rgba(255,255,255,0.75); min-width: 62px; text-align: right; }
.vd-scene-label { font-family: var(--font-mono); font-size: 10.5px; color: rgba(255,255,255,0.9); font-weight: 600; min-width: 108px; }
.vd-replay-btn {
  width: 26px; height: 26px; border-radius: 50%; background: rgba(255,255,255,0.14); border: none;
  color: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; flex-shrink: 0;
  transition: background var(--transition-fast);
}
.vd-replay-btn:hover { background: rgba(255,255,255,0.26); }

@media (max-width: 640px) {
  .vd-scene { padding: 40px 16px 34px; }
  .vd-scene-label { display: none; }
  .vd-brand-name { font-size: 20px; }
}
