Repository Public
1/*2 * file: src/components/editor/nodes/blocks-b.css3 * description: styles of three Next Generation blocks — runnable code (rc-*), PDF reader (pdfv-*) and voice note (au-*). Plain CSS on4 * the tokens of globals.css; nothing here widens the page (bodies scroll inside themselves) and every animation yields to5 * prefers-reduced-motion. The pdfv-text rules are the subset of pdf.js' text-layer stylesheet the reader needs.6 * author: Simon-Pierre Boucher — contact@spboucher.ai7 */89/* ---------- runCode ---------- */10.rc { min-width: 0; }11.rc-hint { display: inline-flex; align-items: center; gap: .3rem; min-width: 0; font-weight: 400; font-size: 0.75rem; color: var(--fg-muted); }12.rc-hint svg { width: 13px; height: 13px; flex-shrink: 0; color: var(--success-text); }13.rc-lang { display: inline-flex; align-items: center; gap: .375rem; min-width: 0; }14.rc-note { margin-left: auto; min-width: 0; text-align: right; overflow-wrap: anywhere; }15.rc-code { max-height: 28rem; border-radius: 0; }16.rc-code-ro { min-height: 0; margin: 0; resize: none; }17.rc-status { padding: .375rem 1rem; border-top: 1px solid var(--line); }18.rc-out { border-top: 1px solid var(--line); min-width: 0; }19.rc-out-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .25rem .5rem .25rem 1rem; min-height: 2rem; }20.rc-out-label { font-size: 0.6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-faint); }21.rc-out[data-error="true"] .rc-out-label { color: var(--danger-text); }22.rc-clear { margin-left: auto; }23.rc-out-text { margin: 0; padding: .25rem 1rem .75rem; max-height: 20rem; overflow: auto; overscroll-behavior: contain; font-family: var(--font-mono); font-size: 13px; line-height: 1.55; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; tab-size: 2; background: transparent; border: 0; border-radius: 0; }24.rc-out[data-error="true"] .rc-out-text { color: var(--danger-text); }25.rc-out-text:focus-visible, .rc-code-ro:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }2627/* ---------- pdf ---------- */28.pdfv { min-width: 0; }29.pdfv-progress, .au-progress { display: block; width: min(16rem, 100%); height: 6px; margin-top: .375rem; accent-color: var(--accent); }30.pdfv-toolbar { row-gap: .25rem; }31.pdfv-gap { flex: 1 1 0; min-width: .25rem; }32.pdfv-pagebox { display: inline-flex; align-items: center; gap: .375rem; white-space: nowrap; }33.pdfv-pagefield { width: 3.25rem; text-align: center; font-variant-numeric: tabular-nums; }34.pdfv-zoom { min-width: 3rem; text-align: right; }35@media (max-width: 480px) { .pdfv-zoom { display: none; } }36.pdfv-stage { position: relative; min-height: 10rem; background: var(--bg-sunk); outline: none; }37.pdfv-stage:focus-visible { box-shadow: inset 0 0 0 2px var(--ring); }38.pdfv-page { position: relative; margin-inline: auto; background: #fff; box-shadow: var(--shadow-card); overflow: hidden; isolation: isolate; }39.pdfv-canvas { position: absolute; inset: 0; display: block; width: 100%; height: 100%; z-index: 0; }40.pdfv-page[data-rendering="true"] .pdfv-canvas { opacity: .6; transition: opacity var(--dur-fast); }41.pdfv-marks { position: absolute; inset: 0; z-index: 1; pointer-events: none; }42.pdfv-mark { position: absolute; border-radius: 2px; background: color-mix(in srgb, var(--pdfv-c, #ffd84d) 45%, transparent); mix-blend-mode: multiply; }43.pdfv-mark[data-kind="note"] { background: color-mix(in srgb, var(--pdfv-c, #ffd84d) 22%, transparent); box-shadow: inset 0 -2px 0 var(--pdfv-c, #ffd84d); }44.pdfv-mark[data-selected="true"] { outline: 2px solid var(--accent); outline-offset: 1px; mix-blend-mode: normal; }45.pdfv-ink { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }46/* pdf.js text layer: transparent, selectable text laid exactly over the canvas (kept light-scheme: the page is always white) */47.pdfv-text { position: absolute; top: 0; left: 0; z-index: 2; overflow: clip; opacity: 1; line-height: 1; text-align: initial; letter-spacing: normal; word-spacing: normal; color-scheme: only light;48 -webkit-text-size-adjust: none; text-size-adjust: none; forced-color-adjust: none; transform-origin: 0 0; caret-color: CanvasText; user-select: text; -webkit-user-select: text;49 --min-font-size: 1; --total-scale-factor: 1; --text-scale-factor: calc(var(--total-scale-factor) * var(--min-font-size)); --min-font-size-inv: calc(1 / var(--min-font-size)); }50.pdfv-text[data-main-rotation="90"] { transform: rotate(90deg) translateY(-100%); }51.pdfv-text[data-main-rotation="180"] { transform: rotate(180deg) translate(-100%, -100%); }52.pdfv-text[data-main-rotation="270"] { transform: rotate(270deg) translateX(-100%); }53.pdfv-text :is(span, br) { color: transparent; position: absolute; white-space: pre; cursor: text; transform-origin: 0% 0%; user-select: text; -webkit-user-select: text; }54.pdfv-text > :not(.markedContent):not(.pdfv-eoc), .pdfv-text .markedContent span:not(.markedContent) { z-index: 1; --font-height: 0; font-size: calc(var(--text-scale-factor) * var(--font-height)); --scale-x: 1; --rotate: 0deg; transform: rotate(var(--rotate)) scaleX(var(--scale-x)) scale(var(--min-font-size-inv)); }55.pdfv-text .markedContent { display: contents; }56.pdfv-text span[role="img"] { user-select: none; -webkit-user-select: none; cursor: default; }57.pdfv-text ::selection { background: color-mix(in srgb, var(--accent) 35%, transparent); color: transparent; }58.pdfv-text br::selection { background: transparent; }59.pdfv-text .pdfv-eoc { display: block; position: absolute; inset: 100% 0 0; z-index: 0; cursor: default; user-select: none; -webkit-user-select: none; }60.pdfv-text.selecting .pdfv-eoc { top: 0; }61.pdfv-seltools { position: absolute; z-index: 3; transform: translateX(-50%); display: flex; align-items: center; flex-wrap: wrap; justify-content: center; gap: .125rem; width: max-content; max-width: min(100%, 22rem); padding: .25rem; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--bg-elev); box-shadow: var(--shadow-pop); color: var(--fg); }62.pdfv-swatches { display: inline-flex; align-items: center; gap: .125rem; padding-inline: .125rem; }63.pdfv-swatch { position: relative; width: 1.75rem; height: 1.75rem; border-radius: var(--r-pill); display: inline-grid; place-items: center; }64.pdfv-swatch::before { content: ""; width: 1.125rem; height: 1.125rem; border-radius: var(--r-pill); background: var(--pdfv-c); border: 1px solid color-mix(in srgb, #000 18%, var(--pdfv-c)); }65.pdfv-swatch[aria-checked="true"]::before { box-shadow: 0 0 0 2px var(--bg-elev), 0 0 0 4px var(--accent); }66.pdfv-swatch:focus-visible { outline: 2px solid var(--ring); outline-offset: 1px; }67@media (pointer: coarse) { .pdfv-swatch { width: 2.75rem; height: 2.75rem; } .pdfv-swatch::before { width: 1.5rem; height: 1.5rem; } }68.pdfv-panel { border-top: 1px solid var(--line); padding: .5rem .75rem .75rem; display: grid; gap: .5rem; min-width: 0; }69.pdfv-panel-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }70.pdfv-quote { margin: 0; padding: 0 0 0 .625rem; border-left: 3px solid var(--line-strong); color: var(--fg-muted); font-size: 0.8125rem; line-height: 1.35rem; max-height: 6.75rem; overflow: auto; overflow-wrap: anywhere; }71.pdfv-note { display: block; width: 100%; min-height: 3rem; resize: vertical; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg); padding: .375rem .5rem; font-size: 0.875rem; line-height: 1.4rem; color: var(--fg); outline: none; }72.pdfv-note:focus { border-color: color-mix(in oklab, var(--accent) 60%, transparent); }73.pdfv-note-ro { margin: 0; font-size: 0.875rem; line-height: 1.4rem; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }74.note-editor .pdfv-list, .pdfv-list { list-style: none; margin: 0; padding: .25rem; border-top: 1px solid var(--line); max-height: 16rem; overflow-y: auto; overscroll-behavior: contain; }75.note-editor .pdfv-list > li, .pdfv-list > li { margin: 0; padding: 0; }76.pdfv-row { display: flex; align-items: center; gap: .5rem; width: 100%; min-width: 0; min-height: 2rem; padding: .25rem .5rem; border-radius: var(--r-sm); text-align: left; font-size: 0.8125rem; line-height: 1.25rem; color: var(--fg); }77.pdfv-row:hover { background: var(--bg-hover); } .pdfv-row.is-active { background: var(--accent-soft); }78.pdfv-row:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }79.pdfv-rowtext { min-width: 0; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }80.pdfv-dot { width: .625rem; height: .625rem; border-radius: var(--r-pill); flex-shrink: 0; background: var(--pdfv-c); border: 1px solid color-mix(in srgb, #000 18%, var(--pdfv-c)); }81.pdfv-dot[data-kind="ink"] { border-radius: 2px; }82@media (pointer: coarse) { .pdfv-row { min-height: 2.75rem; } .pdfv-note { font-size: 1rem; } }8384/* ---------- audio ---------- */85.au { display: grid; gap: .5rem; padding: .625rem .75rem .75rem; min-width: 0; }86.au-title { width: 100%; font-weight: 500; }87.au-player { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }88.au-play { border-radius: var(--r-pill); width: 2.25rem; height: 2.25rem; padding: 0; flex-shrink: 0; }89@media (pointer: coarse) { .au-play { width: 2.75rem; height: 2.75rem; } .au-title, .au-rate { height: 2.75rem; font-size: 1rem; } }90.au-time { min-width: 2.25rem; text-align: center; font-size: 0.75rem; }91.au-seek { flex: 1 1 7rem; min-width: 0; height: 1.75rem; margin: 0; accent-color: var(--accent); cursor: pointer; touch-action: pan-y; }92.au-seek:disabled { cursor: default; opacity: .5; }93.au-seek:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; border-radius: var(--r-xs); }94@media (pointer: coarse) { .au-seek { height: 2.75rem; } }95.au-rate { flex-shrink: 0; padding-inline: .25rem; }96.au-wave { display: block; width: 100%; height: 3rem; cursor: pointer; touch-action: pan-y; }97.au-wave-load { display: inline-flex; align-items: center; gap: .375rem; justify-self: start; min-height: 1.75rem; padding: 0 .375rem; border-radius: var(--r-sm); }98button.au-wave-load:hover { background: var(--bg-hover); color: var(--fg); }99button.au-wave-load:focus-visible { outline: 2px solid var(--ring); }100.au-wave-load svg, .au-tr svg { width: 14px; height: 14px; flex-shrink: 0; }101@media (pointer: coarse) { .au-wave-load { min-height: 2.75rem; } }102.note-editor .au-transcript, .au-transcript { list-style: none; margin: 0; padding: 0; max-height: 18rem; overflow-y: auto; overscroll-behavior: contain; border-top: 1px solid var(--line); padding-top: .25rem; }103.note-editor .au-transcript > li, .au-transcript > li { margin: 0; padding: 0; }104.au-line { display: flex; align-items: baseline; gap: .5rem; width: 100%; min-width: 0; padding: .25rem .375rem; border-radius: var(--r-sm); text-align: left; font-size: 0.875rem; line-height: 1.4rem; color: var(--fg); }105.au-line:hover { background: var(--bg-hover); }106.au-line.is-active { background: var(--accent-soft); }107.au-line:focus-visible { outline: 2px solid var(--ring); outline-offset: -2px; }108.au-stamp { flex-shrink: 0; font-family: var(--font-mono); font-size: 0.75rem; color: var(--fg-faint); font-variant-numeric: tabular-nums; }109.au-line.is-active .au-stamp { color: var(--accent); }110.au-line-text { min-width: 0; overflow-wrap: anywhere; }111@media (pointer: coarse) { .au-line { min-height: 2.75rem; align-items: center; } }112.au-tr { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }113.au-failed { color: var(--danger-text); }114.au-summary { border: 1px solid color-mix(in oklab, var(--ai) 26%, transparent); border-radius: var(--r-md); background: color-mix(in oklab, var(--ai-soft) 55%, transparent); padding: .625rem .75rem; min-width: 0; }115.au-summary-head { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; margin-bottom: .375rem; }116.au-ai-mark { display: inline-flex; align-items: center; gap: .25rem; border-radius: var(--r-xs); background: var(--ai-soft); color: var(--ai); padding: 0 .375rem; font-size: 0.6875rem; line-height: 1.125rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }117.au-ai-mark svg { width: 12px; height: 12px; }118.au-summary-text { margin: 0; font-size: 0.875rem; line-height: 1.45rem; color: var(--fg); white-space: pre-wrap; overflow-wrap: anywhere; }119.au-summary-h { margin: .5rem 0 .125rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--fg-faint); }120.note-editor .au-summary-list, .au-summary-list { margin: 0; padding-left: 1.125rem; list-style: disc; font-size: 0.875rem; line-height: 1.45rem; color: var(--fg); overflow-wrap: anywhere; }121.au-rec { display: flex; align-items: center; gap: .625rem; flex-wrap: wrap; padding: .625rem .75rem; min-width: 0; }122.au-rec-dot { width: .625rem; height: .625rem; border-radius: var(--r-pill); background: var(--danger); flex-shrink: 0; animation: au-pulse 1.4s ease-in-out infinite; }123.au-rec-time { font-family: var(--font-mono); font-size: 0.9375rem; font-variant-numeric: tabular-nums; color: var(--fg); min-width: 3rem; }124.au-meter { flex: 1 1 5rem; min-width: 2rem; height: .375rem; border-radius: var(--r-pill); background: var(--bg-sunk); overflow: hidden; }125.au-meter-fill { display: block; width: 100%; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left center; will-change: transform; }126.au-rec-actions { margin-left: auto; display: inline-flex; align-items: center; gap: .25rem; }127@keyframes au-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }128@media (prefers-reduced-motion: reduce) {129 .au-rec-dot { animation: none; }130 .au-meter { display: none; }131 .pdfv-page[data-rendering="true"] .pdfv-canvas { transition: none; }132}133134/* ---------- voice flows (SPEC §4.13): pause, transcription states, search hits, AI actions, keep/delete the original ---------- */135.au-rec[data-paused="true"] .au-rec-dot { animation: none; background: var(--fg-faint); }136.au-paused { font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }137.au-note { display: flex; align-items: center; gap: .375rem; margin: 0; min-width: 0; }138.au-note svg, .au-keep svg { width: 14px; height: 14px; flex-shrink: 0; }139.au-line.is-hit { background: color-mix(in oklab, var(--warning) 22%, transparent); }140.au-line.is-hit .au-stamp { color: var(--fg-muted); }141.au-line:disabled { cursor: default; }142.au-line:disabled:hover { background: transparent; }143.au-line.is-hit:disabled:hover { background: color-mix(in oklab, var(--warning) 22%, transparent); }144.au-hint { color: var(--fg-muted); min-width: 0; }145.au-pending { display: inline-flex; align-items: center; gap: .375rem; }146.au-spin { width: .75rem; height: .75rem; border-radius: var(--r-pill); border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: au-spin .8s linear infinite; }147@keyframes au-spin { to { transform: rotate(360deg); } }148.au-problem { margin: 0; padding: .375rem .5rem; border-radius: var(--r-sm); background: color-mix(in oklab, var(--danger) 9%, transparent); color: var(--fg); font-size: 0.8125rem; line-height: 1.25rem; overflow-wrap: anywhere; }149.au-keep { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; min-width: 0; }150.au-summary-actions { display: flex; flex-wrap: wrap; gap: .375rem; margin-top: .5rem; padding-top: .5rem; border-top: 1px solid color-mix(in oklab, var(--ai) 20%, transparent); }151@media (prefers-reduced-motion: reduce) { .au-spin { animation: none; border-top-color: var(--line-strong); } }152