/* zgui-core/demo/demo.css — showcase page layout (cards/grid only; components bring
   their own cyberpunk styling from all.css). */
/* cyberpunk.css sets `html,body { height:100% }` + `body { overflow:hidden }` for app shells;
   the demo is a normal scrolling document, so override both (this sheet loads after all.css). */
html, body { margin: 0; height: auto; min-height: 100%; background: var(--bg-primary, #05080d); color: var(--text, #cde); }
body { overflow-x: hidden; overflow-y: auto; font-family: 'Share Tech Mono', monospace; }

.demo-wrap { max-width: 1280px; margin: 0 auto; padding: 0 18px 80px; }
.demo-fileproto {
    max-width: 1280px;
    margin: 12px auto 0;
    padding: 10px 14px;
    background: rgba(255, 196, 0, 0.08);
    border: 1px solid var(--accent, #ffb000);
    border-radius: 4px;
    color: var(--text, #cde);
    font-size: 12px;
}
.demo-fileproto code { background: var(--bg-card); padding: 1px 5px; border-radius: 3px; color: var(--cyan); }
.demo-toolbar {
    position: sticky;
    top: 0;
    z-index: 80;
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    margin-bottom: 8px;
    background: linear-gradient(180deg, var(--bg-primary, #05080d) 70%, transparent);
}
.demo-toolbar input {
    flex: 1;
    background: var(--bg-card);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 12px;
    font: inherit;
    border-radius: 4px;
}
.demo-toolbar input:focus { outline: none; border-color: var(--cyan); box-shadow: 0 0 8px var(--cyan-glow); }
.demo-count { color: var(--text-muted); font-size: 12px; white-space: nowrap; }

.demo-cat {
    font-family: 'Orbitron', sans-serif;
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--cyan);
    margin: 28px 0 12px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border);
}
.demo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
}
.demo-card {
    display: flex;
    flex-direction: column;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 6px;
    /* clip by default so a wide component (kvEditor, tables) can't spill over its neighbours. */
    overflow: hidden;
}
/* popover components (datePicker calendar, dropdown/combobox/menubar/split-button menus) opt in to
   visible overflow so their popups aren't clipped — these aren't wide, so they don't spill. */
.demo-card.demo-pop { overflow: visible; }
.demo-card.demo-pop .demo-stage { overflow: visible; }

/* tabs.js is an app-wiring helper (toggles .active; the host supplies tab CSS). Provide it here so
   the demo's tabs actually show/hide panels. */
.demo-stage .tab-nav { display: flex; gap: 2px; margin-bottom: 4px; }
.demo-stage .tab-btn { padding: 4px 11px; font: inherit; font-size: 12px; cursor: pointer; background: var(--bg-card); color: var(--text-muted); border: 1px solid var(--border); }
.demo-stage .tab-btn.active { color: var(--cyan); border-color: var(--cyan); }
.demo-stage .tab-content { display: none; }
.demo-stage .tab-content.active { display: block; }
.demo-card-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    padding: 8px 12px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.02));
    border-bottom: 1px solid var(--border);
}
.demo-card-name { font-family: 'Orbitron', sans-serif; font-size: 12px; color: var(--text); letter-spacing: 0.5px; }
.demo-card-api { font-size: 10px; color: var(--text-muted); }
.demo-stage {
    flex: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 16px 14px;
    min-height: 56px;
}
.demo-error { color: var(--red); font-size: 11px; }
.demo-muted { color: var(--text-muted); font-size: 11px; font-style: italic; }
.demo-relbox {
    position: relative;
    overflow: hidden;
    width: 200px;
    height: 110px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg-secondary, rgba(255, 255, 255, 0.02));
}
.demo-slide {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 110px;
    font-family: 'Orbitron', sans-serif;
    font-size: 28px;
    color: var(--cyan);
    background: var(--bg-secondary, rgba(0, 229, 255, 0.05));
}
.demo-flip { width: 150px; height: 100px; }
.demo-flip .zg-flip-face { display: flex; align-items: center; justify-content: center; width: 150px; height: 100px; font-family: 'Orbitron', sans-serif; color: var(--cyan); }
