/* ------------------------------------------------------------------
   제품 데모 — 실제 프로그램 UI를 웹에서 재현합니다.
   스크린샷이 아니라 DOM이라 어느 배율에서도 선명하고, 방문자가 직접
   눌러볼 수 있습니다. 색·반경·타이포는 데스크톱 앱과 같은 토큰을 씁니다.
   (OverPlatform/DESIGN_TOKENS.md)
   ------------------------------------------------------------------ */

.product-demo {
  --s0: #111827;   /* surface-0 */
  --s1: #1b2133;   /* surface-1 */
  --s2: #252c42;   /* surface-2 */
  --s3: #2f3750;   /* surface-3 */
  --line: #2a3149;
  --line-strong: #3f4763;
  --tx1: #f7f7fb;
  --tx3: #999dac;
  --ac: #9298ff;
  --ac-solid: #5f67e0;
  --ac-hover: #7078ee;
  --ok: #3dc47e;
  --warn: #ffb43a;

  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 168px minmax(0, 1fr) 172px;
  gap: 1px;
  height: 100%;
  background: var(--line);
  border-radius: 7px;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.45;
  color: var(--tx1);
  container-type: inline-size;
}
.product-demo * { box-sizing: border-box; }
.product-demo[hidden] { display: none; }

.pd-col { background: var(--s0); padding: 12px; overflow: hidden; }
.pd-col--main { background: var(--s0); display: flex; flex-direction: column; gap: 9px; }

.pd-eyebrow {
  font-size: 8px;
  letter-spacing: .14em;
  color: var(--tx3);
  margin: 0 0 10px;
}

/* ---- 진행 단계 ---- */
.pd-steps { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pd-step {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 8px;
  border: 1px solid transparent;
  border-radius: 6px;
  transition: background .18s ease, border-color .18s ease;
}
.pd-step[data-state="current"] { background: var(--s2); border-color: var(--line-strong); }
.pd-step-mark {
  width: 16px; height: 16px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  display: grid; place-items: center;
  font-size: 8px;
  color: var(--tx3);
}
.pd-step[data-state="current"] .pd-step-mark { background: var(--ac); border-color: var(--ac); color: #0e1428; }
.pd-step[data-state="done"] .pd-step-mark { background: var(--ok); border-color: var(--ok); color: #0e1428; }
.pd-step b { display: block; font-weight: 500; font-size: 11px; }
.pd-step small { display: block; color: var(--tx3); font-size: 9px; margin-top: 1px; }
.pd-step[data-state="idle"] b { color: var(--tx3); }

/* ---- 드롭존 / 파일 카드 ---- */
.pd-head { display: flex; align-items: baseline; gap: 8px; }
.pd-head h4 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.pd-head span { color: var(--tx3); font-size: 10px; }

.pd-drop {
  flex: 1 1 auto;
  min-height: 86px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 5px;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  background: var(--s1);
  cursor: pointer;
  text-align: center;
  padding: 12px;
  transition: border-color .18s ease, background .18s ease;
}
.pd-drop:hover, .pd-drop:focus-visible { border-color: var(--ac); background: var(--s2); outline: none; }
.pd-drop b { font-size: 12px; font-weight: 500; }
.pd-drop small { color: var(--tx3); font-size: 9px; }
.pd-drop-glyph { font-size: 17px; color: var(--ac); line-height: 1; }

.pd-file {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--s1);
  padding: 10px 12px;
}
.pd-file-name { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pd-file-name b { font-size: 12px; font-weight: 500; }
.pd-file-meta { color: var(--tx3); font-size: 9px; margin-top: 2px; }
.pd-file-out { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); }
.pd-file-out span { display: block; font-size: 8px; letter-spacing: .1em; color: var(--tx3); }
.pd-file-out b { font-size: 11px; font-weight: 400; }

/* ---- 설정 패널 ---- */
.pd-panel {
  flex: 1 1 auto;
  min-height: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--s1);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.pd-panel h5 { margin: 0; font-size: 12px; font-weight: 500; }
.pd-panel p { margin: 0; color: var(--tx3); font-size: 9px; }

.pd-checks { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px; }
.pd-check {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--s2);
  font-size: 10px;
}
.pd-check--fixed { opacity: .78; }
.pd-check input { position: absolute; opacity: 0; pointer-events: none; }
.pd-box {
  width: 12px; height: 12px; flex: none;
  border-radius: 3px;
  border: 1px solid var(--line-strong);
  background: var(--s3);
  display: grid; place-items: center;
  font-size: 8px; color: transparent;
}
.pd-check[data-on="1"] .pd-box { background: var(--ac); border-color: var(--ac); color: #0e1428; }
.pd-check--toggle { cursor: pointer; }
.pd-check--toggle:hover { border-color: var(--line-strong); }
.pd-check span { flex: 1; }
.pd-tag {
  font-size: 8px;
  padding: 2px 5px;
  border-radius: 4px;
  background: var(--s3);
  color: var(--tx3);
}
.pd-check[data-on="1"] .pd-tag { background: rgba(146,152,255,.18); color: var(--ac); }

/* ---- 우측 카드 ---- */
.pd-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--s1);
  padding: 10px;
  margin-bottom: 8px;
}
.pd-card h5 { margin: 0 0 8px; font-size: 11px; font-weight: 500; }
.pd-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 4px 0; font-size: 10px;
}
.pd-switch {
  width: 24px; height: 13px; flex: none;
  border-radius: 999px;
  background: var(--s3);
  border: 1px solid var(--line-strong);
  position: relative;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}
.pd-switch::after {
  content: "";
  position: absolute;
  top: 1px; left: 1px;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--tx3);
  transition: transform .18s ease, background .18s ease;
}
.pd-switch[data-on="1"] { background: var(--ac-solid); border-color: var(--ac-solid); }
.pd-switch[data-on="1"]::after { transform: translateX(11px); background: #fff; }

.pd-pill {
  font-size: 8px; padding: 2px 6px; border-radius: 4px;
  background: rgba(61,196,126,.16); color: var(--ok);
}

.pd-log {
  font-family: "Cascadia Mono", Consolas, monospace;
  font-size: 8.5px;
  line-height: 1.7;
  color: var(--tx3);
  margin: 0;
  white-space: pre-wrap;
  min-height: 46px;
}
.pd-log b { color: var(--ok); font-weight: 400; }

/* ---- 액션 ---- */
.pd-action {
  width: 100%;
  padding: 8px;
  border: 0;
  border-radius: 6px;
  background: var(--ac-solid);
  color: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 500;
  cursor: pointer;
  transition: background .16s ease;
}
.pd-action:hover:not(:disabled) { background: var(--ac-hover); }
.pd-action:disabled { background: var(--s3); color: var(--tx3); cursor: default; }
.pd-action--quiet { background: transparent; border: 1px solid var(--line-strong); color: var(--tx1); }
.pd-action--quiet:hover { background: var(--s2); }
.pd-action:focus-visible { outline: 2px solid var(--ac); outline-offset: 2px; }

.pd-progress { height: 3px; border-radius: 999px; background: var(--s3); overflow: hidden; }
.pd-progress i { display: block; height: 100%; width: 0; background: var(--ac-solid); transition: width .18s linear; }

/* 데모임을 명시 — 실제 앱과 혼동하지 않게 */
.pd-badge {
  position: absolute;
  z-index: 3;
  top: 8px; right: 8px;
  font-size: 8px;
  letter-spacing: .1em;
  padding: 3px 7px;
  border-radius: 4px;
  background: rgba(5, 7, 17, .78);
  border: 1px solid var(--line-strong);
  color: var(--tx3);
}

@container (max-width: 620px) {
  .product-demo { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .product-demo .pd-col--rail, .product-demo .pd-col--side { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .product-demo *, .product-demo *::after { transition: none !important; }
}
