/* ==========================================================================
   HERO LIVE DEMO (live-demo.js) — mini Premiere window + Caption Bunny panel
   ========================================================================== */
.ld { --ld-head: 34px; --ld-accent: #ff4d8b; --ld-blue: #2680eb; font-family: Inter, system-ui, sans-serif; }

.ld-steps { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; }
.ld-steps li { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; color: var(--clay-ink, #0a0a0a); background: var(--clay-card, #f5f0e0); border-radius: 999px; padding: 6px 12px 6px 6px; opacity: .55; transition: opacity .25s, background .25s; }
.ld-steps li b { display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--clay-ink, #0a0a0a); color: #fff; font-size: 11px; }
.ld-steps li.on { opacity: 1; background: #fff; box-shadow: 0 0 0 1px var(--clay-hair, #e5e0d0); }
.ld-steps li.on b { background: var(--ld-accent); }
.ld-steps li.done { opacity: .9; }
.ld-steps li.done b { background: #16a34a; }

.ld-window { position: relative; background: #1d1d1d; border-radius: 14px; overflow: hidden; color: #d6d6d6; box-shadow: 0 30px 70px -25px rgba(0,0,0,.55); text-align: left; user-select: none; }
.ld-titlebar { display: flex; align-items: center; gap: 12px; height: 34px; padding: 0 12px; background: #2a2a2a; border-bottom: 1px solid #111; font-size: 12px; color: #9a9a9a; }
.ld-dots { display: flex; gap: 6px; }
.ld-dots i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.ld-dots i:nth-child(2) { background: #febc2e; }
.ld-dots i:nth-child(3) { background: #28c840; }
.ld-title { flex: 1; text-align: center; }
.ld-title b { color: #e6e6e6; font-weight: 600; }
.ld-live { display: flex; align-items: center; gap: 6px; font-weight: 700; color: #fca5a5; text-transform: uppercase; font-size: 10px; letter-spacing: .1em; }
.ld-live i { width: 7px; height: 7px; border-radius: 50%; background: #ef4444; animation: ldBlink 1.4s infinite; }
@keyframes ldBlink { 50% { opacity: .3; } }

.ld-body { display: grid; grid-template-columns: 1fr 360px; height: 560px; }
.ld-left { display: grid; grid-template-rows: 1fr auto; min-width: 0; border-right: 1px solid #111; }

.ld-monitor { display: flex; flex-direction: column; min-height: 0; background: #232323; }
.ld-mon-head { font-size: 11px; padding: 6px 10px; color: #c8c8c8; border-bottom: 1px solid #151515; }
.ld-frame { flex: 1; min-height: 0; aspect-ratio: 9 / 16; margin: 8px auto; background: #000; }
.ld-frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ld-preview-tag { position: absolute; top: 6px; left: 6px; z-index: 4; font-size: 9px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; background: rgba(0,0,0,.6); color: #fff; padding: 3px 6px; border-radius: 4px; opacity: 0; transition: opacity .2s; }
.ld-frame.previewing .ld-preview-tag { opacity: 1; }
.ld-tc { display: flex; justify-content: space-between; padding: 2px 10px 6px; font: 600 11px/1 ui-monospace, Menlo, monospace; color: #2d8ceb; }
.ld-tc span:last-child { color: #888; }

.ld-timeline { position: relative; background: #1b1b1b; border-top: 1px solid #111; padding: 0 0 8px; }
.ld-ruler { position: relative; height: 20px; margin-left: var(--ld-head); border-bottom: 1px solid #333; font: 9px ui-monospace, Menlo, monospace; color: #777; }
.ld-ruler span { position: absolute; top: 5px; transform: translateX(-50%); }
.ld-ruler span:first-child { transform: none; }
.ld-ruler span:last-child { transform: translateX(-100%); }
.ld-track { display: flex; height: 28px; margin-top: 4px; }
.ld-tname { width: var(--ld-head); flex: none; display: grid; place-items: center; font-size: 10px; font-weight: 700; color: #999; background: #262626; border-radius: 3px; margin-right: 0; }
.ld-lane { position: relative; flex: 1; background: #202020; margin-right: 8px; }
.ld-clip { position: absolute; top: 2px; bottom: 2px; left: 0; right: 0; border-radius: 3px; font-size: 10px; padding: 0 6px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 24px; color: #111; }
.ld-vclip { background: #8aa9e8; }
.ld-aclip { background: #3f7f5f; display: flex; align-items: center; gap: 1px; padding: 0 4px; }
.ld-aclip i { flex: 1; background: #9fe0bd; border-radius: 1px; }
.ld-mogrt { right: auto; background: #c38fd9; color: #241030; padding: 0 3px; border-left: 1px solid #241030; font-size: 9px; }
.ld-mogrt.drop { animation: ldDrop .35s cubic-bezier(.3,1.5,.5,1) both; }
@keyframes ldDrop { from { transform: translateY(-140%); opacity: 0; } to { transform: none; opacity: 1; } }
.ld-playhead { position: absolute; top: 0; bottom: 0; left: var(--ld-head); width: 1px; background: #2d8ceb; pointer-events: none; }
.ld-playhead::before { content: ''; position: absolute; top: 0; left: -5px; border: 5px solid transparent; border-top: 7px solid #2d8ceb; }

/* ---- panel: the real Caption Bunny panel in a scaled iframe ---- */
.ld-panel { display: flex; flex-direction: column; min-height: 0; background: #1a1a1a; }
.ld-panel-tab { flex: none; font-size: 11px; color: #c8c8c8; padding: 6px 10px; border-bottom: 1px solid #151515; background: #232323; }
.ld-panel-wrap { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #141414; }
.ld-panel-wrap iframe { position: absolute; left: 0; top: 0; border: 0; transform-origin: 0 0; background: #141414; }

/* ---- guidance ---- */
.ld-coach { position: absolute; z-index: 20; width: 250px; background: #fff; color: #111; border-radius: 10px; padding: 10px 12px; font-size: 12.5px; font-weight: 500; line-height: 1.4; box-shadow: 0 12px 30px rgba(0,0,0,.4); pointer-events: none; opacity: 0; transition: left .35s, top .35s, opacity .3s; }
.ld-coach.show { opacity: 1; }
.ld-coach::after { content: ''; position: absolute; left: 50%; bottom: -6px; width: 12px; height: 12px; background: #fff; transform: translateX(-50%) rotate(45deg); }
.ld-coach.ld-coach-dock { left: 12px !important; right: auto; top: auto !important; bottom: 12px; width: auto; max-width: calc(100% - 24px - 360px); }
.ld-coach.ld-coach-dock::after { display: none; }
.ld-coach.below::after { bottom: auto; top: -6px; }
.ld-cursor { position: absolute; left: 0; top: 0; z-index: 30; pointer-events: none; opacity: 0; transform: translate(60%, 60%); transition: transform .7s cubic-bezier(.45,0,.2,1), opacity .3s; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.ld-cursor.on { opacity: 1; }
.ld-cursor.click path { fill: #ffd1e1; }

.ld-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 12px; font-size: 13px; color: var(--clay-ink, #0a0a0a); }
.ld-auto, .ld-restart { appearance: none; border: 0; background: var(--clay-card, #f5f0e0); color: inherit; font: 600 13px Inter, sans-serif; border-radius: 999px; padding: 7px 14px; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.ld-auto:hover, .ld-restart:hover { background: #fff; }
.ld-auto i { width: 28px; height: 16px; border-radius: 8px; background: #bbb; position: relative; transition: background .2s; }
.ld-auto i::after { content: ''; position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform .2s; }
.ld-auto[aria-pressed="true"] i { background: #16a34a; }
.ld-auto[aria-pressed="true"] i::after { transform: translateX(12px); }
.ld-hint { flex: 1; text-align: center; opacity: .75; }

@media (max-width: 860px) {
  .ld-body { grid-template-columns: 1fr; height: auto; }
  .ld-left { border-right: 0; border-bottom: 1px solid #111; }
  .ld-frame { height: 300px; flex: none; }
  .ld-panel { height: 560px; }
  .ld-coach.ld-coach-dock { position: relative; left: auto !important; bottom: auto; max-width: none; margin: 0; border-radius: 0; box-shadow: none; background: #fff5f9; }
  .ld-title { display: none; }
  .ld-titlebar { justify-content: space-between; }
}
@media (max-width: 520px) {
  .ld-steps li { font-size: 11px; padding: 4px 9px 4px 4px; }
  .ld-steps li b { width: 17px; height: 17px; }
  .ld-hint { display: none; }
  .ld-frame { height: 260px; }
}
