/* Geanimeerde voorbeelden (:::demo), gedeeld door les en presentatie */
/* ---------- Geanimeerd voorbeeld (:::demo) ---------- */
.demo { margin: 24px 0; border: 1px solid var(--line); background: var(--surface); display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.demo-venster { position: relative; margin: 16px; border: 1px solid #d6cfc2; background: #fff; min-height: 260px; overflow: hidden; display: flex; flex-direction: column; font-family: "Inter", system-ui, sans-serif; font-size: .9rem; color: #1c1917; }
.demo-titelbalk { display: flex; align-items: center; gap: 10px; padding: 7px 10px; background: var(--app); color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .02em; }
.demo-stippen { display: inline-flex; gap: 5px; }
.demo-stippen i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255,255,255,.55); }
.demo-knoppen { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px 8px; background: #f6f5f3; border-bottom: 1px solid #e7e2d9; }
.demo-knop { padding: 5px 10px; border: 1px solid transparent; border-radius: 3px; font-size: .8rem; color: #44403c; transition: background 150ms, border-color 150ms, transform 120ms; }
.demo-knop.actief { background: color-mix(in srgb, var(--app) 12%, #fff); border-color: color-mix(in srgb, var(--app) 45%, #fff); color: #1c1917; }
.demo-knop.gedrukt, .demo-menu-item.gedrukt { transform: scale(.94); background: color-mix(in srgb, var(--app) 22%, #fff); }
.demo-menu { position: absolute; z-index: 3; min-width: 160px; background: #fff; border: 1px solid #d6cfc2; box-shadow: 0 6px 18px rgba(0,0,0,.12); padding: 4px; display: flex; flex-direction: column; animation: demoIn 180ms ease-out; }
.demo-menu-item { padding: 6px 10px; font-size: .8rem; border-radius: 2px; transition: transform 120ms, background 150ms; }
.demo-doc { flex: 1; padding: 14px 18px; display: flex; flex-direction: column; gap: 6px; }
.demo-regel { line-height: 1.45; }
.demo-regel.kop { font-size: 1.15rem; font-weight: 700; color: var(--app); }
.demo-regel.punt::before { content: "• "; color: var(--app); }
.demo-regel.verschijnt { animation: demoIn 400ms ease-out; }
.typt::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 1px; vertical-align: -2px; background: currentColor; animation: demoCaret 700ms steps(1) infinite; }
.demo-chat { background: #faf9f7; }
.demo-chat .demo-regel { max-width: 85%; padding: 8px 12px; border-radius: 10px; }
.demo-chat .vraag { align-self: flex-end; background: color-mix(in srgb, var(--app) 14%, #fff); }
.demo-chat .antwoord { align-self: flex-start; background: #fff; border: 1px solid #e7e2d9; }
.demo-cursor { position: absolute; left: 0; top: 0; width: 18px; height: 18px; margin: -3px 0 0 -3px; z-index: 4; opacity: 0; pointer-events: none; transition: transform 600ms cubic-bezier(.3,.7,.4,1), opacity 200ms;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2l15 9-7 1.5L8.5 20z' fill='%231c1917' stroke='%23fff' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.demo-cursor.zichtbaar { opacity: 1; }
.demo-excel { flex: 1; display: flex; flex-direction: column; }
.demo-fx { display: flex; gap: 10px; align-items: center; padding: 5px 8px; border-bottom: 1px solid #e7e2d9; font-family: var(--mono); font-size: .8rem; min-height: 30px; }
.demo-fx > span:first-child { color: #78716c; font-style: italic; }
.demo-grid { border-collapse: collapse; width: 100%; font-size: .8rem; table-layout: fixed; }
.demo-grid th { background: #f3f2ef; color: #57534e; font-weight: 500; border: 1px solid #e2ddd3; padding: 3px; width: auto; }
.demo-grid thead th:first-child, .demo-grid tbody th { width: 32px; }
.demo-grid td { border: 1px solid #e7e2d9; padding: 4px 6px; height: 26px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-grid td.geselecteerd { outline: 2px solid var(--app); outline-offset: -2px; }
.demo-grid td.formule { text-align: right; font-variant-numeric: tabular-nums; }
.demo-code { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.demo-bron { margin: 0; padding: 12px 14px; background: #fbf8f3; border-right: 1px solid #e7e2d9; font-family: var(--mono); font-size: .78rem; line-height: 1.5; white-space: pre-wrap; overflow: auto; max-height: 340px; }
.demo-resultaat { display: flex; flex-direction: column; }
.demo-pane-label { font-family: var(--mono); font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: #78716c; padding: 6px 10px; border-bottom: 1px solid #e7e2d9; }
.demo-frame { flex: 1; }
.demo-frame iframe { width: 100%; height: 100%; min-height: 220px; border: 0; background: #fff; }
.demo figcaption { padding: 18px 20px 18px 4px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.demo-label { font-family: var(--mono); font-size: .75rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); }
.demo-titel { font-family: var(--display); font-weight: 400; font-size: 1.35rem; letter-spacing: .02em; line-height: 1.1; }
.demo-uitleg { margin: 0; min-height: 3em; font-size: .98rem; line-height: 1.5; padding: 10px 12px; background: var(--bg); border-left: 3px solid var(--app); }
.demo-ctrl { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.demo-teller { font-family: var(--mono); font-size: .75rem; letter-spacing: .08em; color: var(--muted); margin-left: auto; }
.demo-lijst { margin: 4px 0 0; padding-left: 1.2em; font-size: .88rem; color: var(--ink-2); }
.demo.js .demo-lijst { display: none; }
.demo:not(.js) .demo-ctrl, .demo:not(.js) .demo-uitleg { display: none; }
@keyframes demoIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes demoCaret { 50% { opacity: 0; } }
@media (max-width: 900px) {
  .demo { grid-template-columns: minmax(0, 1fr); }
  .demo figcaption { padding: 0 16px 16px; }
  .demo-code { grid-template-columns: minmax(0, 1fr); }
  .demo-bron { border-right: 0; border-bottom: 1px solid #e7e2d9; }
}
@media print { .demo-venster, .demo-ctrl, .demo-uitleg { display: none !important; } .demo .demo-lijst { display: block !important; } .demo { grid-template-columns: 1fr; } }
.demo-dialoog { position: absolute; z-index: 3; left: 50%; top: 56%; transform: translate(-50%, -50%); width: min(78%, 340px); background: #fff; border: 1px solid #d6cfc2; box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; animation: demoDialoog 200ms ease-out; }
.demo-dialoog-titel { font-weight: 700; font-size: .9rem; }
.demo-dialoog-velden { display: flex; flex-direction: column; gap: 6px; }
.demo-veld { border: 1px solid #c9c1b3; border-bottom: 2px solid var(--app); padding: 6px 8px; min-height: 32px; font-size: .85rem; }
.demo-dialoog-knoppen { display: flex; justify-content: flex-end; gap: 6px; }
.demo-dialoog-knoppen:empty { display: none; }
.demo-dialoog-knop { padding: 5px 12px; border: 1px solid #c9c1b3; font-size: .8rem; transition: transform 120ms, background 150ms; }
.demo-dialoog-knop.gedrukt { transform: scale(.94); }
.demo-dialoog-knop.gekozen { background: var(--app); border-color: var(--app); color: #fff; }
@keyframes demoDialoog { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }

/* Scratch: getypte regels als gekleurde blokken, kleuren zoals in Scratch zelf. */
.demo-app-scratch .demo-regel.sb { align-self: flex-start; color: #fff; font-weight: 600; font-size: .92em; padding: 6px 12px; border-radius: 6px; box-shadow: inset 0 -2px 0 rgba(0,0,0,.18); margin-left: 18px; }
.demo-app-scratch .demo-regel.sb-gebeurtenis { background: #9a6200; margin-left: 0; border-radius: 14px 14px 6px 6px; }
.demo-app-scratch .demo-regel.sb-beweging { background: #3d73cc; }
.demo-app-scratch .demo-regel.sb-uiterlijk { background: #7b52cc; }
.demo-app-scratch .demo-regel.sb-besturen { background: #95590a; }
.demo-app-scratch .demo-regel.sb-variabele { background: #b4441c; }

/* Python- en SQL-editor: code in een vast lettertype. */
.demo-app-python .demo-regel, .demo-app-sql .demo-regel { font-family: ui-monospace, Consolas, "Courier New", monospace; font-size: .88em; }
.demo-app-python .demo-doc, .demo-app-sql .demo-doc { background: #fbfaf8; }
.demo-notitie { position: absolute; left: 12px; right: 12px; bottom: 12px; display: grid; gap: 4px; padding: 10px 12px; background: #fffdf8; border: 1px solid #d6cfc2; box-shadow: 0 4px 12px rgba(60, 44, 20, .12); z-index: 3; }
