/* Demo + PRD 抽屉展示壳层 */
.showcase-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; background: #eef1f6; }
.showcase-header {
  flex-shrink: 0; display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  background: #fff; border-bottom: 1px solid var(--border); box-shadow: 0 1px 4px rgba(0,0,0,.06);
  flex-wrap: wrap;
}
.showcase-logo { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 15px; white-space: nowrap; }
.showcase-logo-icon {
  width: 32px; height: 32px; border-radius: 8px; background: var(--primary); color: #fff;
  display: flex; align-items: center; justify-content: center;
}
.showcase-nav { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; min-width: 0; }
.showcase-nav a {
  padding: 5px 12px; border-radius: 6px; font-size: 12px; color: var(--text-secondary);
  text-decoration: none; border: 1px solid transparent; transition: all .15s;
}
.showcase-nav a:hover { background: #f0f6ff; color: var(--primary); }
.showcase-nav a.active { background: var(--primary-light); color: var(--primary); border-color: #bae0ff; font-weight: 600; }

.prd-open-btn { position: relative; flex-shrink: 0; white-space: nowrap; }
.header-right .prd-open-btn { margin-right: 8px; }
.prd-open-badge {
  position: absolute; top: -2px; right: -2px; color: #ff4d4f; font-size: 10px; line-height: 1;
}
.prd-open-btn.has-update { animation: prd-pulse 1.5s ease infinite; }
@keyframes prd-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(22,119,255,.4); }
  50% { box-shadow: 0 0 0 6px rgba(22,119,255,0); }
}

.showcase-body { flex: 1; min-height: 0; }
.showcase-demo { width: 100%; height: 100%; background: #fff; position: relative; }
.showcase-demo iframe { width: 100%; height: 100%; border: none; display: block; }
.showcase-demo-label {
  position: absolute; top: 8px; left: 8px; z-index: 2; font-size: 10px; padding: 2px 8px;
  background: rgba(0,0,0,.55); color: #fff; border-radius: 4px; pointer-events: none;
}

/* PRD 右侧抽屉 */
.prd-drawer-backdrop {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 900;
  opacity: 0; visibility: hidden; transition: opacity .25s, visibility .25s;
}
.prd-drawer-backdrop.show { opacity: 1; visibility: visible; }

.prd-drawer {
  position: fixed; top: 0; right: 0; width: min(480px, 92vw); height: 100vh; z-index: 901;
  background: #fafbfc; box-shadow: -4px 0 24px rgba(0,0,0,.12);
  display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.4,0,.2,1);
}
.prd-drawer.show { transform: translateX(0); }

.prd-drawer-header {
  flex-shrink: 0; display: flex; align-items: flex-start; gap: 10px;
  padding: 14px 16px 10px; border-bottom: 1px solid var(--border); background: #fff;
}
.prd-drawer-header-main { flex: 1; min-width: 0; }
.prd-drawer-close {
  width: 32px; height: 32px; border: none; border-radius: 6px; background: #f5f5f5;
  cursor: pointer; font-size: 16px; flex-shrink: 0;
}
.prd-drawer-close:hover { background: #e8e8e8; }

.guide-doc-ref { font-size: 11px; color: var(--primary); font-weight: 600; margin-bottom: 4px; }
.guide-title { font-size: 16px; font-weight: 600; line-height: 1.35; }
.guide-subtitle { font-size: 12px; color: var(--text-secondary); margin-top: 4px; }
.guide-context {
  margin-top: 8px; font-size: 11px; padding: 4px 8px; background: #fff7e6;
  border: 1px solid #ffe7ba; border-radius: 4px; color: #ad6800;
}

.guide-tabs {
  flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 4px; padding: 8px 16px;
  background: #fff; border-bottom: 1px solid var(--border);
}
.guide-tab {
  padding: 4px 10px; font-size: 11px; border-radius: 4px; cursor: pointer; border: none;
  background: #f5f5f5; color: var(--text-secondary);
}
.guide-tab.active { background: var(--primary); color: #fff; }

.guide-toolbar {
  flex-shrink: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  padding: 8px 16px; background: #fff; border-bottom: 1px solid var(--border);
}
.guide-toolbar .btn-link { font-size: 12px; margin-left: auto; }

.guide-body {
  flex: 1; overflow-y: auto; padding: 14px 16px 24px; outline: none;
}
.guide-body.guide-editing {
  background: #fffef5; box-shadow: inset 0 0 0 2px #ffe58f;
}
.guide-edit-hint {
  flex-shrink: 0; font-size: 11px; padding: 8px 16px; background: #fffbe6;
  border-top: 1px solid #ffe58f; color: #ad6800;
}

.prd-section { margin-bottom: 20px; }
.prd-section-title {
  font-size: 13px; font-weight: 600; margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 2px solid var(--primary-light); display: flex; align-items: center; gap: 8px;
}
.prd-p { font-size: 12px; line-height: 1.7; color: var(--text-secondary); margin: 0 0 10px; }
.prd-ul { margin: 0 0 10px; padding-left: 18px; font-size: 12px; line-height: 1.75; color: var(--text-secondary); }
.prd-ul li { margin-bottom: 4px; }
.prd-ul strong { color: var(--text-primary); }

.prd-table { width: 100%; border-collapse: collapse; font-size: 11px; margin-bottom: 10px; }
.prd-table th, .prd-table td { border: 1px solid var(--border); padding: 6px 8px; text-align: left; vertical-align: top; }
.prd-table th { background: #f5f7fa; font-weight: 600; }
.prd-table code { font-size: 10px; background: #f0f0f0; padding: 1px 4px; border-radius: 3px; }
.prd-table .demo-ok { color: var(--success); font-weight: 600; }
.prd-table .demo-partial { color: var(--warning); }

.prd-flow { display: flex; flex-direction: column; gap: 0; margin: 10px 0; }
.prd-flow-step {
  display: flex; gap: 10px; font-size: 12px; position: relative; padding-bottom: 14px;
}
.prd-flow-step:not(:last-child)::before {
  content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: #e8e8e8;
}
.prd-flow-num {
  width: 24px; height: 24px; border-radius: 50%; background: var(--primary-light); color: var(--primary);
  display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.prd-flow-body { flex: 1; padding-top: 2px; }
.prd-flow-body strong { display: block; margin-bottom: 2px; color: var(--text-primary); }
.prd-flow-body span { color: var(--text-secondary); font-size: 11px; }

.prd-callout {
  font-size: 11px; padding: 10px 12px; border-radius: 6px; margin-bottom: 10px; line-height: 1.65;
}
.prd-callout.info { background: #e6f4ff; border: 1px solid #bae0ff; color: #0958d9; }
.prd-callout.warn { background: #fff7e6; border: 1px solid #ffe7ba; color: #ad6800; }
.prd-callout.data { background: #f6ffed; border: 1px solid #b7eb8f; color: #389e0d; }

@media (max-width: 768px) {
  .prd-drawer { width: 100%; max-width: 100%; }
}
